Hacker News new | ask | show | jobs
Music programming language Alda gets new features (daveyarwood.github.io)
63 points by daveyarwood 3857 days ago
6 comments

Related: Scott Hanselman interviews Matthew Cannon about making music with the SID...and C64 game programming magic in general.

http://www.hanselminutes.com/498/sid-chips-and-c64-music-wit...

Thanks for this. Matthew Cannon wrote one of my favorite songs, Megamusic. http://csdb.dk/sid/?id=5626
This doesn't seem much different from Lilypond. While most of Lilypond is related to typesetting, programming can be easily done in Common Lisp, with full access the TeX engine behind the implementation.
Does anyone know how this compares to ChucK?

https://en.wikipedia.org/wiki/ChucK

They are very different beasts, even setting aside the syntax. ChucK is geared towards (musical) audio signal generation, with modules for wave generation, filtering, delay, etc. It also can generate notes, but the support for doing so is fairly low level when I last looked at ChucK. Alda is more geared towards generating note data (pitch, duration, amplitude) that gets fed into sound generation gear or software.
One significant difference is you can inline Clojure code with Alda
I translated a piano score from Haydn using Alda a while back:

https://github.com/mwhuang2/Haydn

Nice to see new features being added. I might do some more pieces in the future.

This is excellent. Keep up the good work and please give a talk at the next Clojure Conj!

Any plans to use Alda in your recorded music?

Something very similar is already available and it's called ABC Notation: http://abcnotation.com/. There are tons of contributors for this. People have wrote about half million tunes in ABC. I would suggest OP creates cross-compiler from ABC to Alda. Or may be make Alda backward compatible with ABC. Or may be just contribute to ABC :).
ABC isn't a programming language, it's just notation. Alda's actually a programming language (I think it's implemented as a macro set on top of Clojure?); you can write arbitrary code in it to generate music programmatically.

Back in the 80s there was a synthesiser addon for the BBC Micro called the Music 5000 that had a similar programming language, this one Forth based; it was called AMPLE:

http://www.colinfraser.com/m5000/m5000.htm

Looks like none of the demo tracks have made it to Youtube, but there are some on that site. Classic old-school warm OPL sound.

> (I think it's implemented as a macro set on top of Clojure?)

When I see this I feel the need to ask: Shouldn't this have been built on Racket? Lisp family languages are great for these things but Racket was made specifically for building languages.

Common Music is a much more mature and comprehensive project and uses Scheme - close to Racket - and/or its own DSL. There's also the option to do synthesis.

http://commonmusic.sourceforge.net/

There's also Overtone for Clojure fans, which also does synthesis:

http://overtone.github.io/

And Impromptu, PD, Csound, Supercollider... and Max if you want something commercial.

And projects with much higher levels of abstraction like Rubato Composer.

(And many others, in fact.)

I guess there's no reason not to make something like Alda as a simple student exercise. But compared to the alternatives, it isn't any more powerful than that.

I don't know much about the project, but it may have been done in Clojure as the author works a lot with it/writes about it. I haven't come across anything about Racket from him.
No he wrote it on Clojure and my point is Racket (Close cousin) would have been a better choice since Racket is made for making languages like these.