[sdiy] Detuning in Digital
Veronica Merryfield
veronica at merryfield.ca
Mon Apr 2 09:27:12 CEST 2012
PS If you don't have floating point, one could use fixed point, just need some care in selecting how the values are scaled to get the dynamic range required.
On 2012-04-02, at 12:23 AM, Veronica Merryfield wrote:
> Assuming you are use a phase accumulator, then you modify it with a suitably scaled value.
>
> As to implementing the log calculation, use a Newton/Taylor series and suitable scalers for each term. Oh hang on, you said no floating point. Does the ARM not have any floating point instructions?
>
> I recently did some work with taylor series for sine generation and did some checking on the resolution and error. Would be easy enough to do for the log calculations you need. For sines, 4 MACs got to 12 bit resolution, 5 MACs to 18 bit, 6 MACs to 25 bit and 7 MACs to 32 bit. The trick is to precalculate the divisors as scalers and roll them into the MAC and to process the terms successively such that each MAC is also increasing the power term.
>
>
> On 2012-04-01, at 11:46 PM, Matthew Smith wrote:
>
>> Veronica, Achim, thanks.
>>
>> Now I know that logarithms are involved, I will most certainly be using lookup tables! (Even if I were doing this on a fast-clocked ARM, I'd use lookup tables for at least part of the math.)
>>
>> I guess the question I should really be asking is how do older DCOs handle pitch bend - because I bet they aren't doing any heavy number-crunching.
>>
>> Note: it's pitch bend or frequency modulation in which I am interested, as opposed to "master detune." The latter is easy - just change the clock rate to the whole system (apart from the UART handling MIDI in) and not worry about values - it's a bit up, or a bit down.
>>
>> Cheers
>>
>> M
>>
>> --
>> Matthew Smith
>>
>> Business: http://www.smiffytech.com
>> Blog: http://www.smiffysplace.com
>> Linkedin: http://www.linkedin.com/in/smiffy
>> Flickr: http://www.flickr.com/photos/msmiffy
>> Twitter: http://twitter.com/smiffy
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
More information about the Synth-diy
mailing list