Ingreso rápido:  

Forum: General Discussion

Tema: How to convert database values to time

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

Anybody know how to convert the values in the database for the cue positions to time? Are these frame or sample values and what is the formula to convert them to time?

i.e. how to convert the values in bold to time:
<Cue Num="0" Name="Cue 1" Pos="56619" />
<Cue Num="1" Name="Cue 2" Pos="640142" />


Thx
 

Mensajes Mon 29 Aug 16 @ 8:13 am
PachNPRO InfinityMember since 2009
This is a v7 database isn't it?

EDIT:
It has to be a v7 database. V8 uses a different method.

So I believe it is

value / sample rate

where value is the cue point value and sample rate is 44100.

That would be
Cue 1 at
56619 / 44100 = 1.28 seconds

Cue 2 at
640142 / 44100 = 14.52 seconds
 

Mensajes Mon 29 Aug 16 @ 8:29 am
Yes, that's v7 and the number you see is "samples from start of the song"
Depending on the sample rate of the song, 44100 samples would be one second on most cases.
So as PachN said Cue 1 is 55619/44100 = 1.28 DECIMAL seconds = 1 second & 280 milli-seconds

Version 8 uses a different system:
<Poi Name="Cue 2" Pos="5.270604" Num="2" />
The position here is stored as "seconds from start of the song" (still DECIMAL)
In other words,
<Poi Name="Cue 6" Pos="88.504762" Num="6" />
would be: 1 minute, 28 seconds, 504.762 milliseconds from start.
 

Mensajes Mon 29 Aug 16 @ 11:56 am
Thanks guys!
Exactly what I was looking for.
Sorry I didn't specify that the example values I gave was from a V7 database.
 

Mensajes Tue 30 Aug 16 @ 9:57 pm


(Los tópicos y foros antiguos son automáticamente cerrados)