Show HN: Create Music with R
github.com
github.com
Found it in profile area of https://github.com/flujoo .
HN post of his other work ch0p1n in 2022: https://news.ycombinator.com/item?id=30321645
It wasn't exactly a hit, but then again promotion is the hard part. I'm finishing a lengthy write-up on the process, which focuses more on harmony (specifically freestyle just intonation) rather than programming. I believe the programming portion is highly personal, so it's more interesting to share general composition techniques that apply well to algorithmic music.
Executable music is also an established genre in the demoscene, but the music is typically written in trackers rather than with code. The extremely small intro categories do have fully algorithmic music, which can be really inspiring. That said the size limit often forces the sound into a "bytebeat" style, so I'd say size-unrestricted algorithmic music ends up being a rare genre that's not even found in the demoscene (as far as I know! I'd love to find more music like this).
https://glicol.org/demo#themodel (don't forget to change line 14 after a while ;))
music <- Music() + Meter(4, 4) + Line(...) + (Line(...) + Articulation(">", 1))
work? add(Music(), Meter(4, 4), Line(...), Line(...), Articulation(">", 1))
Edit. Found the definition in the source [1]. I think the approach is similar to Go's approach to method definition [2]. Methods are defined on types, i.e., methods are functions with special receiver arguments. The infix notation instead of prefix notation is just syntactic sugar.[1] https://github.com/flujoo/gm/blob/69d639be86b0cef80d815a73a6...