Author |
Message |
johnyradio
Joined: Mar 13, 2014 Posts: 18 Location: San Francisco
|
Posted: Thu Jan 15, 2015 1:50 pm Post subject:
How to do Exponential FM? |
|
|
hi
chip frequency resolution specs are often given in terms of hz, eg "1 hz resolution".
but that's not useful for music, since 20 hz in the lowest octave is a full octave, but 20 hz in the highest octave is only a semitone.
What's a simple way to get exponential frequency control in a digital hardware oscillator?
ie, can one arrange a binary counter chip and an oscillator to get exponential frequency control?
thx! |
|
Back to top
|
|
|
Larva
Joined: Mar 30, 2011 Posts: 6 Location: The Soil
|
Posted: Fri Jan 16, 2015 8:24 am Post subject:
|
|
|
My experience has never encountered an expo controlled digital oscillator. Digital oscillators are most commonly done as linear phase accumulators.
Even in the analog world, there is no such thing as a true "expo" oscillator. All expo VCOs are linear CCO based (CCO = current controlled oscillator) cores that have a front end voltage to current converter that outputs a linear current from an expo CV input.
As you may know, in the analog world, the reason expo pitch CV is valued is for pitch modulation. Using expo pitch CV, simply adding an LFO value to the CV gives a pitch modulation that is perceived as the same regardless of where in the instrument's pitch range the CV is. It is possible to do this with linear pitch CV as well, but it requires using analog multipliers which can be tedious and good ones can be expensive.
In the digital world, multiplies are no longer the clock consuming calculations they were in the past. Many inexpensive modern computing devices now have multiplies that occur in one system clock. This sets the current digital state of the art at an advantage over analog with regards to pitch modulation since it can be done simply with simple linear phase accumulator oscillators and without a large cost in CPU clocks.
Linear phase accumulator systems are also very fast, a simple accumulator register to which is added a linear phase increment. Adding the two required multiplies for pitch modulation is very clock cost effective and results in an identical pitch modulation effect as expo pitch presents in analog.
The technique used for pitch modulation of linear phase accumulator oscillators is as follows:
The oscillator is fed a control value made up of the linear phase increment (from pitch table) which is added to a final modulation value. The final modulation value is calculated as the table phase increment multiplied by a scaling value which is then multiplied by the modulation source (such as an LFO). It works by adjusting the amplitude of the modulation to track with the pitch.
PhaseInc = TableIncrement * ModulationScale * ModulationSource + TableIncrement
As you can see, as the table phase increment value increases, so does the modulation amount that is added to the table's increment value.
HTH |
|
Back to top
|
|
|
johnyradio
Joined: Mar 13, 2014 Posts: 18 Location: San Francisco
|
Posted: Sat Jan 17, 2015 4:57 pm Post subject:
|
|
|
thanks for this very informative post.
still, i'm hoping to figure out a simpler way to achieve an exponential digital oscillator.
it occurs to me that if you drive a crystal oscillator into a binary divider, then you high-resolution frequency at the low end, and low-resolution at the high-end.
Ie, if your divider is set to 1 (clock / 1), you get the highest frequency (same as clock). If you set your divider to 2 (clock / 2), you get a frequency a full octave lower.
If you set the divider to it's highest value (say 1,000), you get clock/1000. If you then set the divider to 999 (clock/999) your output frequency will only be a semitone (or so) higher.
On the other hand, reading a wavetable at different rates (by skipping addresses) you get the highest frequency-resolution at the high-end, and lowest frequency resolution at the bottom-end.
So it seems interpolation and/or scaling are the only ways to get musical response.
Still hoping there's a simpler way... |
|
Back to top
|
|
|
|