by HansardExpert on 1/28/24, 7:29 PM with 83 comments
by semi-extrinsic on 1/28/24, 9:58 PM
https://www.vitling.xyz/toys/acid-banger/
Also of note: all the demos open to a silent "click to start" screen, and all the autoplaying videos are muted by default even, like on TFA.
by jameshart on 1/28/24, 10:44 PM
There's enough detail there that you can take those instructions and reimplement your own version of it, and you'll end up with essentially the same 'piece of music', but certainly a different interpretation of it. Because while the score lays out some details precisely, it leaves other choices less clear. What does 'all inversions' really mean when enumerating chords? Does it include open, spread voicings? What durations should we choose from for our random waveforms? How short is 'short' when deciding to repeat? And of course, what wave synths should you use, and how should you modulate them?
All those are similar to the decisions a traditional instrumentalist makes when interpreting a sheet music score for performance - here, a generative music coder can follow this 'score' and produce a program that represents their own interpretation of the piece.
Coding it up in Sonic Pi (https://sonic-pi.net/) was a fun exercise, and I feel like I was able to produce something along the lines of what the composer intended. It carries the same kind of mood that the recording in the video has. But it's my own 'performance' of the work, if that makes sense (even if it's actually Sonic Pi 'performing' it at runtime...)
All of which got me thinking about the relationship more generally between specification, and implementation. Considering different programmers' implementations of algorithms as individual 'performances' of scores from the overall design - and then thinking about developers building elements of a larger system architecture as individual performers working to deliver their part of the performance as part of a band or orchestra. Some groups, maybe they're directed by a conductor-architect; others maybe are improvisers, riffing off one another and occasionally stepping up to deliver a solo. And some are maybe solid session performers, showing up and delivering strong but unflashy performances to a producer's specification.
So overall, a nice meditative coding exercise for a Sunday afternoon, and a shift in perspective. Thanks for sharing it.
by krick on 1/29/24, 3:37 AM
I tried to research something across these lines before, and I cannot quite recollect what exactly was the problem with the books I came across on my own (I think it was mostly just too basic to be useful), but somehow I never got any "general" understanding of "how music works". Even though I've got some very basic solfeggio training long time ago (admittedly, I was too young to ask questions I now find interesting and understand what's the purpose of what we were doing there, but at least I can read the notation).
by mrb on 1/29/24, 12:23 AM
I use it myself on a Pi 4 to control a WS2815 strip of 466 pixels on the fascia of my house, for holiday decorations.
by sgt-henderson on 1/30/24, 2:16 AM
Go check out the Wikipedia page on Neo-Riemannian theory for more details, but here are a few key facts about P, L, and R: For any chord x, then if x is major, then P(x), L(x), and R(x) are all minor. If x is minor, then P(x), L(x) and R(x) are all major. P, L, and R are all inverses of themselves, so that P(P(x)) = x, and so on for L and R. It's possible to reach any major or minor chord from any other major or minor chord by some sequence of P, L, and R transformations. For example, from C major, applying L then R gets you to G major; applying R then P gets you to A major; and applying L then P gets you to E major.
Hopping around via Neo-Riemannian transformations are a quick way to use smooth voice leading to get to a "remote" key center (i.e., one that doesn't have many scale tones in common with the key you started in), but I was surprised when listening to the piece how (relatively) stable the harmony seemed. What's interesting here is that because of the way the algorithm is constructed, P transforms are much less common than L or R transforms (or just staying with the same chord) -- and crucially, P transforms are a vital ingredient in quickly moving to remote keys. By my rough calculations (which assume the Markov process has reached steady state and ignore the limits on min/max pitch), only 1/27th of all chord changes are P transforms. It also turns out that in steady state, 7th chords are more common than simple triads by a ratio of 16:11.
by j1elo on 1/28/24, 8:55 PM
couldn't this all be done only with the Raspberry Pi, using all those GPIO pins that it has? Feels like it is being underutilized and the project ought to be simplified to a single board (a single mains connection needed would be a very nice consequence too)
by crawsome on 1/28/24, 8:34 PM
And for someone to have a video demo, it just makes it better. Lots of code projects die before they take off because the author only described it with a wall of text.
by whitepaint on 1/28/24, 7:49 PM
by Lucasoato on 1/28/24, 8:23 PM
by jacquesm on 1/29/24, 3:05 AM
by yobbo on 1/29/24, 10:22 AM
Find all the chords from the set that have all but one note in common with the playing chord.
Choose one of these at random.
Go back to 3 and repeat forever.
This means a fairly small group of chords. Not sure it covers more than one key.by psynister on 1/28/24, 10:10 PM
by fb03 on 1/28/24, 8:16 PM
by danwills on 1/29/24, 9:40 AM
by woliveirajr on 1/29/24, 12:50 AM
by ehnto on 1/29/24, 3:24 AM
It is breif, but weird. Anyway, this is a really beautiful display, it's branches feel closer to tendrils, and I imagine if the music had picked minor chords predominantly this would be an experience closer to my negative view of trees. Thankfully the power of music prevails.
by paraph1n on 1/29/24, 6:27 AM
by blackqueeriroh on 1/28/24, 8:09 PM
by HansardExpert on 1/28/24, 7:29 PM
WS2812B / Arduino / Raspberry Pi / C++
by ruined on 1/28/24, 10:12 PM
by uwagar on 1/29/24, 5:00 AM