IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Simple way to extract track times from multiple files?
PaciPag
post Jun 4 2012, 17:53
Post #1





Group: Members
Posts: 3
Joined: 4-June 12
Member No.: 100414



Hi all.

I've been digitally transferring a lot of recordings lately, and have been creating simple liner notes for future reference.

One thing I've been wanting to include in these notes is track timing - but typing in each individual track's timing by hand gets very, very tedious very, very quickly tongue.gif

Is there any program or plugin that will let me highlight a group of .FLAC files, maybe do some right clicking, some left-clicking, a drop down menu or whatever, and end up with a bunch of individual track times in my clipboard?

I know foobar can give a "total playtime", and I can manually go to each track one-by-one and get the track times one at a time via properties, but neither one of these methods is exactly ideal. Going through each track one at a time involves a lot of tedium (the quickest method is highlight track, alt+enter, four tabs, right arrow, tab, down arrow seven times, control-C - and after all that, you still have to manually edit "Duration : 51:25.693 (136079076 samples)" into something more tidy, and manually round up when the .HHH is > 499).

Thanks in advance for any ideas!

[—]

And before anyone asks "what kind of single song lasts for over 50 minutes", the song I used for the example is Acid Mothers Temple's "IAO Chant from the Cosmic Inferno" tongue.gif

This post has been edited by db1989: Jun 4 2012, 18:28
Reason for edit: Posts can be edited for up to 1 h; please do not double-post.
Go to the top of the page
+Quote Post
db1989
post Jun 4 2012, 18:29
Post #2





Group: Super Moderator
Posts: 5159
Joined: 23-June 06
Member No.: 32180



QUOTE (PaciPag @ Jun 4 2012, 17:53) *
Is there any program or plugin that will let me highlight a group of .FLAC files, maybe do some right clicking, some left-clicking, a drop down menu or whatever, and end up with a bunch of individual track times in my clipboard?

I know foobar can give a "total playtime", and I can manually go to each track one-by-one and get the track times one at a time via properties, but neither one of these methods is exactly ideal.

foo_texttools sounds like exactly what you want.
Go to the top of the page
+Quote Post
derty2
post Jun 4 2012, 19:02
Post #3





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



I am a foobar2000 user, and I wanted a solution for such a task once upon a time, and I solved it like this. . .

- Add a third-party component to fb2k named "Text Tools" (foo_texttools).
Text Tools allows you to copy formatted text info to the clipboard from the context menu in the fb2k Playlist Viewer.

- Create a title-formatting pattern for Text Tools (fb2k preferences -> Tools -> Text Tools)

Try this title-formatting pattern:
CODE
$if($and(%discnumber%,%tracknumber%),%discnumber%'.'%tracknumber%'.',$if(%discnumber%,%discnumber%'.##.',[%tracknumber%'.']))' '$if2($meta(title),%filename%)'          '$if(%_length%,$iflonger(%length%,5,$left('00:00:00',$sub(8,$len(%length%)))%length%,$right('00:00:00',$sub(5,$len(%length%)))%length%),)


Select tracks in your playlist viewer,
Right-click context menu -> Utilities -> Text Tools

Example output of 6 tracks selected in the playlist viewer,
and choosing the above title-formatting pattern from the Text Tools context menu
and pasting into a text file...
CODE
01. Fun          07:44
02. Games          08:02
03. Mercy, Mercy, Mercy          05:11
04. Sticks          03:59
05. Hippodelphia          05:51
06. Sack O' Woe          10:34
Go to the top of the page
+Quote Post
PaciPag
post Jun 5 2012, 03:04
Post #4





Group: Members
Posts: 3
Joined: 4-June 12
Member No.: 100414



QUOTE (derty2 @ Jun 4 2012, 14:02) *
I am a foobar2000 user, and I wanted a solution for such a task once upon a time, and I solved it like this. . .


Oh wow, absolute genius! Exactly what I was hoping for. biggrin.gif

I'm not too great at parsing wildcards - how would I go about changing the output text to be "<track#>._[title]_[<time>]" (with the underscores each being a single space character) - in other words:

CODE
01. Fun [07:44]

Go to the top of the page
+Quote Post
derty2
post Jun 5 2012, 15:59
Post #5





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



So basically you want the same pattern as before but with one space between elements and square brackets surrounding the duration.

Firstly, I would like to point you to the foobar2000 title-formatting reference (fb2k main menu -> Help -> Title formatting help)
and near the bottom of the page there is info on usage of the square brackets and single quotation marks.

In a nutshell... the square bracket normally is a conditional display modifier of other syntax expressions, but it also can be modified to display itself by
surrounding it with single quotes.

Try this new title-formatting pattern:
CODE
$if($and(%discnumber%,%tracknumber%),%discnumber%'.'%tracknumber%'.',$if(%discnumber%,%discnumber%'.##.',$if2(%tracknumber%'.','##.')))' '$if2($meta(title),%filename_ext%)' ['$if(%_length%,$iflonger(%length%,5,$left('00:00:00',$sub(8,$len(%length%)))%length%,$right('00:00:00',$sub(5,$len(%length%)))%length%),'[ ... ]')']'


For learning purposes, I suggest you copy-paste the old pattern and the new pattern into a <text file> and have a look at how they are different to each other.
Take note of how I am using single quotes and the square brackets.

If you want to write complex formatting expressions yourself, then you really need to use a text editor which has syntax highlighting.
I use Notepad2-mod myself (it doesn't need installation, grab the zip package).

To see what I mean, Change your <text file> file extension from .txt to .js
run Notepad2-mod and open your <text file> ,
click next to a parenthesis bracket and notice how the brackets work in open-close pairs and change color to bold red.
remove a single quote mark and notice how the the text colors change,
..the green text is a block of text between start-end single quote marks,
..the black text is a syntax operator,
..the purple text is the syntax operator boundaries.

Good luck and goodbye.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st April 2014 - 01:54