Live data from Hacker News

Alda: A music programming language

daveyarwood.github.io

51–60 of 77 posts

Re: Alda: A music programming language

#51
post #46

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 int…

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

Re: Alda: A music programming language

#52
post #39

Earlier quoted context omitted.

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 t…

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.

Re: Alda: A music programming language

#55
post #24

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 ha…

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 mus…

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.

Re: Alda: A music programming language

#57
post #30

Earlier quoted context omitted.

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 as…

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…

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.

Re: Alda: A music programming language

#58
post #39

Earlier quoted context omitted.

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 t…

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...

Re: Alda: A music programming language

#59
post #11

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 te…

> 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 like…

> 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.

Re: Alda: A music programming language

#60

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.
Post reply on HN