Calculate an arbitrary value based on a two points

906 Views Asked by At

I am working in Fruity Loops studio, and funnily enough, I need to solve something with math. I want a way to calculate the track tempo I get based on an arbitrary value.

I know the following values give these tempos:

 60 BPM = 0.09765625
150 BPM = 0.27343
180 BPM = 0.33203125

So say I want figure out a method of finding an arbitrary number, and I already know those three values. What would the formula look like? My math skills could really use some work, but that's not important here.

2

There are 2 best solutions below

7
On BEST ANSWER

If we suppose that the relationship between the tempo and the output value is linear, then we can easily determine an equation for the line. I used a WolframAlpha to find the equation, rather than breaking out 'ye olde calculator. Letting the $x$-axis represent BPM and the $y$-axis represent your parameter, it gave me $y=0.00195313x-0.019313$. So you can evaluate this equation for $x=150$ BPM to get $y=0.2734382$.

Now, this only holds if the relation is a straight line. If you have any information about whether the relationship is linear or not (for example, a third ordered pair), you should add it in, and we might be able to give you a better approximation.

ETA: looks like you got the same answer as me for the parameter corresponding to 150 BMP. I would say that's pretty good evidence that your relationship is linear. Therefore, you can use the above equation to calculate the parameter (percentage?) for any tempo.

0
On

Because this is a linear function (it's shaped like a line), the first thing to do is find the slope:

$m = {{y_2 - y_1} \over {x_2 - x_1}}$

$m ={ {.33203125 - .09765625} \over {180 BPM - 60 BPM}} = 0.001953125 $

Since we also have a point, using the point-slope formula is most convenient here.

$y-y_1 = m (x-x_1)$
$y - 0.09765625 = 0.001953125(x - 60)$
$y = 0.001953125 x - 0.01953125$

In this equation, x is the BPM, and y is your output. You'll find that this holds for other points, and the method of finding the answer used here will work for any line.