Hacker News new | past | comments | ask | show | jobs | submit login
Skoar – A musical programming language (github.com)
49 points by cidermonkey on Sept 7, 2015 | hide | past | web | favorite | 22 comments

I am by no means, an expert in music, I can't even read it, so forgive me if this comes as a silly question, but why this syntax? It looks very foreign to me, but at the same time, being a programming language I would have expected something more... verbose? is there any practical reason to for something like this?

this is a live coding language, so trying to achieve what tidal and overtone are. EDM type genres have recognizable formulas for the drum and bass, and then for pads and leads above so all these environments are trying to abstract over patterns at different levels of the music.

i can't find a real tutorial, but there's lots of material to look at: https://github.com/overtone/overtone/wiki/Getting-Started

and this is the 1st ref: http://akustik.hfbk.net/publications/LiveCodingInLaptopPerfo...

in this page: https://en.wikipedia.org/wiki/Live_coding


tidal: http://yaxu.org/tidal/

disclaimer: I've been playing synths a fair amount and i have a hard time understanding a lot of stuff on the overtone cheat sheet

I dunno, contrast it with ABC notation for something very much less verbose: http://abcnotation.com/examples

It's just a bit of markup over ASCII abstractions of musical notation. It looks foreign because you didn't study the syntax (just like <?php ?> would look foreign to anyone not familiar with PHP) and don't know the musical conventions.


- Notes are letter notation[0] plus ASCII abstractions over duration symbols[1].

- Tempo assignment is just "130 => )", which means there are 130 ")" (quarter notes) per minute.

- |: foo :| repeats, which looks like the repeat symbol[2] in a score.

- Dynamics are the same as traditional notation[3], with an alternative level notation (which looks just like a digital VU meter[4]).

- Conditionals are pretty much the ternary operator.

There's not much else going on. Compare with MML[5] which looks foreign even if familiar with musical notation.

Of course you could ask why traditional music notation is so dense (probably more than this, compare letter notation "Cdim" with how you'd write it in a staff[6]).

Musical notation is dense because you have to convey a lot of information in a very small space (less switching pages while performing) and, well, because when you have to write by hand you become lazy (just like copyist monks had their own shorthands).

Sometimes the notation is also better at conveying information: in the "Cdim" example, when laid out in a staff, I can quickly see it's composed of a bass note C plus 2 triads, with both 3rd and 5th being flat, which makes it a diminished triad chord. You can invert the chord (take the bass note up one octave) and it'd still convey lots of information, while letter notation starts to get complicated (Cdim/Eb, which isn't that easy to read since you have to calculate in your head that Eb is the 3rd therefore the chord is inverted once).

Fortunately we humans are very good at reading notation as soon as we're familiar with it :)

[0] https://en.wikipedia.org/wiki/Letter_notation

[1] https://en.wikipedia.org/wiki/List_of_musical_symbols#Notes_...

[2] https://en.wikipedia.org/wiki/Repeat_sign

[3] https://en.wikipedia.org/wiki/Dynamics_%28music%29

[4] https://securethumbs.ebay.com/d/l225/m/mcuRjwssh-op30lD6M7as...

[5] https://en.wikipedia.org/wiki/Music_Macro_Language

[6] https://upload.wikimedia.org/wikipedia/commons/7/79/Diminish...

I've seen so many "music programming languages" recently that I'm getting really quite confused about which one was which and does what. Has anyone done a comparison, or even just have a list of links?

I fully agree. We saw one here yesterday (my timezone), actually.

In that thread, another HN commenter posted this:


I used ChucK in college, and considering its functional use in performance art of many kinds, I'm seeing a lot of these proverbially "reinventing the wheel" in different syntax....ad nauseum.

Where I see the real potential is using the native language of DAWs (digital audio workstation) like Protools, Ableton, and leveraging their native languages to write new scripts and library extensions for hardware.

> Where I see the real potential is using the native language of DAWs (digital audio workstation) like Protools, Ableton, and leveraging their native languages to write new scripts and library extensions for hardware.

Most of these DAWs are written in C/C++. In many cases, things are really closed down (looking at you ProTools), so its difficult/impossible to write extensions unless you intend to sell it commercially.

Renoise has a pretty good API in Lua for building plugins, which I thought was kind of neat.

Ableton has Max4Live which I think counts for an extension language.

As far as "native" code goes, I've been working a library of high quality DSP modules that you can use to build plugins called Soundpipe:


There's a wikipedia page with some of the more established ones: https://en.wikipedia.org/wiki/List_of_audio_programming_lang...

Keep in mind there are actually two domains in music: instruments (sound synthesis) and orchestration. Both Skoar and Alda (which was linked yesterday) are only orchestration languages.

I've been researching about this and narrowed down by these criteria: (1) Modern and maintained (2) Open source (3) Multiplatform (4) Supports live coding (5) Not MIDI-only output (6) Text-based (7) Not Java (sorry JSyn :P)

For me live coding is important since I prefer to compose music in an exploratory fashion. Also, live performances are cool. Read more about live coding and resources in http://toplap.org

The list in no particular order (beware of the brain dump):


## Overtone (https://overtone.github.io/)

The coolest kid on the block is actually a frontend to SuperCollider.

- Clojure based.

- VJ-ready. Integration with Processing via Quil (https://github.com/quil/quil) and GLSL shaders via Shadertone (https://github.com/overtone/shadertone).

- Lots of tooling: https://github.com/overtone


## SuperCollider (https://supercollider.github.io/)

- Object-oriented functional language (similar to Smalltalk/Ruby/C/JS).

- Basically Overtone minus Clojure minus VJ plus IDE.

- Client-server architecture (which is what allows Overtone to use it as a backend).


## Sonic Pi (http://sonic-pi.net/)

- Ruby DSL + IDE.

- Built for Raspberry PI (but runs anywhere SuperCollider and Ruby are available).

- Another frontend to SuperCollider.

- Designed to be suitable for teaching children. Teacher resources available (http://www.sonicpiliveandcoding.com/ http://www.raspberrypi.org/learning/sonic-pi-lessons/)


## Extempore (https://github.com/digego/extempore)

- Scheme-like.

- Supports both audio and graphics.

- Defines itself as a 'cyberphysical' programming environment (http://dl.acm.org/citation.cfm?id=1869526).


## ChucK (http://chuck.cs.princeton.edu/)

- Real-time sound synthesis and music creation (real-time meant it used to take a real amount of CPU time in non-RT kernels, not sure if it's changed).

- Time-based, concurrent programming model (they call it 'strongly-timed').


## Fluxus (http://www.pawfal.org/fluxus/)

- Racket based.

- Full-fledged environment.

- Defined as 'a 3D game engine for livecoding worlds into existence', though it supports sound too.

- Doesn't seem to be actively maintained (most recent release dates from April 2012).


## Nyquist (https://www.cs.cmu.edu/afs/cs.cmu.edu/project/music/web/musi...)

- (Still researching...)


## Csound (http://www.csounds.com/)

- (Still researching...)

- Live coding added in a recent version.

- Orchestration and synthesis are separate languages.


## Tidal (http://yaxu.org/tidal/)

- Haskell based.

- Seems to support audio and graphics (defines itself as live coding of patterns).

- (Still researching... I just came to know it in a link here.)


## Skoar (https://github.com/sofakid/Skoarcery)

- Another SuperCollider frontend.

- Only orchestration, though I guess it supports different instruments created in SuperCollider.

- Doesn't seem to support live coding? (Added to the list until I research more.)



I just found these in the TOPLAP wiki (and Googling around) but had no time to comb through them. Listed in no particular order:

- https://github.com/edne/pineal

- https://github.com/createuniverses/praxis

- http://charlie-roberts.com/gibber/about-gibber/

- https://github.com/LuaAV/LuaAV

- http://hyperyarn.criticalartware.net

- http://www.renickbell.net/conductive/doku.php/

- EXTRA: Live coding light shows https://github.com/brunchboy/afterglow

Several months ago, I compared musical languages, writing essentially the same thing in each one:


I also wrote one myself:


Thanks! I ended moving the information to a Gist[0] for easier updating as I research more (hope to eventually settle for a few environments and actually try them). I'll check your links ASAP and add relevant info to the Gist.

Sporth reminds me a lot of https://forthsalon.appspot.com/ They'd make great partners :)

[0] https://gist.github.com/alvaro-cuesta/dc714c06a8e672bebd90

I got a lot of inspiration from forthsalon.

It was only after I built Sporth that I realized how expressive a Forth can be for creative coding.

You might want to check out Alda aswell, Clojure based (like Overtone), released only a few days ago I believe.


Thanks :) I mentioned it in the post though:

> Both Skoar and Alda (which was linked yesterday) are only orchestration languages.

I'm also interested in instrument generation and, while Skoar plugs into SuperCollider, Alda seems to be specifically MIDI output. You could probably hook Alda -> MIDI -> synthesizer though, but you'd still have to program the synthesizer in a different language, which kind of defeats the purpose.

Not going to lie, this seems like a terrible language for musicians to compose in. Maybe I need time to get used to it, but it looks more like an esoteric programming language to me. The amount of brackets needed for it to work is just begging for typos.

Furthermore, the syntax doesn't feel "readable" like a music score. The symbolic notation doesn't click for me. I'd like to be able to hear what is going on in my head, and this just doesn't seem designed for that. By contrast, Alda (a musical language posted yesterday) is very readable to me as a musician. ABC notation and Lilypond were very good sources of inspiration.

There are some things I like about Skoar. The use of a really good audio engine to produce the sound wins in my book (there doesn't seem to be any obvious way to control the sound itself, though.) I think the way you express dynamics using hashes is pretty novel. (May want to consider using decibel scaling instead of linear scaling.) I like the fact that you have incorporated programming elements like conditionals, loops, and variables.

Both Alda and Skoar basically focus on conventional western music notation, which is perhaps the most boring part of computer generated music. Sound design plays much greater importance, and it makes me sad to see no focus on that whatsoever (Sound is uh... the part that actually makes the music).

I'm hesitant to share this on HN because it's not done yet, but I too, made yet another musical language:


Here's the code:


And here's what it can sound like (everything minus the outdoor ambient sample is synthesized in Sporth):


I'll watch that repo, i've been thinking of going down the maxforLive rabbit hole. never heard of soundPipe before.

The tl'dr to these languages/dev environments/whatever is that they attempt to give you textual control over some subset of what a DAW (ableton or FL studio or logic Pro) can do, so that you can compose/perform/synthesize on the fly. I think all of these would be hard to understnad for somebody that hasn't actually read a manual for, say, Ableton, or some hard synth or VST that has a lot of sound sources, LFO/envelope/delay/effects routing matrix.


there's another notation/synthesis framework that was bandied about, audioKit

https://news.ycombinator.com/item?id=9903760 https://news.ycombinator.com/item?id=8574558


also, one of those threads had a reference to music-N, which is a good (and short!) historical reference page: https://en.wikipedia.org/wiki/MUSIC-N

I'm actually the creator of soundPipe, so it makes sense that you probably haven't heard of it.

Sporth is definitely a language for people with experience with modular synthesis and digital signal processing. People with experience in SC or Csound should feel pretty comfortable (in fact, many Sporth modules utilize algorithms taken directly from Csound opcodes)

Soundpipe is a library which takes a very modular approach as well (sporth is a language built on top of SoundPipe).

I know the AK guys quite well, and we're actually working together to get Soundpipe working with it.

People interested in how MUSIC-N languages work should look at Csound, which is a direct descendent of the MUSIC-V language. Their syntax is very similar, and many MUSIC-N files have been ported to Csound.

check. I'm looking for rubber bands, like on my mopho and ms2000 i like to rubber band the filter, resonance, key tracking and other pots/encoders together, so... exponential/log and inverse rubber bands.

What exactly is a "rubber band"?

it's just a pot/fader/encoder that can send lots of CC's at the same time

I have never used it before, but brackets, parens, curly braces in this language don't act like they do in a C-like language.


))) - whole

)) - half

) - quarter

] - eighth

]] - sixteenth

]]] - thirty secondth


}}} - whole

}} - quarter

} - quarter

o/ - eighth

oo/ - sixteenth

ooo/ - thirthy secondth

I don't see a way to do triplets with this notation.

Applications are open for YC Summer 2020

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