Switched-On Yampa

Declarative Programming of Modular Synthesizers
  • George Giorgidze
  • Henrik Nilsson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4902)

Abstract

In this paper, we present an implementation of a modular synthesizer in Haskell using Yampa. A synthesizer, be it a hardware instrument or a pure software implementation, as here, is said to be modular if it provides sound-generating and sound-shaping components that can be interconnected in arbitrary ways. Yampa, a Haskell-embedded implementation of Functional Reactive Programming, supports flexible, purely declarative construction of hybrid systems. Since music is a hybrid continuous-time and discrete-time phenomenon, Yampa is a good fit for such applications, offering some unique possibilities compared to most languages targeting music or audio applications. Through the presentation of our synthesizer application, we demonstrate this point and provide insight into the Yampa approach to programming reactive, hybrid systems. We develop the synthesizer gradually, starting with fundamental synthesizer components and ending with an application that is capable of rendering a standard MIDI file as audio with respectable performance.

Keywords

Functional Reactive Programming synchronous dataflow languages hybrid systems computer music 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Cheong, M.H.: Functional programming and 3D games. In: BEng thesis, University of New South Wales, Sydney, Australia (November 2005)Google Scholar
  2. 2.
    Courtney, A., Nilsson, H., Peterson, J.: The Yampa arcade. In: Haskell 2003. Proceedings of the 2003 ACM SIGPLAN Haskell Workshop, Uppsala, Sweden, pp. 7–18. ACM Press, New York (2003)CrossRefGoogle Scholar
  3. 3.
    Felleisen, M.: Personal communication and on-line lecture notes (June 2007), http://www.ccs.neu.edu/home/matthias/HtDP/Prologue/book.html
  4. 4.
    Hudak, P., Courtney, A., Nilsson, H., Peterson, J.: Arrows, robots, and functional reactive programming. In: Jeuring, J., Peyton Jones, S.L. (eds.) AFP 2002. LNCS, vol. 2638, pp. 159–187. Springer, Heidelberg (2003)Google Scholar
  5. 5.
    Hudak, P., Makucevich, T., Gadde, S., Whong, B.: Haskore music notation - an algebra of music. Journal of Functional Programming 6(3), 465–483 (1996)CrossRefGoogle Scholar
  6. 6.
    Hudak, P., Zamec, M., Eisenstat, S.: HasSound: Generating musical instrument sounds in Haskell. NEPLS talk, Brown University. Slides (October 2005), http://plucky.cs.yale.edu/cs431/HasSoundNEPLS-10-05.ppt
  7. 7.
    Hughes, J.: Generalising monads to arrows. Science of Computer Programming 37, 67–111 (2000)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Karczmarczuk, J.: Functional framework for sound synthesis. In: Hermenegildo, M.V., Cabeza, D. (eds.) PADL 2005. LNCS, vol. 3350, pp. 7–21. Springer, Heidelberg (2005)Google Scholar
  9. 9.
    Karplus, K., Strong, A.: Digital synthesis of plucked string and drum timbres. Computer Music Journal 7(2), 43–55 (1983)CrossRefGoogle Scholar
  10. 10.
    Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002. Proceedings of the 2002 ACM SIGPLAN Haskell Workshop, Pittsburgh, Pennsylvania, USA, pp. 51–64. ACM Press, New York (2002)CrossRefGoogle Scholar
  11. 11.
    Paterson, R.: A new notation for arrows. In: Proceedings of the 2001 ACM SIGPLAN International Conference on Functional Programming, Firenze, Italy, pp. 229–240 (September 2001)Google Scholar
  12. 12.
    Smith, J.O.: Introduction to Digital Filters, August 2006 edn. CCRMA (May 2006), http://ccrma.stanford.edu/~jos/filters06/
  13. 13.
    Thielemann, H.: Audio processing using Haskell. In: DAFx 2004. Proceedings of the 7th International Conference on Digital Audio Effects, Naples, pp. 201–206 (2004)Google Scholar
  14. 14.
    Vercoe, B.: The Canonical Csound Reference Manual. MIT Media Lab (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • George Giorgidze
    • 1
  • Henrik Nilsson
    • 1
  1. 1.School of Computer ScienceUniversity of NottinghamUK

Personalised recommendations