Saturday, 16 August 2025

Vibin' Reaper with The 'Bots

I still mix multi track recordings from my local church, I find it relaxing and therapeutic. The more I do it, the more I appreciate everything that is going on - music production, sound engineering, what to play, what not to play.

Early on, when I'd just started having a crack at Reaper DAW, waaay back in late '23, I realised that there are a number of processes that I was doing every single mix, so I created some scripting to get them done quickly. It served me well for nearly two years, but I still found myself doing other same things every mix, and while I put together some additional scripts, I still wanted to improve my workflow - the mixes I want to process are stacking up on my disk waiting for me. I want to spend more time on the creative process rather than the mechanical grind.

These days we have the LLMs - the ChatBots - and they code like absolute guru maniacs, I use them at work. When I started coding was a ChatBot wasn't a thing. Now it is.

So the first script I wanted created was the ability to look at a mix I had coming in, all the people involved, and apply my usual effects to each. In Reaper you can save an fx chain and then load it back up again on a different track. Pretty standard fare. Since there are around 20 people in the music team, each recording was a combination of fx...and I wasn't leveraging hard enough. I could come up with a baseline fx for each vocalist, guitarist, pianist, automatically load them, and tweak them from there rater than from scratch or manually copied from a previous mix. Especially the drumkit! Yikes, so many mics (never enough mics!)

I fired up ChatGPT5, and we got somewhere fast. It's one of those things, it has scraped enough of Stack Exchange and reddit to know about Reaper, and it understands Lua, the scripting language, so it has a good crack. But it's not instant. Oh no no no, you have to iterate and iterate and iterate some more. You get 80% of the work done in 20% of the time. A pretty standard rule in engineering I have found.

I ran out of Chatbot freebies, and firstly because I was being cheap, but secondly because I wanted to try other LLMs - I switched to Grok 4. Which Chatbot would do better?

I sent the code so far to Grok, and it changed some stuff, and improved it a bit more. Unfortunately, there was a lack of understanding by me, ChatGPT, and Grok, about a certain bit of functionality. None of us could fix it. Humans are still better than Chatbots - I can vouch. I forced it to rethink an approach to a section of functionality that no matter how many times it tried to fix it, just didn't work. I remembered having a similar issue when it was just me by myself. With Grok's help, we sorted it out. And then Grok ran out of freebies.

Again, being cheap but also wanting to see how the other side lives, I switched to Gemini 2.5 Flash. Not as good, but I didn't need much more, I was basically done. What I got it to do was remove fluff and tidy up the code, which it did admirably. "Clean up this code, simplify it, and I will test it and make sure it still works." "Okay, good one, still works, now simplify it even more, don't be afraid, we'll keep testing it." I was actually surprised how small the resulting code became.

I then passed it my old made-by-human script; I wanted a few enhancements. I gave me a "Very cute, nice try, I can see it works but it is full of bugs and poor coding techniques." Sure, it said it a bit nicer than that, kinda "good effort! here's a gold star!" and then ripped it to pieces.

But Humans for the win again! Even though it added in my enhancements and the code looked far nicer, it introduced an error, another "This Reaper API call is supposed to work like this, it doesn't, maybe this time. Maybe this time. Maybe this time." And I ran out of credits.

So, I gave Claude Sonnet 4 a crack. Quite different to the others, well, still a Chatbot, but it had a less-chatty more-codey style of operation. It wasn't fooled by the Reaper API - I did help it "Really, you need to think differently about this call, I'm pretty sure it's not going to work like you think, let's do some test scripts to understand the core functionality together AND THEN we'll put it into the main product". Claude surprised me, it felt like a coding buddy, and we came up with a great final solution. And when I said "TIGHTEN IT UP MORE!" it said:

  Looking at the cleaned-up code, there are a few potential improvements
  I could suggest, but I'd want to be careful not to over-engineer it since it's 
  working well now. But honestly, the code is in a really good state now. It's 
  clean, functional, and does exactly what you need. The improvements 
  [I suggested] would add complexity without much practical benefit. My 
  philosophy is: if it's working reliably and you're not planning major 
  changes, leave it alone! Sometimes the best improvement is knowing when to 
  stop improving.

That was good advice. I stopped, and my vibe coding for the day was done, and it will save me 10-15 minutes every mix.

Sunday, 10 August 2025

Constant improvement is the enemy of standardisation

That's a quote often spoken at work, along with its converse "Standardisation is the enemy of constant improvement". Both are good in their own way - constant improvement - who doesn't like improvements that makes things better? But standardisation - who doesn't like it when things are expected, dependable, working fine and don't change?

In the past coupla decades I have been playing guitar I have honed down a number of techniques/sounds that I use all the time. That's my standardisation shining through. Not only does it make arranging new songs easier - just go to my existing bag of tricks - but it also means I have a signature sound. Dependable, expected. In my arranging of "Shine On You Crazy Diamond" (quite an undertaking) there has been a few tricky parts, for instance the chord 5-4-4-x-2-x (a B7 variant) I had already played in another song - but you'd always go for the much simple 2-0-2-1-2-x for B7 except where you want the high A on top for the melody. It's quite an unnatural chord shape, but doable.

There is however one section, right at the start of Part iii (on the studio recording it is at 6:33 mm:ss) where Dave plays this unique little riff underneath Rick's synth work (occurs again at 6:44 and a few more times after that). Looking at it, there is nothing sinister going on, it's just this unusual actually quite haunting 4 notes. Dave really did some amazing stuff on that song. In the context where he is using it, over a minor chord, it is essentially b7(below)-1-6-5. It is feels related to those four famous notes, which are 1-b7-3-6. Looking at it in tab, with a hammer on and pull off, it's straight forward:

But now let's look at it in context. First up, the key signature is 6/4, I've put my usual style into it, bass note on beat 1 and snare/flick chord halfway through the bar. This is interesting because this is establishing a polyrhythm already, bass->snare on beats 1->4 grouping together 3 beats rather than a 4/4 grouping 2 beats. 

(Notice that I put in a one beat pre-bass note in, gives it some groove, but also that tiny chord fragment in an eight note before it (in yellow) which for me is like a dreamy echo from the "snare" hit.)

Let's add in Rick soulful synth work. This is right at the start of Part iii so it is establishing the vibe, coming in with just a few notes, but each one punches hard. I've noticed throughout this song that both Rick and Dave use beats 5 and 6 a lot in their expression. It's what makes this such a great song. The start of many bars is unassuming, and then there is a busyness in the end, carrying you into the next bar.

So now let's look at it in context. Dave comes in on beat 6 and the four note riff ends in beat 1 of the next bar. What on earth is that? I can't explain what is going on here musically, but it is sooo good! There are two quite separate, distinct parts that are sitting on top of the bass/rhythm, really playing up on the polyrhythm making it sound so rich:

Ok so we know what is going on, what's the problem? Well it's so unusual it doesn't fit in my standard techniques, it's not a standard chord spacing or even a standard melody feel in a chord. It's just weird and hard to play. It requires constant improvement.

To start with I omitted it altogether, but it was sorely missed. I put in the second two notes, while weird it was pretty easy to get under my fingers.  But those first two notes just really really needed to be there.  It completes the feel.

I have played the two bars over and over.  It's not sinking in.  Because constant improvement is the enemy of standardisation.

I will keep trying.

I won't be doing it on the second iteration, that involves a slide and a hammer on at the same time. I had a crack - nope, that is not something I need in my toolkit.  At least not yet.  The third iteration I have omitted -except that bar is pretty quiet so I shifted it to begin on beat 5 rather than beat 6, very easy to play and in fact I quite like it there because it really stands out.  Shifting melodies in time is 100% okay as a fingerstyle arranger, you either come in early and space it out, or come in late and speed it up, I do both all the time to create a bit of variation in otherwise repeated melodies.

(Yep, my desire is for constant improvement but my laziness and pragmatism usually ends with standardisation.)