Coding 2026-06-01

By Max Woerner Chase

I haven't had the focus when I had the time to touch code today, but I was at least able to come up with a few plans for new functionality.

I've been trying to figure out how to work with multiple channels; it's not quite compatible with how I've done anything, but I'm not sure what to change. It kind of seems like I need to impose a meaning on the different channels to be able to generate meaningfully different things. I mean, the obvious thing for me to do is to emulate spatial separation, but I suppose it's also possible to have some kind of binaural beat filter. In that case, how do I want to represent these different paradigms? Spatial emulation needs to adjust the input samples on each channel by a lag, and to scale the output according to some inverse-square stuff. Binaural beats would need... I'm not sure.

Anyway, I was also thinking about interpolating between notes. Basically, I'm implementing sine-wave-based stuff by altering the input to a notionally 1Hz oscillator. Multiply the input by 440, and it produces A4. Now, to handle switching the same input between different frequencies, it requires both multiplication, and offsetting the input, because simply continuosly changing the scale factor would cause the output to contain frequency artifacts. So, I have to improve from my current system of "ad-hoc multiplication" to "mx+b" as some kind of object. And interpolating between them... It shouldn't be too hard to come up with a parabola that meets the starting tone at the same slope, then meets the ending tone at the right slope, the height of which then determines the "b" for the next tone, but I believe the "right" way to do this is to fit an exponential curve to this in some fashion. I'm also interested in seeing what it sounds like to run a low-frequency oscillation between pitches.

I'm running low on energy right now, though, so I'm going to wind down.

Good night.