Oscillator: from visual waveform to math formula. How?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi all
I wish to produce this waveform:

Image

I've tried with sines, tangents.. and combinations of them,
waveshaping methods.. none of my attempts gave me satisfying results.

any advice?

t.i.a.
Guido.

Post

Something similar can be achieved by additive synthesis of an sawtooth (amplitude of the nth harmonic is 1/n times that of the fundamental, truncate after some iterations).

Cheers

Toby

www.tobybear.de

Post

looks a bit like a lowpass filtered sawtooth.

Post

additive synthesis will do it nicely. Just FFT this waveform and take the first 3 or 4 harmonics...

You can probably get it too using FM and a little waveshaping, although it'll be harder to antialias.

'Tick

Post

Alternatively, a generic way of doing this would be to write a genetic algorithm to come up with the equation for you - enter in the waveform as a series of points and give the program a time variable, a few mathematical functions to choose from, and a selection of persistant variables that it may use. Then leave it to run until it gets a good approximation.

Post

Just checked: as I said, you can easily get this waveform by summing the first 4 or 5 harmonics (scaled by 1/n) with phase set to 0. Just add up the sines or (as Big Tick suggested) use inverse FFT.

Cheers

Toby

www.tobybear.de

Post

Wavetable! :lol: Just kidding.

Forever,




Kim.

Post


Post

check out bazzoid[1]. The system for waveshaping in Bazzoid is very simple, and easy to understand, and you can see the waveform that results from your settings.

I think you may find some useful clues there.

(that and it is a great Bass VSTi). :)



[1] Cheers, Jens. :)
Someone shot the food. Remember: don't shoot food!

Post

Thank you all guys!
Your help has been really precious for me! :)

Post

Also, Audiomulch has the "10Harmonics" tone generator, which lets you set the relative contribution of the first 10 harmonics of a wave, and graphs the wave in real time as you mess with the harmonics levels -- you could find an approximation to that wave in a couple minutes of twiddling, I imagine.
Image
Don't do it my way.

Post

pft
Image
Don't do it my way.

Post Reply

Return to “DSP and Plugin Development”