[George] What is the length returned by uiGetMusicState?

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I'm trying to make a music player but I can't find out how long it takes before another song is supposed to play. I wanted to use the length returned by uiGetMusicState to determine the tick length, but now I don't know what it is...

Is length returned in ticks, or seconds or ???
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Can't you figure that out from the length of the track? You should be able to get that in any player.
Get your own Galactic Omni Device
Get it now. It's free!!
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I need to get it using Tscript to make my media player mod be able to play lists.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Yeah, i understand that. But can you not figure out what the result returned is? It should be pretty obvious it if was ticks or seconds, or something entirely unrelated...
Get your own Galactic Omni Device
Get it now. It's free!!
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Here's what dbglog gave me:
05/29/2012 15:10:05 (playing "C:\\Users\\RPC\\Music\\Playlists\\Folder issue\\Coldplay - 42.mp3" 32149 238242)
I don't know what 238242 means :/
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

It might be the number of frames or samples or whatever they're called in mp3land.

If you divide 238242 by 32149, and then divide the song's length in seconds by about the number of seconds the song had been playing when you got these numbers, do you get numbers that look related?
Image
Image
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

The song is 3:57. 32149 is supposed to be the location of where the song is at the point I took the dbglog. If 238242 was in ticks, then 238242/30 is 7941.4. , then divide by 60 is 132.3566666666667 seconds, which is not the case.
Yeah, it's probably:
Starweaver wrote:It might be the number of frames or samples or whatever they're called in mp3land.
which is confusing o,O
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

RPC wrote:The song is 3:57. 32149 is supposed to be the location of where the song is at the point I took the dbglog. If 238242 was in ticks, then 238242/30 is 7941.4. , then divide by 60 is 132.3566666666667 seconds, which is not the case.
Yeah, it's probably:
Starweaver wrote:It might be the number of frames or samples or whatever they're called in mp3land.
which is confusing o,O
Hm, that's not the math I was asking about. Banyway, if the song is 237 seconds long, and 238242 somehow represents the length of the song, than the current position would be 32149 / 238424 * 237 --> 31.98 seconds

I notice that 32149 is fairly similar to 31.98 * 10000, and 238242 is fairly similar to 237 * 10000, now, by the way ...

Now what you need to do is see if you get the same sorts of numbers off of mp3 files with radically different bitrates and such.
Image
Image
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Oooh ok, I see. I'll try to make a table of these and post them here.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
WillyTheSquid
Militia Lieutenant
Militia Lieutenant
Posts: 195
Joined: Wed Jan 18, 2012 4:32 pm
Location: Rotterdam, The Netherlands

Since I still really really want to work on the uOST project (the unoffical Offical Soundtrack), I am interested in the ins & outs of the music play function. Still working on that list?

We could pop it on the wiki when it's done.
Image

“Normal people believe that if it ain't broke, don't fix it. (Modders) believe that if it ain't broke, it doesn't have enough features yet.” -Scott Adams

Resident mod-cobbler-together, freakspawn-fixer-upper & musical eclectro-ecumenologist.
If you love something, tweak it and twist it. Keep bending it until it breaks. Rip it apart, remix it, rebuild it. Kill your darlings and stitch them together again.

JOIN US ON IRC. IT KICKS ASS. JOIN THE HIVE MIND.
Place cursor on link. Click link. Never look back.
Post Reply