Export Text File with converted audio?

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
magicgravy
Posts: 4
Joined: Wed Apr 09, 2008 5:21 am

Export Text File with converted audio?

Post by magicgravy » Wed Apr 09, 2008 5:43 am

I am in the midst of converting over 1.5 TB of FLAC to MP3 - over 1,000 folders of live concerts. There is an important .txt file in each flac folder that I need in the MP3 folder as well. My output is set to create a new folder in a specified destination. However, I need to now go back and duplicate the text file in the MP3 folder. This is much easier than creating new folders and copying all music, image and text files over to it, but it still means over 1,000 individual steps insteadf of a single feature.

It would be nice to have a feature that said "copy unrelated files to destination folder." This would include any image files and text files, with perhaps the option to not include ffp.txt or md5 checksum files.

Or, is this already a feature and I'm missing it?

Thanks for the great software!

Mike1
Posts: 201
Joined: Thu Sep 21, 2006 3:55 pm

Re: Export Text File with converted audio?

Post by Mike1 » Wed Apr 09, 2008 9:19 am

I think you can probably do this with rsync, because I think rysnc can be made to work selectively, so that it only copies files with a particular extension. And certainly, rsync is available on OS X, so if you can get it only to operate on the textfiles, you're home and dry, since it'll just duplicate every one on the one drive into the same hierarchy on the other.

Perhaps someone who knows more about shell scripting than I can confirm that.

Mike1
Posts: 201
Joined: Thu Sep 21, 2006 3:55 pm

Re: Export Text File with converted audio?

Post by Mike1 » Wed Apr 09, 2008 10:30 am

OK, I had a few minutes to spare, so I looked at the man page -- which is available online here:

http://www.ss64.com/bash/rsync.html

So let's say you have two directories called "FLAC" and "MP3". For the sake of argument, we'll say they're both on the local machine, both are in the "Music" directory in your home area, and your username is "bob". Here is the command I think you'd need to issue in Terminal to copy those textfiles in the subdirectories in "FLAC" into the subdirectories in "MP3":

rsync -r --exclude *.flac /Users/bob/Music/FLAC/ /Users/bob/Music/MP3

Things to note:

rsync Synchronizes the file trees
-r makes the command recurse through the directories
--exclude excludes any files matching the given pattern -- in this case any file with the extension .flac
/Users/bob/Music/FLAC is the source directory (change as appropriate)
/Users/bob/Music/MP3 is the destination directory (change as appropriate)

Finally, there must be a trailing slash after the source directory /Users/bob/Music/FLAC/ (shown in red here), because that's the syntax you use to indicate that you want to copy the contents of the source directory not the source directory itself.

This seems right to me. Would any bash gurus like to comment on this?

magicgravy
Posts: 4
Joined: Wed Apr 09, 2008 5:21 am

Re: Export Text File with converted audio?

Post by magicgravy » Wed Apr 09, 2008 2:20 pm

thanks for the tips!

one question - as i am converting files to MP3, the folder name is changed, as well as the track names.

for example - ph1988-01-27.11822.flac16

becomes - 1988-01-27 - Gallahger's - Waitsfield, VT

is it still possible to use rsync in this instance, without typing in each folder name?

given the tracking is taken care of - i guess dragging over a text file 1,000 times isn't as bad as tracking 15,000 songs and their respective folders!

if this is not possible to do - would it not make for a useful feature on max to "synch text files in new folder?

Mike1
Posts: 201
Joined: Thu Sep 21, 2006 3:55 pm

Re: Export Text File with converted audio?

Post by Mike1 » Wed Apr 09, 2008 4:17 pm

magicgravy wrote:... one question - as i am converting files to MP3, the folder name is changed, as well as the track names.
Oh, dear, that screws it.

That suggestion was made on the assumption that the FLAC files were already in a hierarchy of folders that matched their tags. If they were, then when Max did the conversion it'd produce a new hierarchy that matched the existing one, since it would create the new folders based on the existing tags. I suppose it was an unwarranted assumption on my part.

There are "organizer" scripts/programs that will put audio files into a hierarchy based on their tags, so that it should be possible to resort the FLAC files so that the directory tree they're in matches the destination directory tree. (There's one in Media Rage, for example.) However, the problem then would be that the text files wouldn't get moved into the new sorted hierarchy (from where they could operated on by rsync), because they haven't got tags, so the script wouldn't know where to put them.

Sorry, I can't think of anything else.

saverio
Posts: 7
Joined: Mon Mar 17, 2008 7:15 pm

Re: Export Text File with converted audio?

Post by saverio » Tue Apr 15, 2008 12:59 pm

Picard (from MusicBrainz) is a tagger that moves files along with music. You can define which patterns (like cover*.jpg, *.log, info.*) to move alongside the music.
The only roblem is that you cannot define your own tags, you're limited to those in some MB entry (or you make new entries).

With Picard you can make a single (looong) pass through your FLAC collection, and organize it in a significative hierarchy, then you convert everything to mp3 (possibly preserving the MB tags, some converters have that option), then make another single pass through your new mp3 collection. If you coud preserve the MB tags, then the second pass will just be a matter of downloading the album info, because all the IDs are already there. Then, you'll have a perfectly synchronized hierarchies.

I use this script to make the hierarchy:
$upper(%_extension%)/$if2(%albumartist% [%musicbrainz_albumartistid%],%artist% [%musicbrainz_artistid%])/[$left(%date%,4)] %album% [%musicbrainz_albumid%]/$num(%tracknumber%,2) %title%
so I have all formats separated in different directories, and all the MB IDs explicitly set into the folder names, in case I need them quickly without parsing the tags.

PS: I'll post that in the right place too: It would be good if there was a "tag to tag" mapping option to preserve custom, or at least MusicBrainz, tags.

Post Reply