forum

[Tutorial] How to cut MP3s - Lossless

posted
Total Posts
10
Topic Starter
ziin
First, this guide assumes a few things:
  1. The MP3 has a known static BPM
  2. You have a high quality source
  3. You want to cut the middle of the song, not the beginning, or the end
If at all possible you should use MP3DirectCut, which allows lossless editing. However when cutting a song, it's not lossless, as the data stream is not at the same rate as the BPM of the music. You can fudge along and approximate, but then it's wrong. I'd rather have a slight quality loss over a BPM that changes from 0 ms to +5 ms after the cut.

So first start out by importing the file into audacity. Make note of your importing preferences. The default is usually 44100 Hz. This is important because we're going to be using it to take out exactly x beats from the song.

If you are at all familiar with science, you will be familiar with units. In this case, let's say we have 180 BPM song, with a sample rate of 44100 Hz. Orient the units properly so that the units cancel, and you get samples/beat.

Now that we know how long a beat is, we can easily select a portion of a song, and delete exactly that many beats.

You likely have an area that you want to cut out already, so zoom in and find the beat where it starts. This part doesn't have to be 100% accurate, since much like timing a song, you have to guess at the offset. Well what's the offset of this beat? It's right before that big series of peaks. Put your cursor somewhere in there and then select exactly how many samples you want to cut out.

You will have to change it to samples, and make sure the selection is length, not end time.


If you really want to get fancy, you can figure out the offset of the song in something like osu, then calculate exactly how many beats it is until the beat you want to cut, then cut there.

For now, let's see what we can do with this song:

BPM is 174, so each beat is 15206.9 samples (carry the decimal out when you do calculations).
Lets cut out most of the intro, some of the repeating parts, and some of the lyrics.

Zoom in. Lucky for me, there's a nice jagged point there so I know where the downbeat is. I'm going to use this spot as the basis of the rest of the song. Now select the number of beats we want out. Let's knock out the first 336. Then move forward 288 measures. Cut the next 192, and cut the ending short 104 later for 96 measures as well.

And there you have it. Over half the song cut out, as close to perfectly as you can.
http://up.ppy.sh/files/dhbto0fvmeee.mp3
Left channel is the original, right channel is the cut version. Note that while they don't always mesh properly, it's always in time.
Miya
ziin, i don't understand how you select a portion of a song with samples. How do you do that? you didn't explain that in this tutorial.
for example if i want to delete a portion from a song from 126 sec to 280 sec, then how to translate that into samples? I don't understand ;_;
Topic Starter
ziin
How many beats are in between 126 seconds and 280 seconds? Multiply that by the number of samples per beat, then zoom in at 126 s and find as close to the downbeat you can, and select/delete the number you get.
Miya
so just substract 280 with 126, and multiply with 60*44100 and divide by bpm?
then go to 126 and find the downbeat? Is that right?
Topic Starter
ziin
No. just subtract the beat number at 280 seconds with the beat number at 126 seconds, and multiply with 60*44100 and divide by bpm.
then go to 126 and find the downbeat.

The beat number of a bpm 120 song at 126 seconds would be 120*126/60
Sakura
Stickied
Miya
Hmm. Maybe you should edit your first post. Since the matematical process is quite confusing.>.<
But thank you for the tutorial, this is very useful :D
BeatofIke
I've been using audacity for years to precisely cut several portions of music without affecting the BPM or offset at all, but never did I knew about samples. I used a mathematical formula (not related to samples though) that I developed myself that calculates the exact current second of a specific note position of a song. What exactly are "samples" anyway? I would like to experiment this.
Topic Starter
ziin
A sample is the smallest time you can use.

1 sample at 44100 Hz is 1/44100 seconds, or 22.6 ns. Thus you're much more accurate using samples than using milliseconds. Nobody is going to tell the difference between 22 ns unless you have a LOT of rounding errors.
blissfulyoshi
If you have problems installing mp3DirectCut, right click the install file, and click "Run as administrator." (This is stated above, but restating it here)

Since asking how to use mp3DirectCut to increase gain is a semi-common question, just going to give a quick guide here:

1. Load song in (drag and drop mp3 into the window)
2. Select the entire song (ctrl+a)
3. Increase the gain of the entire song (Edit -> Gain... Increase both knows by the same amount (3-4.5dB should be good))
4. Save the new mp3 (File -> Save complete audio)
Please sign in to reply.

New reply