I am looking for a calculator (or at least a formula) where it calculates base on 1 is divided into 75 parts (0-74). I work with editing music based on 75 frames per second. Therefore if one beat is 2 seconds 4 frames then how many seconds and frames make up two measures? Or the reverse, if I know how many seconds frames is two measures, how seconds frames is one beat. This will help me to build accurate loops of any length more quickly.
154 frames x 8 beats (two measures) = 1232 frames / 75 = 16.426666 seconds
how many frames is in .426666 seconds or what is the remainder of 1232/75
16 seconds 32 frames is the answer I'm looking for the calculator or formula to provide.
Jan 17th 2010, 01:48 PM
I think you cannot do it as accurately as you may intend.
1/25 = 0.04 = 0.000010100011110101110000101... (2) is not your friend. It's regular, but not with few enough digits to be particularly useful.
1/3 = 0.33333333.... = 0.010101010101... (2) is not too bad. It's at least regular with only two digits.
You are going to have machine precision problems no matter what you do.
Whatever you do, you will have to stay aware of exactly what error exists and when and where you can ignore it and when and where it stacks up and comes back to bite you.
Just my opinion. Again, I may have no idea what I'm talking about. I've sort of been leaning that way this week.
Jan 17th 2010, 04:50 PM
I am no formula writing genius. Basically it looks like step one, convert minutes, seconds, frames to an all total frames number.
One measure of music:
49sec 50fr = 3725 absolute frame position relative to 0 start
53sec 52fr = 4027 absolute frame position relative to 0 start
4027-3725 = 302 frames difference
Two measures of music equals
3725+302+302 = 4329 absolute frame position relative to 0 start
Now calculator must convert 4329 back to minutes, seconds, frames
Two measures of music should now show as
I would like a calculator that will do this.
Jan 17th 2010, 05:22 PM
It is no problem for a development langauge like APL. The Encode and Decode operators do exactly what you want with relative ease.
I'm guessing you don't have APL sitting around, so your challenge is finding a platform you can use.
I'm not seeing much else, but I have little doubt there is other stuff out there. What environment are you in? PC, MAC, iPhone, TI-84+? paper and pencil?
Jan 17th 2010, 07:00 PM
I used Perl years ago for string search and replace functions so I understand some programming but not enough to go in this direction.
I have a start of the concept in a spreadsheet I compiled once but it only works for numbers less than one minute. In A1 and A2 put in the value of seconds and frames for one measure of music. Then columns B, D, and F give you times for two, three, and four measures. Columns C, E, and G convert to total number of frames.