Base 75 Calculator?
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.
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.
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.
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.
It appears the Perl can do that:
Math::BaseArith - Perl extension for mixed-base number representation
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?
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.
Rows 1 and 2 and columns A to I represent most of what I am trying to accomplish. I could use a better formula to convert minutes, seconds, and frames.
Something more complete than this:
A simple custom formula would do just fine. Read up just a little on VBasic in Excel. It's a piece of cake. You may have to switch on some addins.