Waveform maths List!?

Modular Synth design and releases (Reaktor, SynthEdit, Tassman, etc.)
RELATED
PRODUCTS

Post

Hey guys,

probably my first post in this section if i am not mistaken!!

I wanna to ask if there is any document/site/etc where i can find maths to create waveforms more advanced than the basic ones?!

The great would be a list of waveform maths to enter in a waveshaper like the one in Serum!

Thanks,
Duarte

Post

You can approach waveform generation in a few ways. Two which spring immediately to mind are summing sinusoids and applying different functions to a linear ramp.

Post

Well... the problem is i suck at math and i cannot develope them by my own.
I only had 9 years of math in school since first class... the idea was to copy the math formulas from a place where they were alreay made.
I want them to develope a small project in SynthEdit...anyway thanks for replying : )

Post

creating waveforms mathematically is.. the length and breadth of generative dsp, more or less. there are canonical methods, endless ways.. you are staring into infinity really.

if you make your own right ways and wrong ways instead of borrowing them from others, you'll probably have more ways.

if you're using the synthedit sdk, check the dsp forum here and you'll find plenty of concepts in the sticky threads. if you're just using modules in se, you'll understand, the waveforms on the native osc are "imperfect" contours because they are antialiased... the PD osc does alias to some degree, because it uses a method that simply would..

..if you wanted to "do your own oscillators mathematically" you'd need an osc that output a "perfect" ramp to use as the phasor (eg. straight path from 0 to 1 then you do stuff with the numbers) and the native osc is AA, so it's wiggly not straight. straight away you'd be limited by that form.

......you can do this however you want, but there are considerations. if you are really excited about math, i'd write in c++ or matlab or something. you'll be much happier defining more about the procedure. but i think it's best to say, while you may be able to "generate waveforms mathematically," some experience with the basic principles is needed, not a list. you can run a phasor into a quadratic equation, if you want to add harmonics, but often the solution requires fitting the best procedure. anyway, there isn't a list, really.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

ok..but i just want to use the waveshaper of SynthEdit : ) .... i am not a c++ coder...
A list with waveform formulas would be great : )

Thanks anyway!

Post

Indeed, the first waveform generator I coded in Pure Data split the cycle into eight stages and then allowed for a few basic adjustments between. So you can approach this a number of ways. Generating via ramp is my current favourite as it lends directly to wavetable synthesis and loads of transform potential.

However, wave shapes for waveshaping is a different request to simply asking for waveforms.

The characteristics of waveshaper functions is slightly different as you are mapping an input signal on the X axis to output on the Y axis. Depending on whether the waveshaper is unipolar or bipolar, you will obtain different results with the same waveforms. The output might not sound so great without up and down sampling to remove alias frequencies. It is also generally advised to have an input EQ curve to compensate for output dips. And a final adjustment of EQ to get closer to sounds you might have in mind. Envelope followers controlling various parameters might get you even closer.

Probably the most common function to use for this is the hyperbolic tan function or tanh. You could also expand a sine running from -1 to +1 (mid section) over the Y axis to create a smooth curve.

If you are unsure of how to approach this then Wikipedia and YouTube should be a big help.

Post

Thanks..i will check it out!
I have done these so far: http://www.beatassist.eu/demos/waveforms.jpg
You might wanna check...if you, do please give me some hints if they are correct or if they are too odd, and what can i improve!!

Thanks!

Post

I presume the wave shapes with sharp edges are aliasing very badly at upper frequencies.
What waveform do you input into the wave-shaper.

Post

I want to input various of the basics:
- Sine
- Saw
- Ramp
- Pulse
- Triangle
- White Noise
- Pink Noise

and PD:
- Saw
- Square
- Pulse
- Dbl Sine
- Saw-Pulse
- Reso1
- Reso2
- Reso3

These are the basic waveforms provided by SynthEdit´s Oscillators : )

Post

I notice that some waveshapes in the image you posted above will force the input signal to silence at maximum amplitude. This might be something you have a use for though.

I would experiment with chaining some up and applying different EQ curves between waveshapers. Also check out the Chebyshev polynomials of the first kind, T. The formulas are found further down the page.

https://en.wikipedia.org/wiki/Chebyshev_polynomials

I haven't used SynthEdit so I don't know how complex anti alias filtering is within that environment. Hopefully it will be simple and you'll be able to get useable results more quickly.

I would also look into asymmetrical waveshapes which settle without a DC offset. Also note that a HPF set at sub sonic levels will solve DC offset and further improve the sound.

Keep experimenting. :)


EDIT: Sub sonic frequencies - not levels. :dog:
Last edited by Unaspected on Fri Oct 14, 2016 2:26 pm, edited 1 time in total.

Post

yeah..i just play around with numbers and signs in these formulas and waveshapes..i have no idea what i am doing right or wrong..that´s why a list of waveforms would be nice : ) ... my knowledge about this is very limited... i just keep the waveforms that seem "pretty", in both form/shape and after, in sound texture with a sine input signal..most of these waveforms i show are creating a very cool "organish" sound..specialy with a sine wave as input : ) ...

@Unaspected - 3 questions

1 - i do not know very well what you mean by silence the signal at maximum amplitude ?!!!
2 - when you say, apply different EQ and chaining, you mean apply an EQ between each waveform that are suposed to be chainned in serial?!
3 - what do you understand as sub sonic levels?!

I will check that Chebyshev thing..but i might not understand nothing : )

Thanks!

Post

alienoiz wrote:1 - i do not know very well what you mean by silence the signal at maximum amplitude ?!!!
Sorry. If this is a bipolar waveshaper disregard my previous comment there.

alienoiz wrote:2 - when you say, apply different EQ and chaining, you mean apply an EQ between each waveform that are suposed to be chainned in serial?!
You'll find that some input frequencies glean a greater response than others so compensating EQ can help with this. If you are running from one waveshaper to another I would definitely advise a further EQ stage between the shapers.

alienoiz wrote:3 - what do you understand as sub sonic levels?!
Apologies again. I meant frequencies. As in around 30Hz or lower. I'm blaming lack of sleep and will stop writing after this.

alienoiz wrote:I will check that Chebyshev thing..but i might not understand nothing : )

Thanks!
You're welcome.

As far as implementation goes. Note that T1 is x and this is a linear ramp running from -1 to 1. So you plug that into the equations to get output similar to the image shown on the right of that page.

Post

ok Unaspected.. have a good sleep!

Thank You!

Post

an allpass filter does not change the magnitude of any frequencies (think, sine waves) but rather the phase - if you run waveforms through an allpass, you will discover it changes the contour of the waveform, but *not the sound* (unless it is being modulated or is being summed with another signal, such as your refrigerator humming).

so, the shape of a waveform is not so critical.. understand the idea that these waveforms, any waveform can be compounded from individual sine waves, this is fourier theory.

your exercises are useful, eg. you have a parabola, which is a useful way to transform numbers and do things with them.. all of these techniques are useful to dsp/digital synthesis.

i earnestly suggest, if you want to learn, leaving off with this exercise and learning a few other things that might produce more yielding results...

i have a pretty boring pdf on my webpage about synthesis.. more of a lecture.. maybe my dsp pdf, on the sem page, is more interesting? follow some simple dsp discussions online.. if you are brave, read dspguide.com .....i wish i had a better reference for "where you are at" :)

but, some stuff.....


eg. sawtooth waves, in analog environments, are usually created in "obvious" ways.. there's a big transition and a slope down.. like if you fed a pulse into something that leaked the level out..

in digital environments, if you just "drew a line" you'd get aliasing, so simple sawtooths are built by summing sines at the harmonics (integer multiples of the entire wavelength) to nyquist (half the sampling rate). read about those things on wikipedia if they confuse you.

there are many methods of making waveforms...... the "reso" PD waveforms for instance.... look at them when you modulate them..... it's a single cosine wave cycle, initialised at the start of the waveform cycle, and faded out... then the modulation changes the rate of this "nested" cosine wave.. because it's faded out, it doesn't have a harsh click/transition at the end... because the "pattern" is fit into a single waveform length, the output is all harmonics of the fundamental.. (integer multiples)

....because it's a simple ass method, it aliases somewhat.. the harmonics "go past nyquist" and are reflected back down... get out the *frequency analyser* module.... try the different options to view the harmonics of a sawtooth... (you may not understand them at first, but when you read about them one day, you'll have seen it already) (better yet, use voxengo's SPAN which lets you view to a lower noise floor, but doesn't have a linear frequency option).

quite honestly, the "reso" waveforms (like PD in general) isn't "high mathematics", it's more like some stoner (like me) said "hey i can make a noise like this" and nailed together some cheap ass method of making a flexible, interesting synthesizer waveform. some people say it's brilliant, i say, it's just people doing things.

so you can see form this one example of PD reso waves, audio dsp doesn't require a degree in calculus, more like algebra, some rudimentary coding skills, and a bit of weed is nice too.


some simple things....

if you have a linear slope from 0 to 1, and that value is x

x * x will produce a "concave" slope

x * (2 - x) will produce the inverse of that slope, as if you had done 1 - (1-x)*(1-x)

x * x * (3 - x - x) makes a nice S curve from 0 to 1

you can try running values through these equations on paper, as well as the waveshaper.


but seriously, once you see the effect phase has on the waveform, you'll see, the contour, isn't the best place to start or way to look at it.... it's better to look a tthe contour and see it as a sum of sines :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Well..xoxos..
i dont understand half of it..my knowledges are very limited, but anyway i have an idea of what you are saying..
I just wish i had knowledges to understand this fully : )

Thanks

Post Reply

Return to “Modular Synthesis”