Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Alda: A music programming language (daveyarwood.github.io)
276 points by daveyarwood on Sept 6, 2015 | hide | past | favorite | 75 comments


I've had a lot of experience with various musical languages (ChucK, Csound, Supercollider, Max/MSP, PD, Faust etc.) I've even designed a few music languages for myself. For what it's worth, I did go to a music school and graduated with a bachelors degree in music, with a strong focus in computer music composition.

In the case of Alda, I'm a little underwhelmed. To be fair, it seems that the author of this software has done a good job meeting his goals. The syntax does look quite intuitive, basing it off of Lilypond syntax was a good choice IMO. I wouldn't call it a programming lanuage, and it can't do everything I want, but it seems to fit certain types of music quite well. Here is my big issue:

>In the near future, Alda’s scope will be expanded to include sounds synthesized from basic waveforms, samples loaded from sound files, and perhaps other forms of synthesis.

I don't want to say Alda sounds "bad", because soundfonts, samples, and basic waveforms have their place for certain styles of music, but it is certainly quite limiting. Considering that there are massive books written about the "perhaps other forms of synthesis", it doesn't seem like sound itself to be too big a focus.

From what I'm reading, Alda is essentially a MIDI file generator. It doesn't actually produce music, rather, it sends MIDI instructions for how to play music somewhere and leaves it up some other program to make the sounds. All of the other music languages I've mentioned can actually make music internally.

Have you ever considered using other music languages with Alda. Overtone is just Supercollider + Clojure, so I'm sure you do something similar. I imagine it would be pretty trivial to get Alda to write a Csound score, since it's basically just a text table. PD has libpd, which I've had limited success with. I might as well mention my project Soundpipe as a possible DSP engine as well: www.github.com/PaulBatchelor/Soundpipe.git


I really appreciate your input, and given your background with audio programming languages, I completely understand how you would be underwhelmed with where Alda is right now.

I do have pipe dreams of making Alda way, way more extensive than it is right now. MIDI ended up being the easiest thing to implement as a sort of proof of concept, but I am completely open to (in fact, am really hoping for) a wide array of music generators at the disposal of Alda's syntax. The next major milestone will be waveform synthesis, probably via a Java library like Minim (my original idea was to control Supercollider via Overtone, via Alda, but it seems there are too many setup issues involved, when compared to a self-contained Java library that I can use from Clojure).

Being able to generate code in other audio programming languages is also a thought I've had -- if not for Alda, then for a spinoff project. The primary thing that inspired me to create Alda was that I love the unbounded potential behind these more robust languages like ChucK and Csound, but the syntax of these languages could be greatly simplified and adapted for use by composers with little-to-no programming experience. I guess my point is that Alda prioritizes aesthetics and simplicity over being a Turing-complete language that lets you do everything you want.


Before even bringing in synthesis, my biggest request would be more control flow (beyond the goto).

Loops, if statement, variables and incrementers. Maybe a "key change" we can up X semi-tones after a keychange keyword without rewriting the notes.


> From what I'm reading, Alda is essentially a MIDI file generator. It doesn't actually produce music, rather, it sends MIDI instructions for how to play music somewhere and leaves it up some other program to make the sounds.

As a fellow musician, I'd much rather some other program be involved in actually making the sounds. My workflow generally involves defining abstract voices (usually some traditional soprano/alto/tenor/baritone plus rhythm/percussion, though I do like to branch out of that sometimes) and reserving actual instrument/voice specifics for once the composition process is done with. I feel like the various other languages out there that "can actually make music internally" are more equivalent to making a physical piano roll than writing a score that any musician or group thereof - regardless of instrumentation - can perform.

This preference probably comes from my background in the drum & bugle corps and brass band worlds, where a brass ensemble will often be tasked with playing some piece originally intended for, say, a choir or chamber ensemble or organ. I've developed an appreciation of the ability to separate composition from instrumentation, and it looks like Alda is well suited to that, at least at first glance.


I've done a lot with Pd and enjoyed the noise-making aspects. I find the composition orientation of Alda appealing, but I would want to be able to pipe in sound from something like a Pd. Any of the above inhabit this middle zone?

I particularly like the idea of visual flow programming for synthesis and markup with control flow for composition.


Alda does MIDI out, so you could probably route Alda to PD (PD is really good at handling MIDI signals).

While not graphical like PD, several musical languages make a distinction between the sound design (signal flow and modules) and events (notes, etc).

Csound is the first to come to mind, with it's MUSIC N orchestra + score paradigm. The orchestra syntax (especially the new changes in csound6) lends itself nicely to expressive sound design. Scores, however, are tedious to write by hand. Most Csounders opt to generate these using another program (which in itself is pretty cool, IMO)

ChucK does a similar thing as well, where you can write the signal chain (oscillator => filter => dac) and then you can control it using ChucK's C-like syntax. If you are interested in algorithmic composition and have a stronger background in programming, this is a pretty fun language to work in. That being said, Csound has a much better collection of sound modules.

Not exactly the answer you were looking for, but I hope you can check them both out, as they offer different approaches to computer music composition.


This was exactly what I was looking for. A survey of the available options.

I looked at supercollider before you answered and found the syntax kind of attractive. Sort of scala-ish, though maybe I am misremembering Scala from that one programming test.


Supercollider is a popular choice! If you're interesting more of a survey, I wrote a blog post a few months ago where I compared music languages by writing the same sound in each one:

https://www.safaribooksonline.com/blog/2014/11/07/making-com...


This is pretty neat. But I found it quickly getting very hard to read towards the bottom.

I feel if there's a computer interpreting some sort of language, that it should have a built in notion of the circle of fifths -- why should I give the computer absolute notes, when everything in music is so relative. Maybe viewing the notes in terms of do,re,mi would make sense, within the context of being in some key; then jumping to another key (like the dominant, or the minor version of the current key). Computers make computation cheap, which means it should be easy to think in terms of abstractions (that's how musicians think about music, then unwind those abstractions into absolute notes when writing the music down).

But then I look at the current syntax, how it attempts to be extremely compact, and worry that it won't be possible to extend to better abstractions very well.


I think this is a key thing to notice about Alda. It doesn't attempt to provide abstractions for things like keys, scales, or even measures and time signatures. It's more like writing Markdown: you already know what you want to write; it just gives you a way to represent it in a compact way and turn it into something you can hear back without having to reason too much about what you've written. I want Alda to be as close as possible to a sheet of staff paper that you can write notes on. MML is a very similar language in this regard. The idea is that it's up to the composer to write down the exact notes he/she wants, exactly how he/she wants them.

I realize this is disappointing if you're looking for something with more abstractions, but on the bright side, I think there are some great languages out there that do exactly that. If you haven't already, have a look at Music-Suite ( http://music-suite.github.io/docs/ref ) and Overtone ( http://overtone.github.io ), along with the Leipzig library, which adds functional programming abstractions for use with Overtone ( https://github.com/ctford/leipzig )


I agree. Recently we have started the project where we are trying to allow musicians to experiment with different chords & styles (http://www.songtive.com/songs/new) and displaying relative chords is one of upcoming features.


I'm not a musician of any kind, but I wanted to congratulate the creator of Alda. I believe that (almost) everyone on Hacker News admires and respects those who make interesting projects. We are a community of hackers that are interested in reading about projects like yours. I see you just created your HN account. Congratulations!

I found a few of the comments here a bit critical of Alda, but that's just the way Hacker News works. There is such a large, diverse, intelligent, and involved community on Hacker News that there are always people that have keen insights or have already tried out related ideas resulting in useful, or not so useful, observations. Inside the most critical comments may be the best suggestions.

Keep us posted on the development of Alda; here on HN, everyone is cheering you on.


I'd like to add to this discussion by mentioning the ChucK music programming language (http://chuck.cs.princeton.edu/). Here is a TedX talk by the co-author, Ge Wang, talking about the joys of digital instruments (http://www.ted.com/talks/ge_wang_the_diy_orchestra_of_the_fu...). In the talk, Ge Wang talks about leading the Stanford Laptop Orchestra, which uses ChucK to program all sorts of crazy digital instruments, and also talks about "Ocarina" iPhone instrument. Cool stuff!


+1 to ChucK!

I have a library of ChucK code here, LiCK

https://github.com/heuermh/lick


This is neat, of course. Yet, being classically trained myself and a software engineer, both for 30 years, I have yet to find an alternative music notation system that would make me proclaim I would use it.

When I look at a traditional score I see and hear the music in my mind pretty much instantly. There is zero cognitive load, at least at the conscious level. With any kind of text-based notation you have to read text.

Another point, perhaps minor, I think I can say that most of the world does not learn notes as "CDE" but rather "do" "re" "mi". That's certainly how I learned it because I did not study music in the US. Perhaps you've accounted for this?

For me paper and pencil is still the best approach and the most natural experience.

Notation is a powerful tool, in fact it is a tool for thought. I learned this in CS when I studied APL and used the language professionally for nearly ten years. Music very naturally lends itself to a sophisticated notation. I am not sure taking that away can ever produce a better outcome.

Someone more qualified on the subject can probably explain why it is our brains have evolved to be "tuned" for notation. My hypothesis is we evolved powerful image recognition capabilities coupled with high speed classification and semantic processing. We can instantly recognize shapes (predators, something flying towards you, etc.) decide what it is, access a library giving us options and decide how to react. All of that in a very small fraction of a second. Notation benefits from us having developed such capabilities in our brains.

It isn't my intent to criticize this effort. Without attempting new ideas there can never be any progress. Kudos for trying.

I'll end with a question: What would you say is the use case for Alda?


>This is neat, of course. Yet, being classically trained myself and a software engineer, both for 30 years, I have yet to find an alternative music notation system that would make me proclaim I would use it.

Emm, this is not an "alternative music notation system" meant for musicians to read music in.

It's an entry method for writing MIDI (and therefore alo getting standard notation output).

>Someone more qualified on the subject can probably explain why it is our brains have evolved to be "tuned" for notation.

They haven't. You're just used to it. Tons of self-tought musicians can't handle it, even though they're virtuoso players on their own.

Besides, the brain doesn't "evolve" in the Darwinian sense in the span of mere centuries that we have had our modern music notation. It takes tens of thousands of years for something like that -- and only if reading notation provides any evolutionary benefit to not reading it.


>It's an entry method for writing MIDI.

I'd suggest no one needs yet another text-to-MIDI system.

There are plenty of existing methods that do the job just fine - from live recording, to step entry, to any of the hundred or so text-based systems that have been (re)invented since the 1950s. (And which hardly anyone uses, because for most people - even most programmers - ASCII turns out to be a really clumsy and difficult way to write a non-trivial score.)


>I'd suggest no one needs yet another text-to-MIDI system.

Well, I need one. What are you gonna do about it?

>And which hardly anyone uses, because for most people - even most programmers - ASCII turns out to be a really clumsy and difficult way to write a non-trivial score.

Check again. There are large communities around cli tools for music, especially in electronic and experiemental scenes.


>What are you gonna do about it?

Suggest you look at abc2MIDI, which has been around since 2002:

http://abc.sourceforge.net/abcMIDI/original/README.txt

>There are large communities around cli tools for music,

Actually there aren't. The biggest community is around Max, with PD a close second, and both are dataflow languages, not clis, although they have code affordances.

Most musicians don't get on with cli's at all. (I know this because I've sometimes tried to teach them.) Judging by mailing list volumes, actual volunteer user numbers - i.e. excluding students who have to learn them on courses before giving them up - are in the hundreds of users for each of the most popular clis, as a world wide total.

Trackers are a lot more popular - but they're a different subculture.

In any case, ALDA is barely a cli for music - it's a very simple ASCII music specification with a bare bones GM runtime, and it has some important features missing. (n-tuplets or chord symbols or key signatures?)

For a non-trivial cli look at Common Music, Csound, SuperCollider, Overtone (which runs on Clojure), ChucK, Impromptu, or even Sonic Pi, all of which do quite a bit more.


Sorry, I think you missed all my points and misconstrued others.

> It's an entry method for writing MIDI (and therefore alo getting standard notation output).

Therefore it is music notation. Also, remember that I am not criticizing the work or the author. I think it's great. I simply fail to see how someone knowledgeable enough to compose music --particularly for multiple instruments-- might use this. That's why I asked the author about the use case.

Sometimes we create solutions for non-existing problems. I've done that myself lots of times.

For example, one of the cases discussed in the article is classical music. I cannot imagine anyone capable of creating scores for orchestras (or even single instruments) not having years of traditional musical training, which would include reading and writing conventional scores.

In other words, for writing anything other than repetitive game music that sounds like bubble gum you have to have years of training and experience with one or more instruments. And that, invariably, implies learning music traditionally.

Yes, there are lots of amazingly gifted musicians who can't read traditional scores. I would venture to guess these people think differently and that they also have a number of limitations because of their unconventional path in music. Yes, there are corner cases where their brain simply seems to be wired for music (cases like autistic kids). Yet, from my experience, the vast majority of self-taught musicians (I'll venture to say 99%) hit very hard walls that prevent them from developing musically and technically.

I had to spend years developing technique and musicianship on classical guitar before being able to approach music at a certain level. This meant years of serious discipline playing scales and all sorts of didactic pieces and exercises to develop the hands, timing, musical sensibilities, etc.

Reading notation is a SMALL part of what it takes to become a musician and a composer. It's something that happens over the years as you become those things. Just like a Chinese kid becoming good at reading and writing something that to most outsiders seems impenetrable.

> Tons of self-taught musicians can't handle it

That's only because self taught musicians, for whatever reason, do not put in the effort to learn the notation. It isn't because it is difficult or impossible to learn. You don't have to be gifted or have a special trait to be able to learn or "handle it".

There's nothing wrong with being self-taught. Some people want to screw around with music and instruments. And that's great. From that to say that these people are going to write scores and need a tool they can use without having to learn traditional musical notation is a huge stretch. The overwhelming majority of self-taught musicians amount to nothing and are far from being able to compose music. This is not a put-down. This is reality. There's a lot more to becoming a musician than notation. Notation, as I said above, is a minuscule part of it (yet very important).

The idea that there are people out there who "can't handle it" is preposterous. Want proof? Chinese population: 1.3 billion; India: 1.2 billion; Pakistan: 200 million; Arab speaking: 400 million; I could go on.

Between those countries/cultures alone you have about three billion people who learn, read and use languages far more complex than, say, English, Spanish, French or German. They are taught early on and even little kids have no problem learning. In languages like Mandarin they associate tones, intonation, volume, dynamics and rhythm with the symbols, combinations of symbols and even usage context.

No, claiming that self taught musicians can't handle traditional music notation is just a cop-out. Nothing other than effort prevents them from learning. It really isn't that hard at all. I suppose there could be corner cases here and there, but that's not the norm.

> Besides, the brain doesn't "evolve" in the Darwinian sense in the span of mere centuries that we have had our modern music notation.

You completely missed my point here and distorted what I said.

I did not say that our brains evolved JUST to read musical notation in a few hundred years. That would be silly. My proposal is that the evolution of our brain over millions of years provides us with unique image recognition, pattern matching and association capabilities --that evolved for other reasons, not for music-- that happen to result in us being really good at symbolic notation.

Think of a road sign indicating a left or right turn coming up. Once you learn the meaning you don't even think about it. You see the sign, pattern match, connect it with meaning and make decisions --instantly. We didn't evolve our brains in the last 100 years to recognize street signs, but we did evolve a set of capabilities --perhaps to detect predators, food, whatever-- that make us really good at communicating and receiving meaning from symbols.


What an incredibly elitist and dismissive view of music. You are aware that there are entire musical traditions that do not employ notation, right?

You're excluding tons of music outside of 12 tone temperament, not to mention plenty of electronic, jazz, and experimental music.

And you're idea of Mandarin being more complex than English, French, German, etc... I would challenge you to find a single linguist who agrees with that. I for one do not.


Oh please. Little kids learn it all over the world. If a five year old can pick it up you and everyone else can too. Elitist my ass.


I can read classical notation well enough for my purposes. I listen to Janacek, Sibelius, Delius, Schubert, Faure, Scriabin, Sorabji, Mompou, and other composers you would probably consider legitimate music. I just don't limit myself strictly to the music of dead white men.

EDIT: Let's hear some music you've created, with all your vast ability and knowledge. I'll post some of my own and we can let HN users be the judge...



Ok, I felt slighted by your presumption that I can't read classical notation.

Can we turn the discussion around? I'm legitimately curious about what music you like. My dad tried to make it professionally as a classical guitarist (a long time ago), so we may have more in common than you think in terms of musical taste.

Here's an example of music I really like that can't be adequately described by classical notation. Jan Jelinek's "Do Dekor"...

https://www.youtube.com/watch?v=PkpaDpwdSUI

Jelinek's music is actually fairly tonal but has static-y, noisy textures with arhythmic clicks and pops. I think you might like it.

That though is actually fairly traditional compared to some of the noise music and harsh metal that I enjoy. Here's another example, some blistering avant-garde instrumental death metal:

https://soundcloud.com/willhill/refulgent-shadow-sunspot


I'll say I am fairly "traditional" in my taste. From all the great Spanish composers to Pink Floyd. No taste for metal, sorry. I like some Gypsy (not necessarily Gypsy Kings) and other non-traditional string music like Greek and Middle Eastern in origin. I tried my hand at the Oud many years ago. Didn't have the time and discipline to master it. Of course, being a traditionalist also means I like all the great composers.

Love writing code to the Brandenburg Concerto and Mozart's Requiem. Back on guitar, I like just about anything recorded by Segovia, Romeros, LA Guitar Quartet (I studied briefly under a disciple of the guy who wrote Pumping Nylon), John Williams (not the Star Wars guy, just in case), Paco de Lucia, Piazzolla (not guitar but often accompanied by strings and interesting), Strunz & Farah can be interesting (sometimes formulaic). On the modern side, most of the tracks on the Gypsy Soul album are interesting.

I think this girl is going places:

https://www.youtube.com/watch?v=Qe8YgTYnjpc

I remember back when I could finally play the Lute Suite 4, it felt amazing. Not sure I ever played it that well. I was way too busy with work to put in the hours required to get really good. The more you play the more you hear small problems that require hours of practice to fix.

This, BTW, is one of my go-to pieces to explain that there are no shortcuts to being able to play like this. The only way to get there is through tons of practice and traditional practice at that. Yes, there are people who have gotten there self taught but it is a horrible struggle that does not develop proper technique, dexterity, etc. In looking through this girl's videos and the repertoire she has I just can't see a self taught guitarist getting there. It's just like gymnastics, one can learn a bunch of stuff and go to "American Ninja" and do well, but the Olympic Gymnasts only get there through a well understood traditional progression that develops various aspects of the athlete over time (lots of time). And a lot of it ain't fun at all. I once had to play scales for four hours straight just to fix a detail with a piece I was learning.

Here's the guy I mentioned I studied under. Before he decided to ruin his career and become an actor and later kill his girlfriend's rabbit and eat it. No bullshit, reality is stranger than fiction:

https://www.youtube.com/watch?v=BhqUMEIR8So

https://www.youtube.com/watch?v=NQKGEs0cshg

Incredible guitarist. Years of training. He kicked my ass every lesson. So sorry he screwed up his life.


Ah, yep, we listen to a lot of the same stuff!

Piazzolla did compose some guitar material, his "Tango Suite" for two guitars written specifically for Sergio and Odair Assad. The second movement is my favorite:

https://www.youtube.com/watch?v=TNDlnNnxfhw

Carlo Domeniconi's "Koyunbaba" is another guitar piece I've always really liked, performed here by the not-Star-Wars John Williams:

https://www.youtube.com/watch?v=TNDlnNnxfhw

And of course other greats like Villa-Lobos, Tarrega, Granados, Albéniz, etc.

I do realize the singular devotion and training that is required to reach the highest levels of classical guitar playing. It's astounding! My dad took master classes from Eliot Fisk (whose playing I don't really like that much) and got the opportunity to play in front of Julian Bream a few times (whose playing I DO love).

Thanks for that nice performance of Lute Suite #4. It was my mom who instilled in me an early love of Bach. If you've never heard Angela Hewitt or Alicia de Larrocha playing Bach, then I'd highly recommend checking them out!

And damn, your teacher is a ferocious guitar player. Both pieces are great!


Too bad the guy self-destructed.

For the longest time I was incredibly frustrated because I couldn't "play" guitar. In other words, my life was about very strict technique development and playing from scores. In the meantime, some of my friends could just grab a guitar and play great sounding rock and roll riffs. I simply couldn't do that.

Until one day I could. I mean, I could play anything. And my repertoire expanded with ease. And my friends were still playing the same ten pop songs five years later while I could approach just about anything. The difference was effort and discipline. I think the same applies to anything, be it music, engineering or business.


I approached learning electric guitar similarly, with heavy emphasis on technique. Early on I really wanted to be able to play a jazz fusion style a la Allan Holdsworth, John McLaughlin, Shawn Lane, etc. I got derailed for many years by a wrist injury, which has since finally healed, but in the meantime I got very into making electronic music. I'll never be the greatest guitarist ever but I'm good enough to incorporate some of my improvising into the electronic music I make and that's been really satisfying.

I agree that the same discipline applies to engineering, coding, etc. but the end result, creating beautiful music, is a unique feeling for me. It just seems more magical somehow. Good luck on your musical journey!


>Therefore it is music notation

Only in that its a notation for music ENTRY. Not meant to be used in the same way as the traditional music notation that you wrote about ("When I look at a traditional score I see and hear the music in my mind pretty much instantly").

That is, it's not meant to be read by players as is, which is the whole point of traditional music notation. It has a very specific, computer related role -- it's the equivalent of clicking on buttons in some GUI based notation software.

Your subsequent comment makes it evident that you haven't gotten what this is meant for:

>For example, one of the cases discussed in the article is classical music. I cannot imagine anyone capable of creating scores for orchestras (or even single instruments) not having years of traditional musical training, which would include reading and writing conventional scores.

This is NOT meant as a replacement for classic notation -- to relieve people from having to read and write it. It's not meant to be printed and handed to musicians as is.

This is for people (including people who KNOW notation), to enter that data in a textual, CLI way, instead of clicking the mouse or doing step entry in Finale. Or, similar to how people enter notes in "trackers".

>That would be silly. My proposal is that the evolution of our brain over millions of years provides us with unique image recognition, pattern matching and association capabilities --that evolved for other reasons, not for music-- that happen to result in us being really good at symbolic notation.

That doesn't make classical notation any particular fit for our brains. It was developed ad hoc, neither organically nor after actual experiment and there's no study proving it's "best" music notation we can have. But that's another story, as, again, this tool is not meant to replace traditional music notation.


Something I've read about Irish folk music, is that putting it into classical notation is awkward. It's precise about what should be flexible, and lacks notation for things that are important. Somebody could play it precisely and professionally off a sheet and get it wrong.


Yes.

Our current notation is just an abstraction created for Western Music -- and specific formal styles at that. It's not even capable of delivering all the nuances of a classical (e.g. romantic period) piece, much less something like Jazz.


> why it is our brains have evolved to be "tuned" for notation

I'm not sure they are tuned--is there any reason you say this beyond personal experience? Music notation is noriously difficult to learn for most people, and many non-classical musicians avoid it entirely.

Maybe it's just self-selection. Those with a natural gift for reading are likely to become classically trained musicians, and those without it are likely to find other means of creative expression.


i think pianists, string, woodwind and guitar players look at scores differently, they visualize them and start recruiting motor skills ahead of time.

WHen i look at a Bach score as a pianist, i just kind of flow thru it, if i see it as a guitar score, i think of the simplest fingering patterns (CAGED patterns are the simplest framework), a woodwind player wants to pinpoint the large intervals and octave breaks and other difficulties where intonation and tone become tricky

(whereas with somebody laying out a c++ project or studying Baby Rudin (real analysis), you can't explain it in terms of muscle memory


I guess the OP just got used to reading notation and now thinks it's natural for him to read notation.


> I'm not sure they are tuned

I think you took what I said too literally. I explained that my hypothesis was that --over millions of years-- our brains evolved excellent pattern matching and semantic association capabilities for various reasons. For example, quick recognition of predators, food, danger, falling rocks, sounds, language, etc.

I am proposing that it is this capability --evolved for reasons having nothing whatsoever to do with math, music or other notation-- that makes us really good at using notation to quickly communicate and receive a range of things.

A road sign can communicate a turn or the potential for falling rocks or danger with a simple symbol. I think our brains evolved capabilities that just happened to also make them really good at notation, hence my use of the term "tuned". It isn't that our brains are specifically tuned for musical notation or that a particular gift is required for this, we are good at this due to millions of years of evolving a set of capabilities that make us good at it because they are, for lack of a better term, symbiotic.

> Music notation is noriously difficult to learn for most people

That is simply not true. Don't equate not making an effort to it being difficult. Five year old's are learning musical notation at school every day. It's easy. You just have to put in the effort AND practice.

> and many non-classical musicians avoid it entirely.

Because they don't want to put in the effort. I know many. They simply have no interest in doing the work. And, in most cases, they suffer for it because they can't advance past the stage they are on. Yes, musical prodigies who can't read a single note do exist. That's a fraction of a fraction of a fraction of a fraction of 1% of the billions who approach music at any level. In other words, an aberration.

Coding is easy. But it requires effort. People who can't code (my wife, for example) are not missing a gene or neural connections. They either lack the interest to learn or don't want to put in the requisite work. To say that only certain people can learn to code is just plain wrong.

> Maybe it's just self-selection. Those with a natural gift for reading are likely to become classically trained musicians

Reading traditional musical notation does not imply one is classically trained. My three kids can read notation just fine and play piano, saxophone and guitar. They are not classically trained. They are learning about music in a fun and relaxed way both in school and at home.

And all of it is firmly rooted in having use of a notation that enables them to read, write and communicate music. The band at the local middle school has a bunch of kids who communicate through traditional musical notation, some having never had any music training at all.

If a five year old can do it there's no excuse for an adult not to unless there's something fundamentally wrong at some cognitive level that truly prevents them from learning notation. I would suspect such a person would have far serious problems in life than not being able to read music.

Every single frustrated musician I've ever met has exactly the same problem: can't read music and lack of discipline to develop technically and musically. Notation is the foundation upon which the rest builds because, historically, this is how music has been taught and this is how you communicate and read everything from the first scales you play up to the score for the Brandenburg Concerto's.

I don't have a problem with alternative notations. Many have been tried. Whether they are for data entry or performance is semantics. It's music notation. And none have yet proven to do a better job than traditional notation. I'm happy to be wrong on this point but if you've ever read an orchestral score I challenge you to do better with any other notation. Pretty tall order.

Someone mentioned forms of music that don't quite fit traditional western notation. Well, it's a given, there are edge cases that don't fit traditional solutions. I say, live long and prosper. Use whatever works for that type of music. That means absolutely nothing when it comes to what we are discussing.



This is awesome, I've dreamed about something like this for a long time. Cool that it's done in Clojure too :)


I also think Clojure is a great fit.

I've had some really good results with sample-based algorithmic composition, so I'm really looking forward to this:

"In the near future, Alda’s scope will be expanded to include sounds synthesized from basic waveforms, samples loaded from sound files, and perhaps other forms of synthesis."


Wonder if VST support is a possibility. Also things like automation, for changing parameters like volume over time.

It's easy to see how a programming language can be a good fit for notating certain kinds of music and allowing playback of it. Seems to me like the challenge is to go beyond lining things up neatly to a grid and introducing any kind of "looseness" to the music.

Edit: Then again, people do great stuff with trackers, so I'm sure a programming language can be a great fit for some kinds of music.


Definitely!

Though you may already know, aligning notes to exact subdivisions of the beat is called quantization.

https://en.wikipedia.org/wiki/Quantization_%28music%29

Quantized music feels noticeably less organic and lively, to me at least. Audio sequencers like Linux's Hydrogen give you the capability to mess with "lead" and "lag", but it must be done individually for each note and so is fairly tedious.

I've used the Python module pydub along with a random number generator to set samples slightly ajar, but, while it helps, a purely random approach doesn't capture how human performers implement lead and lag.

I absolutely recommend pydub as an easy way to manipulate sound files.

https://github.com/jiaaro/pydub


Thanks for the info, pydub looks nice! And I suppose that when you have music represented by a text file, as is the case in Alda, you can then use other programs to operate on the text file (for example, you could probably write a script to vary note/rest lenghts a bit using the quant attribute).


I get the thinking behind this, and seems a neat little tool. However, I can't help thinking that the problem the author cites with modern GUIs being too distracting to use is more likely to be solved long term by the likes of StaffPad[0]. This allows you to physically write your notation on a blank digital canvas, meaning the only difference to writing on a blank sheet of physical paper is the tactile contrast of using a stylus rather than a pen/pencil - something that is improving all the time.

[0] http://staffpad.net


Disable non-error debug messages (https://github.com/alda-lang/alda#logging):

export TIMBRE_LOG_LEVEL=error

alda repl


This is a pretty advanced language, i like it much!!! I want to share what i was experimenting with lately... It´s a very easy language to produce music in the form binaural audio, it helps me to sleep with my insomnia. Sbagen is the name and you create .sbg files. http://uazu.net/sbagen/ Idoser is based on the same source Use this here to create or edit .drg files from or with .sbg files. http://binaural-spot.blogspot.de/2010/08/drg-author-installe... There is also an online converter for .drg files to .sbg and the .sbg files actually show you the source, you can create wav files but they are very large.. Use the .sbg files and in case you want this mobile, here is an android version that can handle these kind of files: http://www.normalesup.org/~george/comp/binaural_player/


Interesting ! Not that far from the new Common Lisp based language OMN brought by Opus Modus which was released early this year http://opusmodus.com/omn.html


Is there some "IDE" for it already or is this going to be my new side project? :)


The idea is that this doesn't have (or need) an IDE.


Seems like a sublime text language syntax highlighting file would be more than adequate here.


Author mentions IDEs like Guitar Pro, etc. He referred to them as "distracting."


And I understand that. What I meant is something completely different - like a set of autocompletion rules for chords and scales, "debugging" abilities (like selectively playing particular voices or parts of song) and other stuff that makes programming... err, composing in Alda easier.

Obviously reusing some already existing text editor, like Vim, Emacs, Sublime or Atom will be the way to go when creating such "IDE". I definitely didn't mean Guitar Pro/TuxGuitar with Alda as a backend, that would be kinda pointless.


I was about to say this, exactly! I could easily see something like this kind of functionality in the form of a Vim plugin or Emacs mode.


google emacs


I hope there isn't.


This is pretty cool. Good work!

Couple things come to mind.

1. Is there a way to play a selected segment of the music rather than the whole file? While composing, replaying a segment over and over again is quite common. Don't want to start from the beginning every single time.

2. Is there a way to produce music sheet (PDF or PNG) from the source? There would be really useful.

3. Is there a way to format the notes into measures? I know the | is optional and ignored. Can the program do reformat and automatically divides the notes into measures?

4. Emacs integration would be great. Using Emacs to edit. Do ^X^E to execute the program to play the selected segment.


Thanks for the kind words!

1. I do have plans to implement start and end points for playback, either in the form of minute/second markings or the already-implemented "markers" you can place in an Alda score. I agree this is a crucial feature -- it will be very useful when working on one small part of a large score. Eventually you should be able to do something like: "alda play --file my-score.alda --start 0:30 --end chorus"

2. Not yet -- I'm hoping we'll implement a way to generate LilyPond ( http://lilypond.org ) typeset scores from Alda code.

3. My philosophy on bar lines (and the reason why Alda ignores them as if they were comments) is that they're essentially "invisible to the ears," and so they don't serve much purpose except as a way to visually organize your score file. However, in order to generate sheet music (e.g. by generating LilyPond code), we will probably end up making them significant to the parser after all. I can see how it might be useful to think of your score in terms of measures, e.g. "play a few eighth notes, then rest until the end of the measure," so I'm certainly open to the idea of implementing measures.

4. I agree, although I'm a Vim user :P


4) Just wrote https://github.com/MadcapJake/language-alda for Atom. (Atom has the great https://github.com/atom/vim-mode package and for the parent, though it seems less complete, there's https://github.com/avendael/atomic-emacs)

Also in regards to the parent's interest in having a keybind to autoplay alda files, there is https://github.com/lsegal/atom-runner and with a short snippet in your config you'll have `alt-r` recognize alda files and play them!

For the language-alda package, I'm working on integrating autocomplete support for instruments, markers and attributes. I think I can also add support for atom-runner directly through the language package too.

Between playing around with the langauge and getting tooling support in Atom, my whole Sunday was completely swallowed up! :P


Can this language produce an actual grand staff notation, e.g. in a pdf format?

I'd like to use to write down compositions, but it would need that feature to be useful. If I could write down compositions in Vim that would be killer.


Not yet... but it's on my to-do list. At some point, we will hopefully be able to generate LilyPond ( http://lilypond.org ) scores from Alda code.


New to this stuff, but doesn't abc already cover this same ground? http://abcnotation.com/


This looks great, I'll definitely be doing some experimenting! Any way to save the output to an audio file when you're done rather than just hearing it through Alda?


Not yet -- I've had this feature on my mind for a long time, though. It's pretty high up on the to-do list.

This is far from ideal, but as a workaround, you could set up a sound recording program like Audacity to record system audio output and play your score.

Hopefully in the near future you'll be able to do something like "alda play --file my-score.alda --output my-file.wav" or something to that effect.


It's written:

> o4 c++++-+-+-+

> The above is a really obtuse and unnecessary way to represent an E (a.k.a. a C-sharp-sharp-sharp-sharp-flat-sharp-flat-sharp-flat-sharp) in Alda.

This is equivalent to c++++, c 4-sharps. This is NOT e, as far as I know.

See https://fr.wikipedia.org/wiki/Comma_syntonique and how semi-tones are built.

I'm thus wondering how things are built behind the scenes..


looks a little bit like lilypond


Not much difference insofar as you type characters into a text editor & present the result to be executed. I guess I'm missing something but I'd like to see what it does that Lilypond does not already do brilliantly especially in combination with something like Frescobaldi.


Cool, but the tagline is redundant and awkward:

> a music programming language for musicians

I would suggest dropping one of the musics: "a programming language for musicians".


Think that it is fine just the way it is. A "programming language for musicians" could just as easily be BASIC or something, while a "music programming language" could be aimed exclusively at computer scientists.


Besides this being rad - you can see in the Alda repl screeny that the author has earthbound behind it. I love that game.


Haha, good catch! I've been madly in love with Earthbound ever since it came out. Playing it was a life-altering experience.


Me too. Very, very good game. It's the only real RPG I connected with, and one of the few games that I hold close.


Do you happen to have a demo link so we can hear what it sounds like?


I installed it, but why is my console filled with debug output?


I just deployed a new version of Alda earlier this afternoon (alda 0.4.5) -- it should update for you the next time you run Alda. This new version has better default behavior for logging, i.e. not dumping a bunch of debug logs onto your screen :)


Getting "Illegal Argument Exception" when running it.


well, no sound from scratch on linux, clojure-1.7 and icedtea jvm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: