I’m intrigued to hear that LPC playback is available in the new Plaits module. Can’t wait to play with that, when mine arrives
In the meantime, I’ve started tieing up some loose ends with my LPC object set for Axoloti, with a view to eventually releasing them quite soon.
One of the things I never properly worked out how to do, but that seems to be a prominent part of other musical LPC implementations is formant-shifting, specifically formant-shifting without also shifting the pitch of the voiced source/carrier wave.
I’ve found it’s possible to change the pitch of the whole synthesis system by altering the sample-rate the 10-pole filter runs at, but since it runs natively at 8kHz, I only have 6 multiples of the fixed 48k sample-rate of the Axoloti going up, and of course, sub-dividing the already very low 8kHz, things quickly turns to mush.
Any advice from someone who knows more about DSP than I do would be greatly appreciated.
Formant shifting in Plaits works exactly like you describe: alter the sample rate and compensate by shifting the f0 up or down.
So your question is not about LPC but about running a synthesis algorithms at a different (fractional) sample rate than the native rate. You’re lucky here because you don’t care about nice interpolation: after all, a circuit-bent speak-and-spell won’t have a reconstruction filter, so the waveform at 0.2x the original rate is obtained by rendering a sample and repeating it 5 times, yielding a square-ish, S&H-ish waveform. For rates in-between this is similar to rendering band-limited clocked noise. You need “soft edges” whenever samples on the slower clock do not line up with samples of the native clock, and these soft edges can be synthesized using polybleps, just like when synthesizing a square waveform!
rate is the ratio between the playback rate and the sample rate. For example, if 48kHz is my output rate, I need to set ratio to 0.16667f to invoke the LPC code at 8kHz.
Yes. As long as you don’t mind the harmonic-rich, sort-of-bitcrushed sound that is caused by using a zero-order hold instead of a proper resampling filter.
If the buffer is only 16 samples long (as it is in the Axoloti’s case), would that have an impact on the precision or range of possible formant-shifting?
Still haven’t got around to implementing this, but it’s on my list
I think I may have asked this before, so apologies if I’m repeating my self @pichenettes. What do you think are the chances of making a realtime TI-style LPC10-encoder work on a CortexM4?
Axoloti runs a STM32F4 MCU, at 168Mhz, apparently, so should be some cycles left over for other stuff.
I realise your estimate is predicated on it being a competent programmer who is writing the code to to the encoding, of course (not the scenario here, sadly)…
Incidentally, and just out of interest, did you record the Plaits LPC words yourself, and if so, whose was the voice, and what did you use to do the LPC encoding?
Any plans for anything else LPC-related in the future? It seems to be flavour-of-the-month at the moment
Quick question: can the float ‘rate’ value be used directly as a multiplier for the voiced source/f0 phase-accumulator value, or is some conversion required?
Just started implementing this. My LPC playback code is integer-only, so currently, it’s working, but I’m having to cast the output of the LPC filter from int to float to use the blep function.
I’m sure it’s possible to convert the two blep functions to integer operation, but do you think it’s worth it?
Also, can I ask if you use any special scaling function for the ‘rate’ value. Since pitch is exponential, I’m tempted to use an exponential scale, but then the centre value of the parameter doesn’t correspond to the centre of the range.