Skip to main content
Topic: Removing Spaces or Gaps between Tracks  (Read 1507 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Removing Spaces or Gaps between Tracks

Brand new to the forum and although I read the caveats about not tossing all questions here, I really don't know where else it would go...
I belong to several music forums and download a fair amount of music.  I've been using an audio editing tool called Wave Editor for years and have been quite happy with it, aside from the following:
Some recordings I've downloaded have tracks that blend from one to another.  On some (but not all) recordings of this sort there is an audible space or gap between those tracks when I play the folder using WinAmp or WMPlayer.  The gap might be little more than .25 seconds at the beginning and/or end of the track.  If I burn the recording to a CD, those 'spaces' ruin the flow of the music.
When I edit these recording with Wave Editor I can remove those spaces, but as soon as I save the edited track I can see its length revert to its pre-edited length.  I can combine the tracks, remove the spaces and save the combined track, which then plays perfectly on WinAmp, WMPlayer and when burnt to a CD.  Of course this removes the ability to hop from one track to another, no big deal unless I'm playing it through my car's CD player.  The same problem occurs if I copy the music folder to a USB stick.
Strangely enough, if I use another editor - Audacity (which I find somewhat cumbersome) I can remove those spaces, save the track and all is good.  No gaps on any playback.  But if re-edit the track with Wave Editor, say removing an unfortunate bit of yodeling somewhere in the middle of the song, and save it, the gaps are back.
Can anybody explain any of this? 

Re: Removing Spaces or Gaps between Tracks

Reply #1
You are likely editing and re-saving .MP3 or another lossy format. This involves opening, decoding, then re-encoding the lossy material to a new .MP3. Your "Wave Editor" also likely does not support encoding gapless MP3s, or decoding them, for that matter. So there may not be any gaps on your files to begin with, and your editor is adding them, and possibly destroying the gapless information already encoded into the original files.

Stop re-saving MP3 files, you can't really edit them without losing more information than just the gaps. Save to FLAC, or WavPack, or another lossless format, but try to start with a lossless file to begin with, rather than any MP3 files.

Re: Removing Spaces or Gaps between Tracks

Reply #2
Quote
...and when burnt to a CD.  Of course this removes the ability to hop from one track to another...
CDs are easy...   By using a Cue Sheet you can add track markers to a CD made from one-long WAV file.   I've made a few crossfaded "mix CDs" and several "live" CDs that way.

You can write a cue sheet with Windows Notepad (I usually start by editing an existing cue sheet) and then you'll need to use burning software that supports cue sheets (I use ImgBurn).

Re: Removing Spaces or Gaps between Tracks

Reply #3
You are likely editing and re-saving .MP3 or another lossy format. This involves opening, decoding, then re-encoding the lossy material to a new .MP3. Your "Wave Editor" also likely does not support encoding gapless MP3s, or decoding them, for that matter. So there may not be any gaps on your files to begin with, and your editor is adding them, and possibly destroying the gapless information already encoded into the original files.
Actually, most of the music files that people send me or I download are MP3 files.  And I certainly don't edit them if they don't need editing.  If they play through just fine they don't get edited.  And 95% of the files I get are 'normal' recordings - the tracks are already separated by 1 or 2 seconds, so if a quarter of a second or so is added between tracks it won't be noticeable.  Live recordings I get are especially prone to these annoying spaces - quite often the applause or musician banter is 'gapped'.
Stop re-saving MP3 files, you can't really edit them without losing more information than just the gaps. Save to FLAC, or WavPack, or another lossless format, but try to start with a lossless file to begin with, rather than any MP3 files.
I have no control over the format of the recordings I get.  And if they're MP3s that flow from one track to the next I'll just have to use Audacity to remove the spaces.  

Re: Removing Spaces or Gaps between Tracks

Reply #4
If burning silence cleaned files to CD you may have the files not alligning to CD frame boundaries. The burning process will readd gaps in that case.
You may check your files fit CD boundaries and correct this with a tool like Traders Little Helper.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

 

Re: Removing Spaces or Gaps between Tracks

Reply #5
If burning silence cleaned files to CD you may have the files not alligning to CD frame boundaries. The burning process will readd gaps in that case.
You may check your files fit CD boundaries and correct this with a tool like Traders Little Helper.
I'm sorry to be so technically ignorant, but I have little idea what any of that means.  If you're trying to say that the process of burning a CD is causing the gaps, then I've done a poor job of describing the problem...
  • The files come into my PC with these gaps already there.  I can play the unedited music file through any player and the gaps between tracks are noticeable, almost like a pop or a click on vinyl
  • I can remove the gaps with Wave Editor.  Once I do that I can play the now edited track using Wave Editor and it plays correctly.  However, once I save the track the gaps are returned.  If I write down the edited length of the track before saving, it might be 9:58:368.  After I save it the track might be 9:58:668
I have been emailing support at Wave Editor.  I think English is not their primary language, so I may have done a poor job of communicating with them as well, but here is their latest response:
 Ok, I understand what do you mean. It's MP3 format issue.
We are using Lame MP3 Encoder and it will add silence at the beginning and end of each song.
Here is a technical explanations: http://lame.sourceforge.net/tech-FAQ.txt
 

This is also Greek to me (sorry if that phrase is now Politically Incorrect).  But I think the gist of it is that I cannot use their editor to remove gaps in MP3 files that already have such gaps.  It also seems to intimate that their editor will create gaps between tracks that previously did not have them.  That is not true.  I have numerous recordings that I've downloaded where track one blends into track two and the unedited tracks play perfectly.  And if I then use WE to edit that track - remove some vocals - and save it, Wave Editor does not automatically add any gaps.  The problem seems to only occur when someone creates an MP3 file with gaps.  I then seem to be powerless to both retain track integrity and remove gaps with Wave Editor.

Re: Removing Spaces or Gaps between Tracks

Reply #6
Start with a player that works correctly with gapless files, such as Foobar2000. Convert all necessary files to WAV format. Then work on them in any editor you choose. After you're done, compress the resulting files using an encoder. I do it all time time working with older editors such as Sound Forge and CoolEdit that predate gapless standard.

Not sure if it is the same Wave Editor, but the one by Abyss Media, works by temporarily decoding all input files (including WAV or MP3) to a 16-bit file in the temp directory using the BASS library. Files still have the exact duration at this stage. Upon saving as MP3 directly from the program, a Xing header isn't written, and gaplessness is lost. Saving to WAV is fine. It isn't a particularly good editor, because the accuracy is limited to 16-bit, an applying an action to a small section causes the entire file to be rewritten to disk. It seems that most processes can't be applied to a selection.

You could also remove gaps from existing MP3 files without re-encoding and losing quality using the Utilities > Edit MP3 gapless playback information in Foobar. If the option doesn't show, enable it in Preferences > Display > Context menu. This is quite a cumbersome, lengthy process. You need to use a visual audio editor with sample count on the time ruler as reference. Decode all files to wav, see how many nearly silent samples there are at the start, enter that number for all files. Decode them again. See how long each file is, copy and paste the exact duration in the second box. You may need to cut off some samples at the end, and try splicing with the next file. (Yes, it takes a hell lot of time.) The amount of silence that can be removed this way is limited to about 1/10th of a second, maybe less.

Re: Removing Spaces or Gaps between Tracks

Reply #7
You are likely editing and re-saving .MP3 or another lossy format. This involves opening, decoding, then re-encoding the lossy material to a new .MP3. Your "Wave Editor" also likely does not support encoding gapless MP3s, or decoding them, for that matter. So there may not be any gaps on your files to begin with, and your editor is adding them, and possibly destroying the gapless information already encoded into the original files.

Stop re-saving MP3 files, you can't really edit them without losing more information than just the gaps. Save to FLAC, or WavPack, or another lossless format, but try to start with a lossless file to begin with, rather than any MP3 files.
Couldn't boweasel use MP3DirectCut (freeware) to edit the beginning and end of his MP3s without decoding/recoding?


Re: Removing Spaces or Gaps between Tracks

Reply #9
Some great suggestions here!  Thank you.  And yes, j7n, the Wave Editor I've been using is by Abyss Media.  I have also downloaded foobar2000, and although it seems like a nice enough player I miss the ability to right click a folder and select 'play using foobar2000.  And if I play a file that came into my computer with gaps, foobar recognizes them and plays back the silence (sounds like a stupid sentence, but I'm sure you know what I mean).

I will investigate the 2 products mentioned for removing spaces at the beginning and end of tracks, although as I've already indicated, Audacity seems to work consistently to do just as well.

Re: Removing Spaces or Gaps between Tracks

Reply #10
Some great suggestions here!  Thank you.  And yes, j7n, the Wave Editor I've been using is by Abyss Media.  I have also downloaded foobar2000, and although it seems like a nice enough player I miss the ability to right click a folder and select 'play using foobar2000.  And if I play a file that came into my computer with gaps, foobar recognizes them and plays back the silence (sounds like a stupid sentence, but I'm sure you know what I mean).

I will investigate the 2 products mentioned for removing spaces at the beginning and end of tracks, although as I've already indicated, Audacity seems to work consistently to do just as well.
Audacity will need to decode the MP3 for editing, then re-encode it. That's not ideal for lossy formats. MP3DirectCut doesn't have as good an editing interface as Audacity (which I love using for lossless work), but it edits an MP3 without decoding/encoding the file, which is more ideal. And removing silence is a simple enough job.

Re: Removing Spaces or Gaps between Tracks

Reply #11
You can try my F2K dsp chain settings - they kill the gaps and treat not bad at all the tracks with different volume - then encode track by track with encoder to wave with applied dsp chain settings.

Re: Removing Spaces or Gaps between Tracks

Reply #12
MP3DirectCut and MpTrim can't remove all silence because they work on whole MPEG frames. They will either leave a small gap or cut off too much audio. The free version of MpTrim appears to leave the original Xing header with its delay values that are incorrect after trimming. Whether the gap can be heard between the two tracks is then down to luck and the staticity of the signal at that point.

A proper visual waveform editor makes the job much easier, and I might just choose to accept quality loss or size expansion, if it saves time/effort. If the original came from CD, you can use the CD frame rate of 75 as a hint to locate the precise point where near-silence begins (most editors can show time in video frames). You can also drag and drop a few seconds of the following track, paste it at the end of the current, and preview the splice, then undo.

If after the editing you do not get tracks that have round number of CD frames each, but sound perfectly gapless, you could use the Foobar2000 feature of Convert > Destination > Generate Multi-track files, to concatenate all tracks, then use the new cue sheet to resplit them (Convert each track to individual file), with the starting positions now slightly shifted to be on frame boundaries.

Re: Removing Spaces or Gaps between Tracks

Reply #13
MP3DirectCut and MpTrim can't remove all silence because they work on whole MPEG frames. They will either leave a small gap or cut off too much audio. The free version of MpTrim appears to leave the original Xing header with its delay values that are incorrect after trimming. Whether the gap can be heard between the two tracks is then down to luck and the staticity of the signal at that point.

A proper visual waveform editor makes the job much easier, and I might just choose to accept quality loss or size expansion, if it saves time/effort. If the original came from CD, you can use the CD frame rate of 75 as a hint to locate the precise point where near-silence begins (most editors can show time in video frames). You can also drag and drop a few seconds of the following track, paste it at the end of the current, and preview the splice, then undo.

If after the editing you do not get tracks that have round number of CD frames each, but sound perfectly gapless, you could use the Foobar2000 feature of Convert > Destination > Generate Multi-track files, to concatenate all tracks, then use the new cue sheet to resplit them (Convert each track to individual file), with the starting positions now slightly shifted to be on frame boundaries.
So you need some soft  that can add custom fade in and fade out to track.
Foobar Fade-in/Out DSP https://hydrogenaud.io/index.php/topic,115009.0.html or Reaper etc...

Re: Removing Spaces or Gaps between Tracks

Reply #14
So you need some soft  that can add custom fade in and fade out to track.
Foobar Fade-in/Out DSP https://hydrogenaud.io/index.php/topic,115009.0.html or Reaper etc...
No, that is not what what I need,
If I have an MP3 of Dark Side of the Moon, an album where there's no space between many of the tracks, I most certainly do not want to fade out / fade in between tracks - I need to hear the music as it was intended - to play through with no gaps or spaces that were not there originally, but also with the ability to skip from track to track.  I also need the ability, to take an MP3 folder that might already have those annoying gaps and remove them. 

Given the kinds of things that can be done with current editing technology, it hardly seems like I'm trying to do things outside the realm of possibility.

Re: Removing Spaces or Gaps between Tracks

Reply #15
I had the same problem with a downloaded live bootleg: silent gaps between MP3 tracks.  I loaded all the tracks into foobar2000 and exported them to a single, contiguous WAV file.  That's lossless compared to the original MP3s.  I loaded the single WAV file into Audacity and one-at-a-time cut out all the gaps.  As I did this, I used Audacity's separate "Label Track" to insert track breaks and titles*.  When through, I saved the entire thing as an Audacity project in case I needed to come back later and fix anything.  I used Audacity's "Export Multiple" function to output FLAC tracks and remain lossless to the original MP3s as well as now gapless.  You can stop there or load the FLACs into foobar2000 and convert to MP3 320 to save about half the storage space.  foobar2000 with its "Encoder Pack" will encode MP3 gapless using LAME and 320 kbps is high enough to avoid introducing much in the way of generational loss.  Either way works to remove the gaps, but the second way introduces the requirement that -- like foobar2000 -- the playback app has to understand how to play LAME gapless; not all do.

Ok, there is one way that this might not work: if when the silences are removed from the big WAV in Audacity the transitions are still not clean.  That is impossible to restore, but one way to make it acceptable is to use Audacity's "Crossfade Clips" effect.  You may need to try a few times to get something you like.

What I described above is what the paid version of mpTrim attempts to do.  You drag a folder of MP3 files onto it and it tries to cut all the silences so the tracks will play continuously.  Sometimes it works; sometimes not.

*Before you do this, turn on the "Snap To" function in Audacity and set the "Audio Position" to one including CDDA frames.  That way your tracks will break on a frame boundary.

Re: Removing Spaces or Gaps between Tracks

Reply #16
Okay... with help from all you good folks I've now got folder with 8 MP3 files that plays perfectly using either Winamp or foobar2000.  The only remaining fly in the ointment is that when I burn the folder to a CD using WMP I am apparently re-introducing some minuscule spaces between tracks.  Of course I have certainly checked the audio CD option to burn CDs without gaps so something else is causing this and it would seem to be WMP itself.  Now I have downloaded and installed foobar2000's Audio CD Writer, but I have yet to figure out how to use it.

Any help with this or suggestions for any other gapless burning software?

Re: Removing Spaces or Gaps between Tracks

Reply #17
You can burn everything as one long track. Surely it ought to play without pauses then.

Re: Removing Spaces or Gaps between Tracks

Reply #18
So you need some soft  that can add custom fade in and fade out to track.
Foobar Fade-in/Out DSP https://hydrogenaud.io/index.php/topic,115009.0.html or Reaper etc...
No, that is not what what I need,
If I have an MP3 of Dark Side of the Moon, an album where there's no space between many of the tracks, I most certainly do not want to fade out / fade in between tracks - I need to hear the music as it was intended - to play through with no gaps or spaces that were not there originally, but also with the ability to skip from track to track.  I also need the ability, to take an MP3 folder that might already have those annoying gaps and remove them. 

Given the kinds of things that can be done with current editing technology, it hardly seems like I'm trying to do things outside the realm of possibility.

That's easy: if you need kill the gaps - just need to adjust foo dsp skip silence and foo dsp continuator.
My hobby is brodcasting music - streaming to web. So i work long time with foo dsp continuator and "teach him" kill all gaps in tracks.
So If you need these settings, pm me.

Re: Removing Spaces or Gaps between Tracks

Reply #19
The only remaining fly in the ointment is that when I burn the folder to a CD using WMP I am apparently re-introducing some minuscule spaces between tracks.

If burning silence cleaned files to CD you may have the files not alligning to CD frame boundaries. The burning process will readd gaps in that case.

You can convert your MP3 files to a single WAV + CUE sheet (via foobar2000, for example).

Re: Removing Spaces or Gaps between Tracks

Reply #20
How one check if the files are not aligned to CD frame boundaries? 

Re: Removing Spaces or Gaps between Tracks

Reply #21
Audacity has an option at the bottom for aligning your selection to CDDA boundaries (see attached pic).

Just open a given audio file, zoom deeply into the ending part, so that your scale is in the millseconds range and select all (ctrl-a).
Then manually re-enter the last frames' digit and see if the selected end still aligns with the end of your audio file.

That way you can easily see if it really fits CDDA boundaries and if not, you could trim it and maybe add a short fade out for avoiding clicks and/or pops.

HTH,
Maggi

Re: Removing Spaces or Gaps between Tracks

Reply #22
You can convert your MP3 files to a single WAV + CUE sheet (via foobar2000, for example).
I certainly can convert my MP3 files into a single WAV, but can you tell me how to do the CUE (to separate it into tracks)
process with foobar2000?

Re: Removing Spaces or Gaps between Tracks

Reply #23
Output format: WAV, 16-bit
Destination: Generate multi-track files.

Re: Removing Spaces or Gaps between Tracks

Reply #24
Output format: WAV, 16-bit
Destination: Generate multi-track files.
I only installed foobar2000 after posting to this forum about removing gaps.  It was a brand new application.  There seems to be no documentation about the product - it took days to finally be able to play files in foobar by right-clicking,  I've never figured out how to use somebody's suggestion to install foobar's audio writer, and I have no idea what you mean by your reply.

 
SimplePortal 1.0.0 RC1 © 2008-2018