What makes a wave a wave?

Discussions about anything analog, digital, MIDI, synth technology, techniques, theories and more.

What makes a wave a wave?

Postby briandc » Wed Apr 20, 2016 4:03 pm

Hi everyone,
I've become a bit of an "obscure softsynth" junkie over these last few years, and I especially like synths that have unusual synthesis control options. (I found one recently that had separate filters for resonance and cutoff, I thought was pretty unique. ZynaddsubFX is another (definitely less obscure) that has lots of randomizing options that make it very interesting.

And so, testing out different softsynths, I have noticed that each synth's waves (saw, square, whatever) are unique sounding. (The same goes for the filters.)
Ok, nothing new to some of you.
My question? What makes them so different? Oversampling? I always thought that a saw wave would sound the same on any synth, but maybe not! (or are there some effects, filters, etc "under the hood" that make them sound better or worse than others?)


brian
Have your PC your way: use linux!
LinuxSynths.com
amSynth on Soundcloud
User avatar
briandc
Junior Member
Junior Member
 
Posts: 222
Joined: Fri Feb 22, 2013 11:38 am
Real name: brian
Gear: 3 Midi controllers and anything linux! :)

Re: What makes a wave a wave?

Postby groy » Wed Apr 20, 2016 4:28 pm

I can't answer the questions, but some interesting discussion here: viewtopic.php?f=1&t=81819
groy
Junior Member
Junior Member
 
Posts: 164
Joined: Sat Dec 31, 2011 9:04 pm
Location: Brooklyn, NY

Re: What makes a wave a wave?

Postby meatballfulton » Wed Apr 20, 2016 5:06 pm

If you read in a physics textbook about sawtooths, pulses and triangles you will see mathematical definitions for each one.

Designing an oscillator that generates a perfect waveform is impossible, so the harmonic content of similar waveforms from different synths will sound, eh, different. Even oscillator generated sine waves can be imperfect...they should have no harmonics at all but some in fact do.
I listened to Hatfield and the North at Rainbow. They were very wonderful and they made my heart a prisoner.
User avatar
meatballfulton
Moderator
Moderator
 
Posts: 5464
Joined: Wed Apr 13, 2005 9:29 pm
Gear: Live 9, Logic Pro X

Re: What makes a wave a wave?

Postby commodorejohn » Wed Apr 20, 2016 5:13 pm

meatballfulton wrote:Designing an oscillator that generates a perfect waveform is impossible, so the harmonic content of similar waveforms from different synths will sound, eh, different. Even oscillator generated sine waves can be imperfect...they should have no harmonics at all but some in fact do.

Totally true, but he was asking about softsynths, where it is totally possible to create a mathematically ideal waveform (in fact, for all the standard waveforms except sine it's ridiculously easy, and harder not to.)

To get back to the question at hand, assuming what you're hearing is the raw "oscillator" and not influenced by other components, it's probably because they're generating something other than mathematically ideal waveforms, in an attempt to mimic analog synthesizers, which don't do that. (Or just because the mathematical ideal waveforms tend to sound a little harsh and tinny.) So they'll sound different depending on whether it's trying to sound more like a Moog, a Prophet, or whatever, and how exactly it's going about that.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
commodorejohn
Synth Explorer
Synth Explorer
 
Posts: 1529
Joined: Mon Aug 12, 2013 2:39 am
Location: Sacramento, CA
Real name: John
Gear: Roland JX-10/SH-09/HS-80D-50, Yamaha DX7-II/V50/TG33, Korg MS-20 Mini/Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax, Casio CZ-5000, SCI Prophet-600

Re: What makes a wave a wave?

Postby meatballfulton » Wed Apr 20, 2016 6:19 pm

I'd be surprised if all softsynths generate their waves using the same math...even if they did, digital waveforms are also imperfect because they are bandwidth limited. A perfect sawtooth has harmonics stretching out to infinity, digital waves have to stop at the Nyquist frequency.

I would expect a VA softsynth to try to model VCO imperfections. A number of softsynths I own have a selection of saws, for example, each one sounding somewhat different.
I listened to Hatfield and the North at Rainbow. They were very wonderful and they made my heart a prisoner.
User avatar
meatballfulton
Moderator
Moderator
 
Posts: 5464
Joined: Wed Apr 13, 2005 9:29 pm
Gear: Live 9, Logic Pro X

Re: What makes a wave a wave?

Postby commodorejohn » Wed Apr 20, 2016 6:28 pm

meatballfulton wrote:I'd be surprised if all softsynths generate their waves using the same math...even if they did, digital waveforms are also imperfect because they are bandwidth limited. A perfect sawtooth has harmonics stretching out to infinity, digital waves have to stop at the Nyquist frequency.

Yeah, that's true as well.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
commodorejohn
Synth Explorer
Synth Explorer
 
Posts: 1529
Joined: Mon Aug 12, 2013 2:39 am
Location: Sacramento, CA
Real name: John
Gear: Roland JX-10/SH-09/HS-80D-50, Yamaha DX7-II/V50/TG33, Korg MS-20 Mini/Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax, Casio CZ-5000, SCI Prophet-600

Re: What makes a wave a wave?

Postby briandc » Wed Apr 20, 2016 8:14 pm

Yes, in a way, I was thinking that a synth made with, let's say, C+, might produce a different wave than a similar synth made with Python or maybe Java. The synths made with SynthEdit (I imagine) all use the same programming language, and so probably produce the same-sounding waves. -?


brian
Have your PC your way: use linux!
LinuxSynths.com
amSynth on Soundcloud
User avatar
briandc
Junior Member
Junior Member
 
Posts: 222
Joined: Fri Feb 22, 2013 11:38 am
Real name: brian
Gear: 3 Midi controllers and anything linux! :)

Re: What makes a wave a wave?

Postby adamstan » Wed Apr 20, 2016 8:29 pm

The language itself has nothing to do with it. It's the algorithm used that matters.
Man with a tape recorder | Living in the '80s ;-)
User avatar
adamstan
Active Member
Active Member
 
Posts: 504
Joined: Tue Aug 22, 2006 2:56 pm
Location: Poland
Real name: Adam
Gear: Yamaha 2xDX7II|QY-70|PSR-S750|PSR-2000|TYROS|Electone D85|Electone E50
B5 DIY polysynth
KORG Poly61
Vermona DRM
Solton Programmer 24
LEMA EDD-5

Re: What makes a wave a wave?

Postby commodorejohn » Wed Apr 20, 2016 10:11 pm

adamstan wrote:The language itself has nothing to do with it. It's the algorithm used that matters.

Right. Nobody would use a programming language if you got the wrong results from a given algorithm when using it. But there's tons of different algorithms you can use to produce a waveform doing anything from the pure mathematical representations to tweaked "analog-ier" versions to stuff that doesn't even have a representation in conventional analog oscillators.

For example, you might start with a phase accumulator as the fundamental unit. By itself, this produces what is essentially a "perfect" sawtooth waveform (not exactly perfect, because there's a certain margin of error when it rolls over, but close enough.) You can derive a perfect square wave from this very easily with a simple comparison: if the value of the phase accumulator is greater than half the maximum value of the phase accumulator, output the negative maximum, while if it's less than or equal, output the positive maximum. (Or vice-versa.) You can change the pulse width by comparing it to a value greater or lesser than half the maximum. That gives you the two most fundamental subtractive waveforms in "perfect" form with simple integer math. (I'm going to leave out triangle here, but it's also dead simple.) Sine is a bit more complicated, because it's trigonometry, but since any serious high-level language will have trig functions built-in, it's really just as simple as scaling the value of the phase accumulator to fit the range of the input to the sine function and then scaling the output of the sine function to fit the range of the oscillator output.

But say you don't like those results. I, for example, find "perfect" mathematical sawtooth and pulse to be a bit overly harsh and thin, and "perfect" sine to be a little too bland for my liking. So, while working on a softsynth for a project I'm developing, I spent some time looking for simple ways to derive non-"perfect" versions of these waveforms from a simple phase accumulator.

The first version of alt-sawtooth I came up with is pretty simple - multiply the value of the phase accumulator by its absolute value (and scale it back down to the output range of the oscillator,) and you get an x-squared progression that inverts on the negative half of the cycle so that it resembles a sawtooth with a noticeable S-curve bent to it. This sounded a little nicer to me than plain sawtooth, but when looking at oscilloscope displays of the sawtooth from the Minimoog, I noticed that it's much closer to a quarter-circle shape. Luckily, I had just stumbled across a way to generate a sine-ish waveform without using trig functions, so I tweaked that algorithm so that it never left the 0-90 degree range (positive-going positive-side) and normalized the output to fit the full range - resulting in a nice curvy "sawtooth" that sounds better still to my ears.

As mentioned, while messing around with the first alt-sawtooth, I stumbled across an algorithm that generates quite a satisfactory "sine" waveform - it's a bit "fuller" than a true sine (somebody on the sdiy list tells me it's a something something math terminology version of a triangle waveform, which sounds about right.) It involves multiplying the value of the phase accumulator by its absolute value and scaling the result back down (as with the first alt-sawtooth,) then subtracting the value of the phase accumulator, and scaling the result up to the full range (the initial result ranges from -1/4 to +1/4 of maximum volume.)

As for square/pulse, I'm doing a really simple modelling of the way a real analog pulse waveform "decays" towards 0 over time. It uses the initial if-then from the perfect pulse-wave algorithm to determine what the sign of the output should be. If it's different than the sign of the current output value, the current output is reset to the negative maximum or positive maximum (depending on which phase of the pulse cycle it's supposed to be in.) If not, the current output value is reduced by a fraction of itself (in my implementation, it's output = output - (output / 512) which seems to give a nice manageable decay at audio rates.)

(For the curious, I have code and a demo here. A rate of 128 will fit everything neatly in the window.)

So there's any number of ways you can tweak an "oscillator" in software to give something that's different from the "ideal" but still recognizable. But it has nothing to do with the language, just the specific software and whatever algorithms the programmer used to generate the waveforms.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
commodorejohn
Synth Explorer
Synth Explorer
 
Posts: 1529
Joined: Mon Aug 12, 2013 2:39 am
Location: Sacramento, CA
Real name: John
Gear: Roland JX-10/SH-09/HS-80D-50, Yamaha DX7-II/V50/TG33, Korg MS-20 Mini/Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax, Casio CZ-5000, SCI Prophet-600

Re: What makes a wave a wave?

Postby piRoN » Thu Apr 21, 2016 2:00 am

I seem to remember Patrick Kunz (the guy behind the excellent Togu Audio Line stuff) had a technical document somewhere describing his method of modelling oscillators, using some complicated integration of pulse trains or something, from what I can recall.

Made me realise softsynths have come a long way from the days of buzzy phase accumulators and flat-sounding biquad filters.
Ensoniq EPS-m | Elby Designs ASM-2 | Yamaha TQ5 | Akai S3000XL | Akai X7000 | Novation KS-4 | SCI Prophet 2000 | Kawai K1m | Korg Monotribe | Korg Monotron | Roland S-50 | Roland D-10 | Roland MKS-7 | Yamaha RX11
User avatar
piRoN
Active Member
Active Member
 
Posts: 541
Joined: Sun Dec 19, 2004 7:04 am
Location: The crotch of The Lucky Country
Gear: A fair bit.

Re: What makes a wave a wave?

Postby meatballfulton » Thu Apr 21, 2016 12:28 pm

We now know that the real limitation in emulating analog tone is CPU power. I just downloaded u-He's prototype Pro-One clone and that thing is the most CPU hungry synth I have used yet...one voice hits 50% on a quad core iMac. Sounds real good, though.

Don't worry, the real thing will be far less hungry because the prototype has six filters running in parallel so end-users can evaluate the results of different algorithms.

Anyway, it should be interesting to hear what's possible in 2026 8-)
I listened to Hatfield and the North at Rainbow. They were very wonderful and they made my heart a prisoner.
User avatar
meatballfulton
Moderator
Moderator
 
Posts: 5464
Joined: Wed Apr 13, 2005 9:29 pm
Gear: Live 9, Logic Pro X

Re: What makes a wave a wave?

Postby briandc » Fri Apr 22, 2016 8:50 am

groy wrote:I can't answer the questions, but some interesting discussion here: viewtopic.php?f=1&t=81819


A very interesting thread! And quite on-topic, actually. It would indeed appear that a saw is not always a saw! Here's a few things I have deduced from it:

- most people who responded to the OP seem to think that there is indeed a difference in oscillators/waves.

- As KBD_TRACKER mentioned, the issue is probably more what comes *after* the oscillators/waves rather than the sources themselves.

- As analog is more "natural" (Walter Ego's comment), it has various imperfections in pitch, timbre and amp, which digital "perfection" fails to emulate accurately.

I've been toying with the idea of making a video of running a plethera of synths through an oscilloscope, just to see the differences: play a saw wave on one, then the same on the next, etc. Problem is, the "downstream" modulation and filtering. I don't know how easily it would be to "isolate" each wave example.

Another thought: as digital is so "clean," perhaps the use of things like overdrive and random LFO are the types of things that make digital so appealing--- they get closer to imperfection!


brian
Have your PC your way: use linux!
LinuxSynths.com
amSynth on Soundcloud
User avatar
briandc
Junior Member
Junior Member
 
Posts: 222
Joined: Fri Feb 22, 2013 11:38 am
Real name: brian
Gear: 3 Midi controllers and anything linux! :)

Re: What makes a wave a wave?

Postby madtheory » Fri Apr 22, 2016 10:57 am

@commodorejohn: awesome post, thank you :)

meatballfulton wrote:I just downloaded u-He's prototype Pro-One clone and that thing is the most CPU hungry synth I have used yet...one voice hits 50% on a quad core iMac. Sounds real good, though.

Don't worry, the real thing will be far less hungry because the prototype has six filters running in parallel so end-users can evaluate the results of different algorithms.

I doubt the filters are running in parallel. That would actually be kind of hard to do in software, and anyway there is no reason to do it that way. What U-he stated is that the code is "unoptimised" it's normal for beta software to be inefficient, with various calls in the code for testing purposes. These increase the number of CPU cycles. Just like megapixels in cameras, there's a lot more at play than merely the single parameter of CPU use.
User avatar
madtheory
Supporting Member!
Supporting Member!
 
Posts: 4858
Joined: Mon May 01, 2006 12:45 pm
Location: Cork, Ireland
Real name: Tomas Mulcahy
Gear: Novation KSR, PT12, VCZ, Redmatica, MIDIQuest, Casio FZ, SK5, Komplete, M1, Theremin, Digi Vocalist, Quadravrb+, Kaoss Pad, JV, SPD, Cyclone, Drummer.
Band: madtheory

Re: What makes a wave a wave?

Postby briandc » Fri Apr 22, 2016 11:19 am

madtheory wrote:I doubt the filters are running in parallel. That would actually be kind of hard to do in software, and anyway there is no reason to do it that way.


Why is it so hard to do? I have seen several VST synths offer filters running in parallel..


brian
Have your PC your way: use linux!
LinuxSynths.com
amSynth on Soundcloud
User avatar
briandc
Junior Member
Junior Member
 
Posts: 222
Joined: Fri Feb 22, 2013 11:38 am
Real name: brian
Gear: 3 Midi controllers and anything linux! :)

Re: What makes a wave a wave?

Postby briandc » Fri Apr 22, 2016 11:24 am

meatballfulton wrote:We now know that the real limitation in emulating analog tone is CPU power. I just downloaded u-He's prototype Pro-One clone and that thing is the most CPU hungry synth I have used yet...one voice hits 50% on a quad core iMac. Sounds real good, though.

Don't worry, the real thing will be far less hungry because the prototype has six filters running in parallel so end-users can evaluate the results of different algorithms.

Anyway, it should be interesting to hear what's possible in 2026 8-)


Is the high CPU usage due to a higher bit-depth? (similar to resolution quality in digital photos?)
If so, perhaps trying to emulate an analog digitally is kind of useless. (Like buying a sampler synth just to play a sampled piano, it kind of defeats the purpose of it.)

brian
Have your PC your way: use linux!
LinuxSynths.com
amSynth on Soundcloud
User avatar
briandc
Junior Member
Junior Member
 
Posts: 222
Joined: Fri Feb 22, 2013 11:38 am
Real name: brian
Gear: 3 Midi controllers and anything linux! :)

Next

Return to General Synthesizers

Who is online

Users browsing this forum: No registered users and 17 guests