I help run the hackathon program at Clio, and this quarter’s hackathon theme was “Built with AI”. The intention behind this theme was to help our developers get more experience interacting with and optimizing their usage of AI-assistive tooling. When I sat down to think about a good project, I decided I’d tackle a piece of problematic UX in one of our products, and to help me do that, I’d use Cursor and some well-crafted prompts.
Unfortunately, it turned out I was thinking a bit too small, as by the end of day one, I’d already finished that project and still had one-and-a-half-ish more hacking days ahead. I’ve been listening to a few dungeoncore albums lately and the overall genre of dungeon synth has grown on me. It’s dark, ambient, and drone-y, with sparse melodic progressions and atmospheric sound effects. It got me to thinking—how hard would it be to use AI to help generate the foundations of a track in an editable way that I could then mix and layer on top of? Could I make a serviceable EP in say… one day?
So I gave it a shot, and (with apologies to the inimitable Witch Bolt), here are the sonic fruits of that labour:
I’m pretty happy with how it turned out, and the process was fairly straightforward. I used Sonic Pi as the primary DAW (though I later edited in some sound effects and a bit of guitar to fill things out in Logic).
My workflow started as simply describing some parts of the mood and structure of a track to the LLM in Cursor (I mostly used the o3 model from OpenAI) and asking it to create a basic version of the track in code. I’d then paste said code into Sonic Pi and adjust things manually to get closer to the sound that I wanted (pitching things up and down, changing key, tempo, instruments, etc.).
After I had that basic structure down for a few tracks, I upgraded the flow with this MCP, which allowed me to “stream” new code directly from Cursor:
live_loop :code_runner do
use_real_time
code = sync "/osc*/run-code"
begin
eval(code[0].to_s)
rescue Exception => e
puts "Error executing code: #{e.message}"
end
end
By adding this `eval` live loop to the track code, I could audition new pieces of code directly in Cursor and then keep the ones I liked and paste them into the editor. This allowed me to iterate a bit faster on new sounds and instruments.
That got me pretty far, but as it was still all fundamentally machine generated, it was missing a bit of that human touch. So I plugged in my OP-1 and created some live loops to listen to the MIDI `note_on` and `note_off` events and control real time notes accordingly:
# OP-1 -> Sonic Pi synth bridge
live_loop :op1_on do # key-down
use_real_time
note, vel = sync "/midi:op-1*/note_on"
kill voices[note] if voices[note] # defensive – clear any stray
voices[note] = synth :prophet,
note: note,
sustain: 99, # long sustain, will be cut on release
release: 0.05,
amp: 1,
amp_slide: 0.3
end
live_loop :op1_off do # key-up
use_real_time
note, _ = sync "/midi:op-1*/note_off"
if voices[note]
control voices[note], amp: 0 # ramps down over `amp_slide`
in_thread do # tidy up after the fade
sleep fade + 0.05 # safety margin
kill voices[note]
end
voices.delete(note)
end
end
This allowed me to manually noodle over the top of a track with a specific sample or synth and added a little more direct control over things like melodic progressions, arpeggios, etc.
When I had something I was more or less happy with, I’d record into a buffer and do a take. I think I only did one or two takes per track before pulling the resulting buffer into Logic and doing some light processing and mastering. All and all, my tiny dungeoncore AI EP was handily accomplished in one day with time to spare, and I’ve certainly gained a greater appreciation for what it takes to actually craft one of these dark ambient tracks by hand.
And perhaps that’ll be my next experiment—the takeaway for me continues to be that AI-assistive tooling can be great at initial ideation, prototyping, and getting the tedious bits of the creative process out of the way quickly, but they are just tools, and are here to augment our creative abilities, not to replace them.