Re: Splines and DSP
Posted: Sat Jan 18, 2020 5:16 pm
tulamide wrote:That's what I was hoping for. Someone who understands the impact of it and is willing to take over the DSP coding! Thank you so much.
You're welcome. I hadn't realised until I saw your thread that the 'sequencing' code might have other uses. The only problem I can foresee is much as Spogg mentioned earlier - for quick response to note-release, you'd ideally need to skip forward to the release portion of the envelope-points sequence. That would need to be smoothed or have levels 'normalised' somehow, because you'd effectively be joining two splines where there's no shared control node. Even if I can't resolve that straight away, I'll get something sketched out as soon as I can, so that I can at least give you an exact spec' for the array of data that your spline editor will need to pass to the DSP.
Spogg wrote:I’ve given some thought to wavetable sequencing myself... ...But I couldn’t think of a way of doing it smoothly using the prims we have available...
Well, you can give yourself a few brownie points for inspiring me to take a look into it! And it's very apt that you should mention Kevin, too. It was in his synths that I first came across your morphing oscillator, which led me to have a "why did I never think of that?" moment when I saw how you use a mem array to store whole wavetables rather than just individual wave cycles. Like all of the greatest ideas, it seems obvious as soon as you've seen someone else do it first!
Then, as you suggest, I realised the limitation that using the stock wavetable oscillator forces you to use the 'Mem Array Get', which only has a 'green' index selector, so you can't switch wavetables at sample rate. I worried that the algorithm to play back the right single cycle from a wavetable might be a bit of a nightmare to reverse-engineer, but it turned out to have a very simple and elegant solution. You can see from the mem size that the number of entries in a wavetable is sample_length/2, and the one to play is just 1.0/normalised_frequency (up to the limit of the number of table entries).
Besides wave-sequencing, the wavetable-array reader would allow your morphing oscillators to have their shape modulated at sample rate (there's a rough sketch of that in the 'scratchpad' module of the schematic). Hence, I've kept the reader module separate from the sequencing code, as it struck me as being a component that others might come up with some interesting uses for. Once I've ironed out a couple of remaining glitches, I'll convert the DSP code to ASM (there are a lot of potential CPU savings), and then I'll upload them as a little 'wavetable toolkit' (and stop spamming tulamide's splines thread with all this talk about wavetables - sorry!)