huge problem when interpolating between waveshapes (multisliders)
I’m dealing with a very, very frustrating problem, which is ruining a patch I worked on for quite some time. I have to say people on this forum have been very helpful each time I post a problem, but the person who can help me fixing this one will really make my day..
I’m trying to make virtual oscillators, starting from an instrument I sampled chromatically. I recorded C, C#, D, D#,…
I really liked to be able to play all microtonal notes in between (half sharps, flats..), by using a device like a ribbon-controller. And so I managed to convert each note’s waveshape to a multislider-object-preset to be used in a high-resolution multislider. The waveshape is stored in a buffer and played-back using the wave-object.
Using interpolation (which was possible after having converted all multislider-presets to a same resolution =amount of sliders), the waveform changes very smoothly as I change the pitch, so that each microtone has it’s own unique waveshape, resulting in the possibility of high quality pitchbends.
in some oscillators, when interpolating between 2 notes, there is a huge problem. You can see the details of this problem in the attached pdf. Interpolation is good in many cases, as all sliders of the multislider-object get changed very smoothly, but in my case, the peak of the wave is moving and not just changing it’s shape..to morph correctly in this case, some sliders of the multislider-object should change immediately instead of gradually, but I don’t see how. I’m now left with big unwanted timbral changes that shouldn’t occur.
It’s like I most of the times need vertical sliders, but like in this case sometimes horizontal sliders..It would be cool to be able to morph in all directions.
all help is highly appreciated, please check out the pdf.
P.S.: I know interpolation is mostly used to morph between waves to get timbral changes while keeping the same pitch. In my case there should be a very small timbral change over many octaves. I know I could solve things using altering the change of speed(= low quality pitchbend)/stretching, but It will come at a very high cost: the lost of sound quality. For example: The timbre of one of my oscillators is very "airy" at the bottom, and becomes more bright as the pitch gets higher, when using pitchbends glissandi starting from bass going to treble wouldn’t change anything in timbre, resulting in distorted "airy" high notes..
in the actual case described in your PDF, I would generate the waveform based on an equation for each possible pitch (at least, in the range between C and C#) rather than using any interpolation method between two fixed waveshapes. The curve is fairly simple (you only need three curve sections, which I would generate using a mixture of exponential and logarithmic functions). Alternatively (if your waveform is actually sampled from a real instrument and you don’t want to loose the micro-details of the shape), I would do the following steps:
(1) Find the two breakpoints of the envelope algorithmically for C and C# (you could inspect, for example, the first derivate of the shape, but there are other solutions as well).
(2) Stretch/compress each of the three obtained sections of the waveshape independently (you’ll end up having 3 sections from C and 3 other from C#) so that their duration would meet the expected duration of the respective sections within the final pitch.
(3) Interpolate each section independently based on the respective sections from C and C#.
Beware that this solution is over-complex and I don’t think that you’d be able to implement it in real-time. In fact, I’d advise against the above algorithm, although it would certainly give you a very detailed waveshape. IMHO, I’d simply go with the mathematically generated waveform.
Forums > MaxMSP