by normanion » Wed May 08, 2019 8:43 am
Hi Everyone,
I need some input from potential beneficiaries.
I did some calculations and I think that scanning of wavetables is fascinating and very wide area of sound design. For example: I propose to add more functions modes for scanning. Not only discrete, but more than one continuous (morphing) methods.
1) Linear interpolation.
Everyone knows them - they are like mixing two waves, so it can be done either mathematically, with formula WT1 * x + WT2 * (1 - x) or with mixer switching sources.
2) Cubic interpolation with simplest smoothing.
I was thinking, that linear interpolation has some rapid changes in between "stops", when modulation goes thru set wave. So I tried to interpolate with cubic function, assuming that at set values, where two interpolating curves join, the joins should be smooth. Therefor: not only values but also their derivatives should be event at set points. There is more than one choice for derivative. One is the most intuitive, and most efficient in terms of processor power. I kept even angle between linear interpolations. So at point i, the angle for joining two curves is same as angle for joining i-1 and i+1. This will be better explained in attached document.
Equations look like a lot of calculations, but those are simple equation in form y=A*x^3+B*x^2+C*x+D, and for scanning between two waves in table there is only need to hold only set of four constants and calculate value by solving this cubic equation. Worst moment is at set values, when - if modulation is expected, either by mod wheel, envelope or LFO (or totally worst case scenario - by oscillator) - there is need to hold those constants for two curves.
What are disadvantages? When value at given wavetable time changes rapidly between consecutive waves, there is possibility of overshot, leading to some mild overdrive (most extreme case, that I found, is overshot of 12,5% of amplitude). This is either blessing or curse. I like driving signal paths so this might give interesting results still keeping changes in "smooth" territory.
3) If computational power allows, we can put more conditions on derivative. Simplest condition is that line at point i, represented by equation y=ax(i)+b, cannot have "overdriving" values at point i-1 and i+1. We can also use some normalisation or trigonometric functions (arctan?), but I will not venture there if Hrast rejects second option, making any more processing demanding options even less possible.
Please, look at attached documents for visual explanation.
This was calculated, using simple 4x4 matrix, I checked and equations look correct. They work in Excel.

- Attachments
-

-

-

-

Hi Everyone,
I need some input from potential beneficiaries.
I did some calculations and I think that scanning of wavetables is fascinating and very wide area of sound design. For example: I propose to add more functions modes for scanning. Not only discrete, but more than one continuous (morphing) methods.
1) Linear interpolation.
Everyone knows them - they are like mixing two waves, so it can be done either mathematically, with formula WT1 * x + WT2 * (1 - x) or with mixer switching sources.
2) Cubic interpolation with simplest smoothing.
I was thinking, that linear interpolation has some rapid changes in between "stops", when modulation goes thru set wave. So I tried to interpolate with cubic function, assuming that at set values, where two interpolating curves join, the joins should be smooth. Therefor: not only values but also their derivatives should be event at set points. There is more than one choice for derivative. One is the most intuitive, and most efficient in terms of processor power. I kept even angle between linear interpolations. So at point i, the angle for joining two curves is same as angle for joining i-1 and i+1. This will be better explained in attached document.
Equations look like a lot of calculations, but those are simple equation in form y=A*x^3+B*x^2+C*x+D, and for scanning between two waves in table there is only need to hold only set of four constants and calculate value by solving this cubic equation. Worst moment is at set values, when - if modulation is expected, either by mod wheel, envelope or LFO (or totally worst case scenario - by oscillator) - there is need to hold those constants for two curves.
What are disadvantages? When value at given wavetable time changes rapidly between consecutive waves, there is possibility of overshot, leading to some mild overdrive (most extreme case, that I found, is overshot of 12,5% of amplitude). This is either blessing or curse. I like driving signal paths so this might give interesting results still keeping changes in "smooth" territory.
3) If computational power allows, we can put more conditions on derivative. Simplest condition is that line at point i, represented by equation y=ax(i)+b, cannot have "overdriving" values at point i-1 and i+1. We can also use some normalisation or trigonometric functions (arctan?), but I will not venture there if Hrast rejects second option, making any more processing demanding options even less possible.
Please, look at attached documents for visual explanation.
This was calculated, using simple 4x4 matrix, I checked and equations look correct. They work in Excel. ;-)