This is by Paul Hudak, one of the creators of Haskell. I took one of his classes that corresponds with this book. This is how I was introduced to Haskell.
Now I'm hooked on Haskell! The book is a truly excellent introduction to Haskell, and I suggest that anyone who is interested read it. The book goes into some interesting topics, including proofs by computation and induction, UIs and functional reactive programming, and arrows. And it elegantly explains some of the advantages of functional programming and the Haskell language.
Just note that this book is a work in progress; he is always updating and modifying the book as he teaches the corresponding classes.
somewhat related: this paper describes the haskell innards of Chordify, a web service that annotates chord structures of songs from videos or sound clips
The reason i picked up the book: I was thinking whether it was possible to annotate just intonation from equal temperament, but I think that's a limitation of MIDI that it can't do that. Also, eagerly awaiting §11.4, "Soundness and Completeness of Music Algebras".
I recently attended an academic workshop on algorithmic music in Common Lisp and wrote some relevant code in Clojure while there. A lot of people there had strong music theory backgrounds and were very interested in both alternate tunings and the "set theory" approach to pitch sets.
The good news is that with Overtone (the Clojure interface to SuperCollider) you can specify individual pitches rather than MIDI note numbers. People at this workshop who wanted to work with pitch sets or unusual tunings had to resort to controlling the pitch bend programmatically, which, while it certainly works, involves a lot more effort and results in less elegant code.
I really like overtone and what people could do with it. I had it installed, but I gave up after I realized my emacs muscle memories had atrophied a bit too much. That said the constant development of supercollider has made it the preeminent music programming environment.
This book looks more like the start of the CSound manual. That said, awesome, but not where I would run to to get started making sounds.
Thx for info, I need to look at SuperCollider and chuck some day, I've heard a lot about both.
Also, I didn't know there was any way to systemically describe just intonation. I'm one of those bubble children that hears wolf intervals all the time and can never get a guitar tuned. I got that from having piano and woodwind lessons simultaneously as a kid
substitute "frequencies" for "pitches" in this sentence:
The good news is that with Overtone (the Clojure interface to SuperCollider) you can specify individual pitches rather than MIDI note numbers.
since you have access to the actual frequencies, you can build any arbitrary abstraction on top, including any tuning system known to humanity. (and since it's Clojure that abstraction can be unusually concise.)
I wish Overtone -- as someone who has no idea how to setup jackd with pulseaudio and SuperCollider -- was easier to jump straight into and play around.
I shared same excitements as other folks here, but soon after I started reading, I discovered that it is very daunting unless you already know the music theory. This is not explicitly mentioned in the foreword. Actually, I was hoping to learn music theory with this book, along with deepening and refreshing my Haskell knowledge.
It is demanding, you have to know/learn a lot of stuff: music composition, probability distributions, generative models (MCMC), DSP, MIDI, haskell. For haskell alone, I like Hutton's little green/yellow book, and the Stanford course notes
Is that book still worth checking out if you're read Learn You a Haskell or do they occupy the same sort of beginner niche? I'm almost done with that and was thinking I'd probably take a look at real world haskell next.
Hutton's and RWH are really good books, but haskell and GHC have moved a lot since they were published. Hutton uses hugs and doesn't discuss GHC extensions like OverlappingInstances and NoMonomorphismRestriction, which are pretty important, and RWH was written against 6.10, I believe.
Since you can read RWH online, you should, but you should also check out the FPcomplete.com tutorials. Also Simon Thompson's 3rd edition Haskell book is good, probably the only thing I could call a gentle intro to haskell.
I didn't read the haskell paper yet, but one talk about music and programming that I enjoyed a lot is 'functional composition' by chris ford, using clojure. http://www.youtube.com/watch?v=Mfsnlbd-4xQ
It simply groups and layers simple waves until he can describe a full theme. In case you didn't saw it and have 30 minutes of free time.
It's a very nerdified take on music theory which is only popular with "computer music" researchers at universities. It would be a poor way to learn music theory in the way that musicians think about it.
I agree with you completely, but as someone who knows music theory the way musicians think about it, I find the "nerdified take on music history" to be a wonderfully refreshing view on the subject!
I really find this book an insight into how to transpose one model into another. It could apply to so much more that music theory, it's just that the author has a predisposition to music and therefore uses it as the illustrative example.
blatant self-promotion: I'm considering writing a book like this, as a product for sale, but using examples in Ruby, CoffeeScript, and Clojure (using Overtone, which is fantastic).
background: I just quite recently went to a two-week workshop on this topic at the University of Santa Cruz:
We were taught in Common Lisp but I did my projects in Clojure. The professors showed some amazing stuff, including very sophisticated harmonizers and counterpoint generators (e.g. Gradus Ad Parnassum in code, for those of you with a music theory background). I had the most hacker knowledge of anyone there, I think; most everyone else had a strong background in music but little or nothing in terms of code.
I also built a video series on making music with CoffeeScript and JavaScript, in 2012, and a very effective breakbeat improviser in Ruby, way back in 2008. I'm not 100% satisfied with the video series, but you can see it at singrobots.com if you're curious, and I did a presentation on the breakbeat improviser which was very well-received:
Kind of ancient history, though, so this next thing is more up to date. You can see a kind of rave-o-matic bassline improviser in Clojure, which is to say Clojure/Overtone code which cooks up original syncopated basslines, on GitHub:
That's one of the things I wrote at this workshop. If you're interested in this stuff I HIGHLY recommend attending next year (if they continue to run it!). I might go back for a second round myself. It was a phenomenal experience.
Anyway, to finish up that blatant self-promotion bit, if you're interested in a book like this, which you'd have to pay for, but which would give you examples in Clojure, Ruby, and JavaScript (and/or CoffeeScript) instead of Haskell, my email is gilesb@gmail.com.
As mentioned elsewhere in this thread, you seem to be expected to know a deal of music theory for this book. Are you considering a similar approach? If you explained music theory from the ground up using Clojure with Overtone, that'd be my dream book. Have you considered leanpub?
I actually helped leanpub get going, way back when, with some UX advice and stuff like that, but I have my own little system which I prefer. might be a control freak thing.
re music theory, I think I could basically write your dream book, with some caveats. my own grasp of music theory doesn't extend as far as Mozart or Miles Davis. I can say some things about Bach, thanks to brilliant work by Chris Ford, Douglas Hofstadter, and David Cope, but if I wrote a "ground up" type of thing, I think I could get you far enough to understand the majority of popular music today, but not into the intellectual stratosphere of formal art musics like jazz or modern "classical." Likewise I can't say a ton about non-Western musical forms. I can deliver a ton of specifics on electronic dance music, so that's probably what I'd do.
But, short answer is, yeah, I could sort of write that. I have to admit that it didn't totally occur to me that a book like that would be interesting. I was mostly thinking about the AI aspect (writing code which writes music) and a straightforward user's guide to Overtone (because it is pretty complicated in places). But I think what you're talking about is the way to go, or at least a good place to begin.
Definitely a beginner's thing. The hardest part when coming upon a subject is learning enough so you can get around and pick and choose what to study next. I think this niche is still starved for good starting material, so if you got the basics of music theory along with the basics of Overtone, well that would surpass my expectations of the dream book I'm looking for in this area--mainly because Overtone seems to have momentum and appears to be the right technology on which to place my bets at this point (I have considered ChucK and Impromptu before but never took the plunge.) Also a great excuse to learn Clojure.
Regarding your publishing system, is it something you can point me towards?
You don't need to know very much music theory to read this book. You do need to know some, though. If you don't know any music theory, like what chords and scales and rhythms are, it won't make much sense. That said, the book isn't worth reading.
Same here. I'm going to read this book and hope to learn more about functional programming and the Haskell language, while (hopefully) not being bothered with the kind of trivial examples that you commonly encounter in tutorials.
Now I'm hooked on Haskell! The book is a truly excellent introduction to Haskell, and I suggest that anyone who is interested read it. The book goes into some interesting topics, including proofs by computation and induction, UIs and functional reactive programming, and arrows. And it elegantly explains some of the advantages of functional programming and the Haskell language.
Just note that this book is a work in progress; he is always updating and modifying the book as he teaches the corresponding classes.