FM developers: how do you handle modulation amounts?

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

Post

I've just noticed something in an FM engine I made bidule, and I wonder how commercial developers handle it?

A carrier wave is, say 200 hz; a mod wave is 50hz.
If I want to FM the mod wave greater than the carrier wave's centre frequency, frequencies lower than zero end up being 'no frequency', and this introduces artifacts.

How do you normally handle carrier waves going beyond 0 hz? I can envisage a couple of ways to handle it

- a simple wrap of the hz (-10hz = +10hz)
- inverting the wrapped signal (-10 = -10hz)

Or do you limit the boundaries of the FM amount based on the carrier frequency?

cheers :)

Post

frequencies lower than zero end up being 'no frequency'
how so? they should be just negative values. if your instantaneous frequency becomes negative, it just means that you read backwards through the waveform. if you use a wavetable oscillator, it means your increment will become negative and you will not only have to take care of the wrap-around at N (taken to be the table length) but also 0. something like:

Code: Select all

while(position >= N)  // forward wrap around
  position -= N;
while(position < 0)   // backward wrap around
  position += N;
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

Music Engineer wrote:
frequencies lower than zero end up being 'no frequency'
how so? they should be just negative values. if your instantaneous frequency becomes negative, it just means that you read backwards through the waveform. if you use a wavetable oscillator, it means your increment will become negative and you will not only have to take care of the wrap-around at N (taken to be the table length) but also 0. something like:

Code: Select all

while(position >= N)  // forward wrap around
  position -= N;
while(position < 0)   // backward wrap around
  position += N;
Reading backwards.. that's what going wrong.. aaah. Many thanks Robin :) I'm not using a conventional programming language (Bidule) and it seems the oscillators are designed differently; perhaps they do not use wavetables?

I have now designed a new FM oscillator for bidule using accumulators and sine, and when the accumulator receives a signal below 0, it starts counting backwards and generating the sine in reverse. Quick test in an FM situation and it's perfect! So thanks again :)

Now I'll add tri/saw/squ shapes in to the mix.

Post Reply

Return to “DSP and Plugin Development”