Hi Fons,
I don't understand, exactly what you mean. So here's an example. I
record some music in a DAW. I have a beat based timeline (bars, beats,
ticks and a tempo). Then I want to gradually change the tempo. AFAIK
several DAWs offer predefinede curves to do such changes. You may have a
linear change, log curve, exp curve or some other type. Such predefined
automation curves might also be applied to volume changes or other
whatever.
In my example: I want to change the tempo from 120BPM to 150BPM over
four bars of equal length. I click on logarithmic curve. Which part of
the logarithmic function is used to generate the logarithmic curve? Is
there something that is commonly used as a formula? My assumption you
choose one segment of the log function, one range of x coordinates, x1
to x2. You find the number of clock ticks (for a MIDI clock or similar)
inside the four bar interval (say 50 ticks per bar, so 200 ticks for
four bars.
Scale = abs(tempo1 - tempo2) / (log(x2) - log(x1))
so:
Scale = abs(120 - 150) / abs(log(x1) - log(x2))
Increment = (x2 - x1) / number_of ticks
so:
Increment = (x2 - x1) / 200 ; 200 ticks in four bars
Then incrementally in some kind of loop or whatever:
for (cur_tick = 0;cur_tick<200);cur_tic++)
{
cur_tempo = (log(x1 + (cur_tick * Increment)) - log(x1)) * Scale + 120
}
OK, too simplistic, only allowing for going up in tempo. But hopefully
the basic idea is clearer now.
Question is: are there default values or segments that have proven to
give desireable results?
If a DAW will allow curves of different steepness, what do the change?
Will they choose x1 and x2 farther apart? Will they leave the absolute
interval between x1 and x2 but move it along the x-axis?
Best wishes,
Jeanette
Feb 23 2023, Fons Adriaensen has written:
On Thu, Feb 23, 2023 at 07:09:51PM +0100, Jeanette C.
wrote:
how is a logarithmic curve usually programmed in
a DAW or sequencer?
It's not clear what exactly you are asking...
If a = log (b), b = exp (a), what are a and b in your case ?
Ciao,
--
FA
_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev(a)lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-leave(a)lists.linuxaudio.org
--
* Website:
http://juliencoder.de - for summer is a state of sound
* Youtube:
https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
* Audiobombs:
https://www.audiobombs.com/users/jeanette_c
* GitHub:
https://github.com/jeanette-c
Baby, take the time to realize
I'm not the kind to sacrifice <3
(Britney Spears)