Math question!! need help!!!!

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
OK i have to change a number, to a time.

EX: 252331 is equal to 4 mins and 11 secs.
EX2: 283648 is equal to 4 mins and 11 43 secs.


Any ideas?

Thanks!
 

Spencer278

Diamond Member
Oct 11, 2002
3,637
0
0
divide by 60 to get number of minutes and then subtract total seconds - number of minutes * 60 to get seconds.
 

maziwanka

Lifer
Jul 4, 2000
10,415
1
0
or i would imagine you could enter it into excel, then convert the cell to a time format....

no brain cells involved
 

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
Originally posted by: Spencer278
divide by 60 to get number of minutes and then subtract total seconds - number of minutes * 60 to get seconds.

if u divide the first # by 60 u get a 4 digit number :confused:
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
WarDemon666,

This makes no sense to me. What units are 252331 and 283648 in?

Edit: also what is "4 mins and 11 43 secs." in your OP? Typo?
 

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
Originally posted by: Kyteland
WarDemon666,

This makes no sense to me. What units are 252331 and 283648 in?

Edit: also what is "4 mins and 11 43 secs." in your OP? Typo?

yeah. oops. lol..

4 mins and 43 seconds. for the second one.

ANd i dont know the units. but the "mcisendstring" gives me back that number when i get the position and length of a song.
thats the problem i have to figure out. lol


 

emmpee

Golden Member
Nov 26, 2001
1,100
0
0
Originally posted by: WarDemon666
Originally posted by: Kyteland WarDemon666, This makes no sense to me. What units are 252331 and 283648 in? Edit: also what is "4 mins and 11 43 secs." in your OP? Typo?
yeah. oops. lol.. 4 mins and 43 seconds. for the second one. ANd i dont know the units. but the "mcisendstring" gives me back that number when i get the position and length of a song. thats the problem i have to figure out. lol

it's in milliseconds. divide by 1000 and you have seconds.
 

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
I still dont get the exact number as windows media player. the number goes up to 7 mins 80 seconds for some songs. lol
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: WarDemon666
I still dont get the exact number as windows media player. the number goes up to 7 mins 80 seconds for some songs. lol

Can you give the bitrate and sampling rate of the songs? Maybe it's dependent on that? And for the 7 mins/80 sec song, how long is the song really.
 

Ilmater

Diamond Member
Jun 13, 2002
7,516
1
0
Give a third example as well. I could give you an equation that would fit those two, but I can't guarantee it would work in every instance unless I have three examples.
 

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
483163 = 8min3secs

i forget which one was 7 mins 80 secs long i was just goign through...

thanks guys
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: WarDemon666
483163 = 8min3secs i forget which one was 7 mins 80 secs long i was just goign through... thanks guys

emmpee already figured it out. It's in milliseconds.
 

WarDemon666

Platinum Member
Nov 28, 2000
2,224
0
0
Originally posted by: TuxDave
Originally posted by: WarDemon666
483163 = 8min3secs i forget which one was 7 mins 80 secs long i was just goign through... thanks guys

emmpee already figured it out.  It's in milliseconds. 


ok so how do u convert it to mins, and seconds?
thanks.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: WarDemon666
Originally posted by: TuxDave
Originally posted by: WarDemon666 483163 = 8min3secs i forget which one was 7 mins 80 secs long i was just goign through... thanks guys
emmpee already figured it out. It's in milliseconds.
ok so how do u convert it to mins, and seconds? thanks.

:Q

So if I told you the song was 483,163ms long, you can't convert it to minutes and seconds!?!?
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Say your number is x

floor(x/60000) = Minutes
floor(x/1000) mod 60 = Seconds

Take 483163 as an example
floor(483163/60000) = 8
floor(483163 /1000) mod 60 = 3

Answer: 8 minute 3 seconds

Note that floor(x) where x is a real number is the integer portion of x
floor(8) = 8
floor(3.1415) = 3
floor(483163/60000) = floor(8.0527166666) = 8
etc.
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Originally posted by: TuxDave
Originally posted by: WarDemon666
Originally posted by: TuxDave
Originally posted by: WarDemon666 483163 = 8min3secs i forget which one was 7 mins 80 secs long i was just goign through... thanks guys
emmpee already figured it out.  It's in milliseconds. 
ok so how do u convert it to mins, and seconds? thanks.

:Q

So if I told you the song was 483,163ms long, you can't convert it to minutes and seconds!?!?

Yeah, that's pretty sad.

X ms * (1 s / 1000 ms) = Y seconds

Y % 60 = Z minutes

Y - Z*60 = offset seconds

-silver
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: agnitrate
Yeah, that's pretty sad.

X ms * (1 s / 1000 ms) = Y seconds

Y % 60 = Z minutes

Y - Z*60 = offset seconds

-silver

That can't quite be right, if % = mod function

Y % 60 = Z (offset seconds)

(Y - Z)/60 = Minutes
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Originally posted by: Kyteland
That can't quite be right, if % = mod function

Y % 60 = Z (offset seconds)

(Y - Z)/60 = Minutes

You're right. I meant floor of Y/60 :p I did the math right but put the wrong fuction down.

-silver