Author |
Message |
an2netto
Joined: Apr 23, 2017 Posts: 1 Location: Ukraine
|
Posted: Sat Apr 29, 2017 2:29 am Post subject:
NMG2 OscShpA Subject description: waveshaping algorithm |
 |
|
I'm trying to figure out what transfer functions are applied behind NMG2 OscShpA oscillator. In the manual the Sine3 is described as follows:
At 50% Shape setting, the signal is a perfect sine wave and at 99% a lot of even harmonics have been added.
I recorded a scope of the waveform:
https://youtu.be/Tz4nzEbgdY8
Could anyone give a hint on the algorithm being used here? |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Sat Apr 29, 2017 5:33 pm Post subject:
|
 |
|
Hi!
I don't know what is the exact algorithm but this is usefull (from the doc/OscShpA too) :
"by gradually transforming the signal, adding more overtones and creating a more complex and rich signal"
I'm curious to reproduce it with a 'wave table patch' + morphing to pass from waveform A > waveform B. |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24476 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Sun Apr 30, 2017 12:44 pm Post subject:
|
 |
|
I think .. it might be phase distortion synthesis.
For a normal osc you would make a saw shaped signal and use that to look up or calculate the wave to be played.
In phase distortion synthesis you would change the shape of the driving saw ... in this case an S shaped curve might have been used.
To change the harmonic contents you would fade between the saw and the warped saw.
Some more on that : https://en.wikipedia.org/wiki/Phase_distortion_synthesis
On the G2 you can do a sine lookup by setting a sine oscillator to zero Hz and then use the Phase Modulation input to do the lookup - with a saw as an input you would get the sine, with a distorted saw you would get .. something else.
Ideally you would want the saw to be aliassed for this, but audio oscillators are anti-aliassed .. you could try an LFO instead.
I did not test anything of the above BTW .. just guessing. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Mon May 01, 2017 1:59 am Post subject:
|
 |
|
Blue Hell wrote: | Ideally you would want the saw to be aliassed for this, but audio oscillators are anti-aliassed .. you could try an LFO instead. |
LFOs are unusable for this purpose because of the low sample rate. I used to use a klutzy (i.e. wasteful) inter-/extrapolation scheme to upsample a sawtooth LFO from control to audiorate for use as a phasor -that was, until I figured out this:
http://electro-music.com/forum/topic-67855.html |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Sat May 06, 2017 2:36 pm Post subject:
|
 |
|
Sorry for my ignorance... I like to learn from others people questions. Is a sine from a resonant filter (self oscilating) is antialiasing ? If not, can we use these sines to create (additive synthesis) a saw usable for what Blue Hell suggest?
And is the square from the invert module at 48kHz is antialiasing too ? If not is it possible to turn this one in a saw (aliased) with any technics ? |
|
Back to top
|
|
 |
|