I'd like to divide one int by another and get a fractional output.
Application - I'm playing through a table, continuously looping. I have an int (called ctr) that is counting up as we play through. When ctr=0, we are at the beginning of the table; when ctr=length we are at the end of the table.
In this case, length would be the size of table allocated (say 262,144) divided by 16 (audio-rate is 16x k-rate) = 16,384
Now say I want to generate a fractional value for our current position inside the table.
I would normally do
(ctr / 16,384) * 64.0
which should give me an input I could send to the 'pos' input on the table/record object, matching the table/play's position in the table as it plays back.
This would let me do overdubbing to the loop... we want to start the recorder at the same position as current playback.
How would you go about this?