Community Forums Archive

Go Back

Subject:Automatically find, mark and trim tracks??
Posted by: Sound Dog
Date:5/21/2005 9:17:33 PM

Greetings SF Scripting Gurus!

I tried posting this to the SF forum and was referred here. I have worked with several audio programs but I'm a SF newbie. I don't want to waste everyone's time, but I do appreciate any help. If anyone can refer me to a modifyable SF script (say, that might be included with the package) that would be more than enough at this point! I'm not a programming expert but I'm not afraid to try modifying one that might be workable.

In recording from vinyl, I'd like the software to automatically find (mark) tracks and export them as sequentially numbered WAV or MP3 files. Ideally it would also trim the 2-3 seconds of "dead air" at the beginning/end of tracks.

In my searches (and in help files), it looks like markers must be entered manually, then converted to regions. The whole process looks quite laborious. I did try Auto Region once and ended up with several hundred tracks (VERY ugly). I admit I have lots of learning to do :)

Surely there's a way to do this--as I have a $30 off-the-shelf software package that can do it :) It's not perfect (of course). I don't mind editing waveforms--but is that the best way to accomplish this within SF8? Any ideas?

Thanks in advance!
Sound Dog
Colorado USA

Subject:RE: Automatically find, mark and trim tracks?
Reply by: _TJ
Date:5/21/2005 10:59:43 PM

Once you have the tracks marked, there are scripts that you can use to save off the regions as .MP3 files. Auto Region isn't really designed for identifying tracks, but
Auto Trim/Crop might do the job. I recommend that you start with "Phrase Concatenator 2" and increase the minimum silence length to just a little less than your minumum of your track gap (I got good results on a a CD using 1.2 seconds).

So, first you need to play around with the settings of Auto Trim/Crop, and get it to mark the tracks up pretty well, then save those settings as a preset, then it's pretty easy create a script that runs Auto Trim/Crop and then saves the resulting regions as MP3 files.

You can even stuff Title, Artist, and other MP3 tags with a script, and this information will then get saved into the MP3 files.

We did add the ability for scripts to look at the audio data in the 8.0a update, but it's pretty hard to perfectly locate track boundaries just by looking at the data. Hopefully you can get Auto Trim/Crop to work. In which case you just add the following code


file.DoEffect(@"Auto Trim/Crop", "My Vinyl Settings", new SfAudioSelection(0,-1), EffectOptions.EffectOnly);
file.WaitForDoneOrCancel();


to the script called SaveRegionsAsFiles.cs. (This would assume that you had saved a preset called "My Vinyl settings").

This will give you pretty automated results, but you end up with files with pretty useless names. Instead let me suggest a possibly workflow.

1) Drop markers while recording at the track starts. (just hit the M key while you are recording).
2) After recording, rename the track markers to match the Song names. (and also correct their placement if any are early or late).
3) Run a script that saves the audio after each marker to the next marker (minus 2 sec?) as a file with the same name as the marker. This would be a lot like the SaveRegionsAsFiles.cs script, but range would be calculated by looking at the distance to the next marker.

This, while not an entirely automated process, gives good results and takes a lot of the errors out of the process.

There are a lot of parts of the process that can be scripted, but unless you can get Auto Trim/Crop to do a pretty good job of identifying the songs, you will need to do that part of the process manually, and script the rest.

One last thought, It might be possible to write a script that uses Auto Region, and then analizes the regions and throws most of them away, but that
would probably be a lot of work unless you end up with some kind of easily recognisable pattern from Auto Region. (like, say the songs are eveywhere that that you have LOTS of markers, and the track gaps are where you don't).

tj





Message last edited on5/21/2005 11:00:48 PM by_TJ.
Subject:RE: Automatically find, mark and trim tracks?
Reply by: Sound Dog
Date:5/22/2005 8:59:09 AM

AWESOME Information TJ!

Thank you for the post. It will take me some time to figure out what all is involved. It will definitely get me going.

Thanks again!

Best regards,

Sound Dog

Go Back