In my musical research project, we are designing an electric violin with a different pickup-mics for each string (all C strings), the signals being sent into pitchshifters (a different shift for each string) to make nice harmonies in max from the original violin expressions played by a prestigious violinist… Knowing the input sound is MONOPHONIC (one string of violin that is being played at a time by sound chanel), we are looking for the best of best monophonic-pitchshifter for that purpose:
- The SHORTEST latency possible.
- The CLEANEST sound.
- If possible, manual formant control.
- basically from 1 octave down to 1 or 2 octave up. (from -3 to +5 octave is welcome too ;-) )
We created this benchmark patch for getting a clear idea of the behaviour of the different real time pitchshifting algorithms. (One of them : supervp.trans~ is not free and is available bundled with couple of other externals on the Ircam website : http://forumnet.ircam.fr/product/supervp-max/?lang=en
Our point is to transpose in real time a monophonic audio source coming from a violin instrument. We are strongly concerned about latency. (real time playing of the instrument) We came to the point that we couldn't use FFT based algorithms since fft introduce too much latency, and even if superVP sounds lovely with amazing formant style parameters and sound material remixes, but we just can't afford that much delay. (or in some case you can set short fft window and you have less latency …but then you loose the pitch precision, it sounds bad.)
The best option we have at the moment seems to be, rather logically, an algorithm that is dedicated to monophonic pitchshifting: the PSOLA algorithm:
- In shifter~ from Tristan Jehan. Latency is less bad here, around 30ms… …But no formant control, and in this object the formant is actually moving with the change of pitch… which is often makes the sound loosing its bringhness while pitchshift-up…
- In the open source FTM bundle from Ircam (in our zip file) the formant parameter is just great !! …But here we have more latency, around 50ms...
After scanning the web we couldn't find any relevant code example (and we can't really say we're felling confident with our C/C++ skills).
Has anyone ever though about porting PSOLA technics into Gen, or could give us some directions ?
(Note: As seen in this other topic about monophonic-pitchshifters https://cycling74.com/forums/monophonic-pitch-shift-real-time-timbre-neutral/
, we also tried a simple tapin/tapout pitchshifter trying to adjust carefully its window size to try to avoid beats and modulation effects, but this only work more or less for octave pitchshifting, the rest of the time it's awfully enharmonic. Still, for octave pitchshifting, this solution have the shortest latence. (still an antialiasing filter is missing while pitchshifting-up))
Also, as we are working with violin bass notes that are not lower than 115Hz, I have the feeling that there must exist a way to either optimise a psola algorithm or create an algorithm to lower the latency the maximum possible... an algorithm that, to my feeling, should not need more than twice the period of the fundamental: 17ms...
Thank a lot!