Home AMX Forum NetLinx Studio
Options

Ramp up volume within 20 minutes?

bobbob Independent Programmer
Hi guys,

What would be the best way to smoothly ramp up volume within a longer time interval, say 20 minutes?
Thanks much for any feedback!

Comments

  • Jorde_VJorde_V UX Scientist
    bob wrote: »
    Hi guys,

    What would be the best way to smoothly ramp up volume within a longer time interval, say 20 minutes?
    Thanks much for any feedback!

    A timeline I guess
  • ericmedleyericmedley Senior Member - 3709 Posts
    bob wrote: »
    Hi guys,

    What would be the best way to smoothly ramp up volume within a longer time interval, say 20 minutes?
    Thanks much for any feedback!

    for a linear (which is not percieved as linear by human ears by the way) ramp take the ramp time divided by the number of intervals between the current volume and the desired volume and ramp up by that amount. Create a timeline using the interval as the event time and a counter to click of the number of times you need to get there.

    So for example if your ramp is 40 units of volume over 20 minutes.

    set the timeline interval at every 30 seconds, your counter at 40 and run the timeline.
    You can dynamically change the ramp time and duration by doing the math prior to launching the timeline.

    volatile long TL_My_Ramp_Time[1];
    volatile integer TL_My_Ramp_ct

    TL_My_Ramp_Time[=30000
    TL_My_Ramp_ct=40

    timeline_create (TL_My_Ramp,
    TL_My_Ramp_Times,
    length_array(TL_My_Ramp_Times),,
    timline_absolute,
    timeline_Repeat )

    Timeline_event[TL_My_Ramp]{
    // send the vol ramp
    // decrement the counter and check for if done
    }
  • bobbob Independent Programmer
Sign In or Register to comment.