Composite Waveform Synthesis

Hahaha. I’ve now coined that term, for the lack of a better one, to describe a method of sound synthesis by compositing waveforms together. This isn’t additive synth, nor subtractive synth.

I’ve been studying every single method of synthesis that I can get info on. And there are quite a handful of them out there. I originally had the idea of trying to simulate subtractive synth on the PCE. Yeah, the idea sounds crazy, but hear me out. The very basics of subtractive synth, has to do with controlling the timbre of a waveform, over time, and at a low frequency. This is done with a controllable filter (analog voltage controlled filter or digital) that dulls a sound over time (or reverse).

Now, you can simulate this with wavetable synth (not sample based synth like mod/xm). And Bloody Wolf for the PCE tries to do this, with its brute force method. So I figured, why not use one waveform to subtract characteristics of another waveform, over a slow period of time. The idea sounds simple enough, and I had meant to try this out some time ago.

How does it work? Well, the amplitude of two or more waveforms… add. Waveforms are signed. There are negative values. If you play a waveform that’s inverted of a normal waveform, at the same time, same frequency, and same amplitude – they will cancel each other out. Pretty simple stuff. But what happens if you an inverted waveform… that’s just slightly different? Every corresponding sample of the inverted wave, will be canceled out. For samples that match up, and arent’ exactly inverted – there will be the difference left over. Move over, if you applied a volume envelope to the ‘subtractive’ waveform – you’ll slowly (relatively speaking) reduce/morph the waveform from it’s original form to the final subtracted form – with the left over samples all to themselves.

Hopefully this makes sense to you. It’s simple stuff, but you probably need a little background on waveforms, amplitudes, and mixing.

So, you now have a transition process. This gives you a timbre control system. Now for the more important details. For the sake of clarity, we’ll name the main waveform/channel the ‘carrier’ and the modifying waveform the ‘composite’. The carrier’s waveform should be defined in a single polarity range. I use the positive side… because it looks appropriate. But it doesn’t specifically matter. The composite waveform should be in the negative polarity range (all negative values). For values *that* don’t modify specific carrier’s waveform corresponding samples, you set to 0 (whatever 0 line is on your system. PCE it can be $0f or $10). So 0 to max negative, will subtract from the carrier’s sample in that slot/index position.

This is a little confusing to visualize. If you had a saw and you wanted to clip just the last part of the point/tip, you could keep all samples leading up to it as 0 line, then have an inverse of that peak in the negative range. If both carrier channel and composite channel were at max volume, you could get the clipping you defined. By itself, this really is useless. You can just draw a waveform that looks like that. So, you create special envelope to control the volume of the composite channel waveform. If you wanted a slow somewhat drawn out change in timbre, you have a very slow attack ramp up (relatively slow, because attack is usually very fast). For sustain, you’d most likely want a ping-pong loop point to keep the sound/timbre wavering up and down. Then whatever style exit ramp for key off.

I could have called this ‘subtractive’ waveform synthesis. But there’s another side to this. You also do the opposite of subtracting or dulling a waveform. You can exaggerate specific areas of it, or create you spikes or such. Even at the same time. A much more capable morphing effect. This is why I choose composite. And the term is already out there, to describe layering of different waveforms to create more harmonics in a waveform type. So it fits perfectly.

The last thing I want to add, is that detune really has an incredible effect here. It really brightens the timbre and adds its own wavering effect (which is already pretty common for layering channels).

Ok, this is the last thing I want to add. If you have a really bright sound and the timbre control is fairly aggressive, you’ll hear it in parallel with other notes. More specifically, chords. This is important, because the PCE only has 6 sound channels (jerks!). You can do a 3 note chord, but only needing to use 4 channels – not all six. That leaves two channels left over for other stuff.

Finally, here’s an example: . This is 4 channels, 3 notes, timbre control for one of the notes. Plays through one octave of notes, to the start of the next.

If it were this easy, wouldn’t everybody be doing it? That’s the catch. Not unlike other synths, the setup is pretty touchy. Even small differences/errors in the composite waveform can give you artifacts. Artifacts not in the sense of aliasing or such, but buzzy sounding. You have to massage both the carrier and the composite waveforms to get that perfect smooth sound. Not too soft because the timbre variance will be small, and not too large because the timbre variance will be buzzy or tiny. Finding just the right sound in between took me quite a bit of time.

Anyway, that’s the basics of it. Believe me, it does get a little more complicated than that. I didn’t go into detail about turning detune on, then off (and maybe multiple times during the length of the sound to make it more rich) and where to put it. The good thing is, once you find a good spot, right speed, right amount, etc of the detune stuff – it scales for you when you play notes up and down from that base note you turned the instrument define/sound too. The bad news it, if you go too far out – you’ll have to come up with a scaling system for these parameters – or do multiple defines for different octave ranges. The choice is yours. That assumes anyone reading this blog will even attempt this, let alone on the PCE. So very few people actually do anything audio related on the PCE.

Edit: Oh yeah, I forgot to mention that you need to sync both channels waveform pointers (and down counters). I’ve already posted what regs do that on a previous blog entry 😉


One Response to “Composite Waveform Synthesis”

  1. Hmm. My explanation is kind of vague. I’ll write a more detailed explanation, along with visual aids.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: