Quantcast

Concave/Convex modulators in Polyphone

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Concave/Convex modulators in Polyphone

Dries
This post was updated on .
Dear all,

In order to calculate the modLFOfrequency I was wondering what are the functions behind the convex and concave curve types selectable at the modulator section?

Concave and convex

BR, Dries
Dries Nelemans - Ridderkerk, The Netherlands
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Concave/Convex modulators in Polyphone

mezzo
Hello Dries,

The specifications of sf2 format do not describe clearly the functions used for the convex / concave forms. I read the fluidsynth sources and here is what I found:

First let's consider these concave and convex functions:
concave(0) = 0
concave(value) = -(20 / 96) * log ((127-value)^2 / 127^2) / log (10)   value varying between 1 and 126 included
concave(127) = 1

convex(0) = 0
convex(value) = 1 + (20 / 96) * log (value^2 / 127^2) / log (10)          value varying between 1 and 126 included
convex(127) = 1

The different values are then computed as follows:


convex(input)    |    convex(127 - input)
------------------------------------------
concave(input)   |    concave(127 - input)

Davy


Sources:
http://sourcecodebrowser.com/fluidsynth/1.0.8/fluid__conv_8c_source.html lines 00070 to 00086
https://github.com/jnetterf/creator-live/blob/master/3rd-fluidsynth/src/fluid_mod.c lines 208 to 231
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Concave/Convex modulators in Polyphone

Dries
Dear Davy,

Thanks for your reply, I will investigate in this.
Function looks quite complicated!

Best regards,
Dries
Dries Nelemans - Ridderkerk, The Netherlands
Loading...