Separating A Music File into Multiple Tracks

This is a quick guide on how to get a long mp3 audio file and break it down into individual tracks. You may need to do this when an album has been saved as a single mp3 (can happen when downloading from youtube via a “youtube to mp3” sites). I’m going to use a video of Meiko Kaji’s discography (or partial) to illustrate this.

First things first. Once you’ve obtained the mp3, you will need to obtain timestamps. If you have converted a YouTube video, then quite often you will see the timestamps in the description (perhaps even as chapters) or in a comment. For example this video contains timestamps for tracks. Incidentally, if the uploader has listed the first timestamp as “0:00” and not “00:00”, this would have triggered Youtube to automatically apply the list as chapters.

I rave about Audacity as a free open-source tool for audio editing a lot; I’ve even taught classes on the software. I have to admit that while it doesn’t have a steep learning curve, when I first learned to use it, I didn’t find it intuitive but I suppose most technical media-editing software wouldn’t be becuase you’re learning new concepts as well as the interface. We’ll need to import the large mp3 into the timeline of Audacity with a simple drag and drop. In the example I’m using, the mp3 is over four hours long so hopefully that’ll negate your concerns about limits.

We’ll then be needing to import labels into Audacity but that import will need to be in a particular tab-seprated format with seconds as the references so let’s do some manipulation in an Excel spreadsheet (another piece of software I’ve taught for several hundred hours). Put the timestamps in a text file and ensure that the columns are aligned – I had to pad the first few timestamps with a leading zero in order to do this.

In Excel, you’ll need to Get Data > From Text/CSV on the Data tab and use the Fixed Width delimiter to import the text file – specifying the column numbers as shown below.

When imported, Excel recognises the values in the format hh:mm:ss as times and so stores those values as decimal-days e.g. 12 hours (half a day) is stored by Excel as 0.5 – this means that to convert the Excel values to seconds, we need to multiply that value by 86400 (the number of seconds in a day). So we have a column for a timestamp in seconds and a column for the associated text label.

We need a column in between those to show the timestamp the label applies up until i.e. three columns… start time, end time and label. Well, the label will apply from the end of one track, right up until the start of the next track so the end time value for each label is the same as the start time value of the next label so I copy-pasted the values from column 1 into column 2 and shifted them up a row. The last value for the last label was the length of the mp3. I ended up with a spreadsheet that looked like the one shown right.

Now you can simply save this as a type of Text (Tab Delimited) *.txt file for importing into Audacity. (I ended up having to export as a Unicode text file because Excel is funny with not Western alphabet characters when exporting). Now, we need to import the labels in Audacity via Edit > Labels > Edit Labels… and we get a dialogue to import the file and a new Label track is added – all illustrated below.

Finally File > Export > Export Multiple… will be the routine needed to beign exporting the tracks.

References

Importing and Exporting Labels
https://manual.audacityteam.org/man/importing_and_exporting_labels.html

excel: export csv file with japanese character
https://superuser.com/questions/871189/excel-export-csv-file-with-japanese-character

Exporting Multiple Audio FIles
https://manual.audacityteam.org/man/export_multiple.html