Working through modulation edge cases

Captain's Log: Stardate 77429.4

After moving to a phase-state approach for oscillators and LFOs (instead of the previous stateless approach), I had to rethink what I was doing to avoid inadvertent dings when a note is retriggered during a previous note's decay. In the stateless approach, this was a really challenging problem, which I did eventually solve in a satisfactory way. But now, with the phase-state approach, it turned out to be much easier to get an even better result, so I'm very pleased. Having more shared memory mutable state for various objects keeps turning out to make life easier.

I'm now just going through the backlog of various tricky bits with the modulators/LFOs, making sure that everything that can be a modulation target sounds good when modulated. I fixed a problem where modulating gain sounded bad, which was due to me trying to do modulation in linear gain space. I realized that modulating gain in linear space is just a terrible idea, and despite having to call pow() on the GPU I moved all the calculations to decibels space and it sounds good now. And using the native pow() functions, it didn't have any noticeable impact on runtime, which is nice.

There are a bunch of other details with making modulation sound good, but mostly there's one big one, which is support for modulation of the angular orientation of entities like mallets, oscillators, mics, and so forth. I've been putting this off because it's fairly tricky, and I'm worried about making it efficient, since rotation either involves a bunch of transcendentals or (more realistically) some matrix operations. But from earlier experiments, I know that modulating rotation is one of the coolest sounding features, so I've got to get to it. Maybe I'll work on that next... but more likely I'll solve more easy problems first. 😄


© 2024 Anukari LLC, All Rights Reserved
Contact Us|Legal