Book Description
This free book explores the fundamentals of computer music and functional programming through the Haskell programming language. Functional programming is typically considered difficult to learn. This introduction in the context of creating music will allow students and professionals with a musical inclination to leverage their experience to help understand concepts that might be intimidating in more traditional computer science settings.
Conversely, the book opens the door for programmers to interact with music by using a medium that is familiar to them. Readers will learn how to use the Euterpea library for Haskell to represent and create their own music with code, without the need for other music software.
The book explores common paradigms used in algorithmic music composition, such as stochastic generation, musical grammars, self-similarity, and real-time interactive systems. Other topics covered include the basics of signal-based systems in Haskell, sound synthesis, and virtual instrument design.
This is a textbook on functional programming in Haskell, with a strong focus on computer music concepts and applications. The book describes Euterpea, a computer music library developed in Haskell, that allows programming computer music applications both at the note level and the signal level.
The book also teaches functional programming in Haskell from scratch. It is suitable for use in the classroom to teach functional programming concepts, Haskell language details, computer music and audio processing concepts and applications - or all of the above.
This open book is licensed under a Creative Commons License (CC BY). You can download The Haskell School of Music ebook for free in PDF format (4.1 MB).
Table of Contents
Chapter 1
Computer Music, Euterpea, and Haskell
Chapter 2
Simple Music
Chapter 3
Polymorphic & Higher-Order Functions
Chapter 4
A Musical Interlude
Chapter 5
Syntactic Magic
Chapter 6
More Music
Chapter 7
Qualified Types and Type Classes
Chapter 8
Interpretation and Performance
Chapter 9
Self-Similar Music
Chapter 10
Proof by Induction
Chapter 11
An Algebra of Music
Chapter 12
L-Systems and Generative Grammars
Chapter 13
Random Numbers ... and Markov Chains
Chapter 14
From Performance to Midi
Chapter 15
Basic Input/Output
Chapter 16
Higher-Order Types and Monads
Chapter 17
Musical User Interface
Chapter 18
Sound and Signals
Chapter 19
Euterpea's Signal Functions
Chapter 20
Spectrum Analysis
Chapter 21
Additive and Subtractive Synthesis
Chapter 22
Amplitude and Frequency Modulation
Chapter 23
Physical Modelling
Chapter 24
Sound Effects
Appendix A
The PreludeList Module
Appendix D
Haskell's Standard Type Classes
Appendix C
Built-in Types Are Not Special
Appendix D
Pattern-Matching Details