0
$\begingroup$

Sorry if the title of this post is difficult to understand...

Basically I am trying to animate something on an X axis based off a "tempo"... The possible valid X coordinates are between -30 and +30, so my range is really 0-60.

I am looking for a way to skip steps of the 0-60, based off of the value of the tempo.

For example, if T=1 (a ridiculously slow tempo), then I would expect to be moving my animation on a per pixel basis, so my X would increment 0,1,2,3,4,5..60...

But if T is something higher, then it would end up skipping steps so that it could arrive at 60 faster... In other words, if T was a really large number, the steps might be something like 0, 15, 30, 45, 60.. or even larger.. maybe ever just 0, 30, 60...

I know what the end goal is of what I want, I just am not sure what out of the old math toolbox to use to get where I want to go with this. If anyone can walk me through the process of how one would figure a way to arrive at the goal, that would great-- because I am drawing a blank on this one.

  • 0
    What is the range for T and how is it chosen (steps of 1 of steps varying between some range or something else)? Knowing that, we can probably come up with an adaptive step size based on the X_incr range of {0 ... 60}.2012-09-20
  • 0
    T could be anything... 0-infinity.. But we're talking musical tempos, so realistically it's probably going to be something like 30 to 240...2012-09-20

1 Answers 1