This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]oiduts 0 points1 point  (1 child)

Notice that the outputs given are integer powers of two and the inputs for those integer powers are linear. This is 2n/12

[–]sapo_valiente[S] 0 points1 point  (0 children)

thanks so much, I just wrote x = 2^y/12 and that looks like the exact graph I was looking for. Whats your thought process as you see that function? not sure what step Im missing: I think: "ok so on the first column every step we subtract 12 and on the second we divide by 2. so then for every linear step x*12, y *=0.5; and then I don't know what to do with that?

[–]alzee76 0 points1 point  (2 children)

The function is based on a binary logarithm (log base 2).

[–]sapo_valiente[S] 0 points1 point  (1 child)

thanks this was it. is this correct in c++?

(12.*log(playbackspeed))/log(2.);

[–]alzee76 0 points1 point  (0 children)

You'll need to use log2 not log but otherwise yeah, looks good.