Help - Search - Members - Calendar
Full Version: Displaying time by mm:ss.ff?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Erich w/ an h
When I do the length of a set of files in shntool, it displays the time by minutes, seconds, and frames (1/75th of a second). Is there a way to display it as such in foobar? I was writing a little copy script to create txt files easily, but i never put milliseconds in the time column, only the frames as outputted by shntool.

If theres no way to do it, I quickly wrote a little thing that calculates the frames pretty easily:

CODE
.$num($ifgreater($right($num($mul($right(%length_ex%,3),75),5),3),500,$add($left($num($mul($right(%length_ex%,3),75),5),2),1),$left($num($mul($right(%length_ex%,3),75),5),2)),2)


but i was hoping there was no need for such a string of coding.

Oh, and if someone knows a way to clean that up a bit, that would be swell, I just threw it together in a few moments and didnt think about any easier way of approaching it.

Thanks,
~E
kode54
You can already shorten that slightly with $put and $get:
CODE
$num($ifgreater($right($num($put(f,$mul($right(%length_ex%,3),75)),5),3),499,$add($left($num($get(f),5),2),1),$left($num($get(f),5),2)),2)


And that should probably be 499 and not 500, so it rounds up on .5.
Erich w/ an h
good call on both, thanks a lot smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.