FM question, Regarding Pulse Waveforms.

Grant Ransom wrote:

I asked a while back about using FM to create common waveforms. The reason, if anyone's wondering, is so one can use FM to modulate this into or from other waveforms in a more complex way than starting say, with a pulse osc. The thing I'm having problems with, is making 'pulse' like waves... as in ones that have a duty cycle of <> 50%.

Friday's Child wrote:

My messages seem to be coming in all out of order, but never mind. Luckily for me, I missed your original post!! Could be that I just rushed past it in an insane effort to catch up with hundreds of posts. As for your actual question ... man ... if there's one thing I hate it's questions like this that seem to be simple but aren't!! Grrr!!!

The thing I'm having problems with, is making 'pulse' like waves... as in ones that have a duty cycle of <> 50%.

Hmmm. Doesn't seem surprising, really, that you should be having problems! I might have a go in a little while, when I get back home to my mod... but actually I've got several other little projects of my own I'd like to do first ... plus a few other things I've promised for other people.

Here are my immediate thoughts, though.

Seems to me that in order to make any progress, the first thing to do is break the project down into something that's a little more manageable. I am definitely no expert... nowhere in the Rob Hordijk class... but something I remember when looking into oscilloscopes comes to mind. The bandwidth of an oscilloscope (which is where we would "see" a square wave, after all, is defined by its 3 dB point, this being the frequency at which a sinusoidal signal has been attenuated to 70.7% of its initial value. This is easy enough when you're dealing with a sine wave. When you come to a square wave (or any other wave, for that matter) things are a bit more tricky. As you well know, a square wave is made up of an infinite number of sine waves, and is constructed of the fundamental frequency plus a vast number of odd harmonics. However, the fundamental frequency in fact makes up something like 82% of the total. The third harmonic comprises about 9%, and the fifth about 3-1/4%. Therefore, about 94-95% of the energy of a square wave is made up from the 1st, 3rd and 5th harmonics. In the case of an oscilloscope, you will have of the order of 2% on account of the user's inability to focus on the CRT properly ... plus approximately another 4% on account of machine errors. To all intents and purposes, therefore, if we can aim for that 96% we will be able to fool anyone into thinking that we have a real square wave on our hands. We do not, therefore, need to aim any higher than the fifth harmonic in the first instance. If that works, we can then aim for greater sophistication.

So... how do we use FM to recreate a fundamental plus specifically and only the third and fifth harmonics, eliminating all others?

I don't know how anyone else thinks of it, but I always think of FM as just a fast vibrato. It's just that the vibrato itself is audio, and its depth is sufficient to fool us into thinking that there's something there when really there isn't. We don't hear repeated glisandi and the like anymore... they get the fancy term of sidebands. Those sidebands are then perceived as additional spectral components, when all you really have is a big and fast glissando going on. I expect everybody knows all this stuff, but it's not that familiar to me, to tell you the truth, and I'm just thinking aloud about a problem that nobody else seems to be interested in!!! Those sidebands depend upon the ratio between the carrier -- i.e. the thing to which vibrato is being applied -- and the frequency with which it is being modulated. What we will get is either harmonic or inharmonic relationships with the base or carrier frequency. The exact placement of the sidebands is a function of the ratio between the carrier and the modulator, with their numbers and their amplitude vary according to the amplitude of or depth of the modulator. Unfortunately, at this point people go off and start talking about Bessel functions at which point I usually go off and have a cup of tea and play a harp or something. As an approximation, though, the number of sidebands -- and they appear on either side of the base or carrier frequency -- is equal to "the modulation index" plus 2. Also, the "position" or frequency, of those sidebands is given by the relationship:

So... if we have a base or carrier frequency of 400 Hz, and a carrier of 100 Hz, then we would produce the following sidebands:

This gives us frequencies of 300 and 500 for the first sideband; 200 and 600 for the second; 100 and 700 for the third etc etc etc. Thus using a carrier of 400 Hz and a modulator of 100 Hz would give us the set 100, 200, 300, 400, 500, 600 and 700 Hz. More particularly, this would sound like a fundamental along with that collection of harmonics. Clearly, this ain't no square wave.

So... what we need to do is go the other way around and set up a recipe for what we DO want. Given this particular example, we want to end up with tones only of 100, 300 and 500 HZ -- and we want to jettison the rest. And here comes the difficulty, as far as I can see. The 100 Hz tone is the subtraction member of the third sideband; the 300 Hz tone is the subtraction member of the first sideband; and the 500 Hz tone is the addition member again of the first sideband. That's to say, the square wave we are aiming for through FM (and which would constitute 96% of the energy of a "real square wave") can be procured by making sure that we utilize only the [c - (1 x m)], [c + (1 x m)] and [c - (3 x m)] components of any given frequency modulation (where c is the carrier frequency and m is the modulator frequency).

My theoretical knowledge of this stuff really is ropey, but the difference between me and other people is that I really don't mind looking like three hundred shades of an idiot so that's what I would head of trying to do. It looks very much to me as if this is what we are aiming to do.

Unfortunately I am not at home with my NM right now, but I shall give some thought to how to extract those particular sidebands, and to reject the others -- and one should gradually be able to produce a square wave of any kind to one's satisfaction. To be honest, I think I'd go straight to the sinebank and start there. At least... since it looks to me that the above is what we are trying to aim for, using the sinebanks would seem to me to be the most direct method.

Doubtless someone or other will now write in and point out where my reasoning is faulty... but at least I tried!!! Do hope the above helps. If not ... sorry I am indeed, but I did at least try!!!

Oh yes ... you could also go here to Rob Hordijk's FM workshop where you might pick up a few ideas... in case you don't already know of it!! Probably, everything you need to know and more is right there. Workshop FMsynthesis

Grant Ransom wrote:

Many thanks for the info, I've read quite a bit of the theory now, but it's always good to see other peoples insights; the "fast vibrato" perception is nice.

As I forget the theory quite quickly (being allergic to even slightly complex formulae which I don't use constantly :-) ) I'd like to make a reference table of many waveforms and the FM parameters to set them up. The main problem has been creating pulse type waves which are 'spikey', ie. less than 50% duty cycles. Which are useful for emulating some real instruments. In laymans terms; I just can't get a spike