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.
This work is supported by EPSRC grant EP/D064554/1. Thanks to the anonymous referees for many useful suggestions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Cheong, M.H.: Functional programming and 3D games. In: BEng thesis, University of New South Wales, Sydney, Australia (November 2005)
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)
Felleisen, M.: Personal communication and on-line lecture notes (June 2007), http://www.ccs.neu.edu/home/matthias/HtDP/Prologue/book.html
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)
Hudak, P., Makucevich, T., Gadde, S., Whong, B.: Haskore music notation - an algebra of music. Journal of Functional Programming 6(3), 465–483 (1996)
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
Hughes, J.: Generalising monads to arrows. Science of Computer Programming 37, 67–111 (2000)
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)
Karplus, K., Strong, A.: Digital synthesis of plucked string and drum timbres. Computer Music Journal 7(2), 43–55 (1983)
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)
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)
Smith, J.O.: Introduction to Digital Filters, August 2006 edn. CCRMA (May 2006), http://ccrma.stanford.edu/~jos/filters06/
Thielemann, H.: Audio processing using Haskell. In: DAFx 2004. Proceedings of the 7th International Conference on Digital Audio Effects, Naples, pp. 201–206 (2004)
Vercoe, B.: The Canonical Csound Reference Manual. MIT Media Lab (2007)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Giorgidze, G., Nilsson, H. (2007). Switched-On Yampa. In: Hudak, P., Warren, D.S. (eds) Practical Aspects of Declarative Languages. PADL 2008. Lecture Notes in Computer Science, vol 4902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77442-6_19
Download citation
DOI: https://doi.org/10.1007/978-3-540-77442-6_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-77441-9
Online ISBN: 978-3-540-77442-6
eBook Packages: Computer ScienceComputer Science (R0)