Alda is a “text-based music composition programming language” developed by Dave Yarwood in 2012. As a software engineer with a background in classical music training, Yarwood sought for a way to link his interests and create an accessible, general-purpose audio programming language. The result was Alda, which he designed with the purpose of providing both musicians without programming knowledge and programmers without musical knowledge with a unique and simple method of composition. 

Alda allows for users to write and play music using just the command line and a text editor. The interactive Alda REPL lets the user get immediate feedback from typing and entering in lines of code in the command line. Longer scores can be written in a text file, which can then be fed to and played by Alda (also via the command line). Staying true to this purpose of accessibility, musical notation is rendered simple—notes are represented by their respective letters (a~g), octaves can be set and switched using o1~o7, rests are simply r, + and – are used to denote sharps and flats, and so forth.

There is a noticeable lack of a “live” component in Alda compared to the other coding platforms on the list. Alda is only able to output exactly what it is given, and it does so in a finalized form (in that the output cannot be edited in real time). The REPL is perhaps a little more interactive in this aspect, as the focus is on maintaining a quick exchange of input and output. Alda also does support writing music programmatically, as Alda code can be generated through programs in other languages. Even so, Alda itself does not have any innate functions that allow for algorithmic composition/live coding.

I personally had a lot of fun experimenting with Alda. Following the tutorial on the Alda website, I was able to mess around with the REPL with ease—the simple code and instant output makes it easy to test things out and understand how they work. With a grasp of all the commands and methods gained from that session, I was able to put together longer and more complex scores using multiple instruments through text files.

I should note that I do have some classical training from my years of playing cello and am familiar with sheet music and musical notation. However, I still struggle with letter notation (A-G), as I learned music through the solmization syllable system (do re mi). This complicated my efforts to make things sound the way I wanted them to and made me feel that one would have to have at least some knowledge of music theory and notation to really use Alda to its full potential. Regardless, there is no denying that Alda makes composition much less daunting in both appearance and experience to people who might not be used to reading/writing sheet music.

For my mini project with Alda, I attempted to recreate the starting portion of the beautiful instrumental for Where the Flower Blooms, a track by rapper and producer Tyler the Creator. The text file that I wrote up is as follows:

(key-sig! '(a major))

violin "violin-1":
(pp) o5 f1 | f | f | f |
f | f | f | f |

violin "violin-2":
o4 r8 a+ > f < a+ > g < a+ > f < a+ | r a+ > f < a+ > g < a+ > f < a+ |
r g > e < g > f < g > e < g | r f > c < f > d+ < f > c < f |
o5 b8 f e d+ b f e d+ | b f d < c > b f d < c |
a g f c a g f c | a g f c a g f c |

viola:
o4 r8 f b f > c < f b f | r f b f > c < f b f | e a e b e a e | d+ a d+ b d+ a d+ |

cello:
(pp) o3 c1 | c- | b6 d b d b d | b d b d b d |
c1 | c- | >b | b |

piano "piano-1":

(p) o3 r1 | f/>c-/f | <f/a/>f | f/>c-/f |
(mf) d+4./f/b/>d+  d+8/f/b/>d+ d+ <b4. | e/g-/b e/g-/b | c/f/a/>c <c/f/a/>c | c/f/a/>c <c/f/a/>c |
o4 e/g


piano "piano-2":

r1 | r1 | r1 | r1 |
(mf) o3 c2 c4. >c8 | <c-2 c- | <b/>f r8 f4 <b8 | b2/>f <b/>f |
o3 c1

And here is a short video of what it sounds like:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>