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.
A mostly frustrating experience, with a few good parts.
This is a typical textbook, and I usually approach these as deliberate study objects. I set aside one hour each morning for working with the book, which included doing the exercises, typing in code examples, and so on. I started this one in late May 2019, but then put it on pause in late July. That wasn't the book's fault, though, but because I had too much else on my plate at the time. I picked it up again in February 2020 and have been working with it consistently until completion.
I already knew Haskell when I started the book. I'd hoped to renew my fading knowledge of music theory, but I didn't get much of that. The book assumes that you already know music theory, but that you don't know Haskell. That made the first 100 pages tedious to get through. I suppose, however, that if you don't already know Haskell, this gives you a thorough, although academic, introduction to the language.
My main problem with the book is that it's so uneven. It's written by two authors, and it shows. Paul Hudak died in 2015, and while it's never stated, I get the impression that he must have left half a manuscript that Donya Quick took over. Some chapters are well-written and informative, while others are a mess. I don't know who wrote which chapters, so I'm not singling out any of the authors.
The exercises where all over the place. I could do most of them, but I wonder how approachable they'd be to someone without prior experience with Haskell. Additionally, in typical academic tradition, some of the exercises are exasperatingly vague, or just orders of magnitude harder than the other ones. Some of them I spent days on, and some of them I gave up on.
Another problem are chapters that seem oddly inserted. They discuss topics related to the theme of the book, but you can skip them without any detrimental effect to your understanding of later chapters. Examples include a chapter on probability distributions and Markov chains, and one on spectrum analysis.
I did, however, learn a few things I didn't expect. I learned how sound synthesis works, and I got to write my own (primitive) instrument synthesised from sine waves oscillators and envelopes.
I've read alot of books about functional programming, and Haskell, and this one is one of my favorites - because its about making music with code. Its fun and intuitive. It presents functional programming as a means to an end, not an end itself. This book is freely available online.
Really good introduction to functional programming with Haskell, especially for those interested in music theory, computer music or practicing musical instruments. I mostly picked up a very nice and concise usage of Haskell type system for encoding standard music notation as internal DSL.
Aside from what others have said, this book assumes way more than a passing knowledge of musical theory: it has lots of deep dives and segues. I will say that it’s a decent coverage of Haskell and type theoretic programming for those with strong music theory backgrounds; I would have rated it lower were the Haskell parts not so strong.
Probably an excellent introduction to Haskell, similar to "Learn you a Haskell", but more useful because most of the examples are real-world examples, producing actual music. Not an introduction to music theory.
This book is more on Haskell than it is on music, but that's OK. I didn't learn as much as I would have liked, but I did come away with some fun ideas about how to write music.