Author Topic: Gapless Playback  (Read 10605 times)

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
One thing to add:
gapless playback in MB.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
it should already be supporting gapless for LAME encoded MP3 and any lossless formats played with MB,
but not for M4A files or for any files written to an iPod (which requires additional special settings to be written to the iPod db)
Last Edit: November 15, 2009, 07:07:26 AM by Steven

drbeachboy

  • Full Member
  • ***
  • Posts: 149
Hi Steven,

Will running iTunes periodically correct the gapless issue with mp3 & m4a files?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
Will running iTunes periodically correct the gapless issue with mp3 & m4a files?
i do believe so - as long as the file has the iTunes tags for gapless playback i understand iTunes will set the database appropriately when synching, but please let me know if you find otherwise.
I still plan to do the gapless playback enhancement for iPod synching though and i think i know how to do it, but want to leave it a while as doing it means i would have to put a lot of code for handling this into the iPod library i use and consequently means i have to re-merge the code changes i made on every update of that library.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
it should already be supporting gapless for LAME encoded MP3 and any lossless formats played with MB,
but not for M4A files or for any files written to an iPod (which requires additional special settings to be written to the iPod db)

Unfortunately, it's not working for me at least. I try to play the Cassandra Gemini Suite from The Mars Volta, and I can hear a slight stop between tracks that doesn't happen in iTunes (it plays, well, gapless).

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
which format is the file and if its mp3 do you know what encoder was used? (it might display something in the properties tab in the tag editor).
I plan to make an enhancement to read the iTunes gapless playback tags for m4a files
Last Edit: November 16, 2009, 07:38:21 AM by Steven

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
It's a .mp3 file, encoded in LAME (version 3.90). It plays in iTunes gapless, but not in MB. I can send you part of the last two or three parts of the Cassandra Gemini suite (about two or five minutes in length). I could send the entire thing, but that will be too big to send (even if I zip it).

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
that seems a fairly old version of lame and although i'm not sure of the specific lame version, i do recall older versions dont write the gapless info into mp3 file header.
However when i make the change to read the iTunes gapless tags i think it should be ok for you then. It would be helpful to send some of the files - perhaps if you upload to mediafire (you dont even need to set up an account) and email me the link

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
sent... i think i did it right :)


EDIT: And I didn't realize how important the LAME versions are. I'm currently playing songs encoded in more recent versions of LAME (3.97, 3.96), and they're playing gaplessly. Probably the gapless tags change will remedy this problem. Silly me...
Last Edit: November 16, 2009, 09:14:22 AM by Maleko12

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
the lastest 1.2 beta now reads the iTunes gapless info tags when playing iTunes encoded mp3 and aac files.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
still doing a slight (less than 100ms, but still noticeable) gap for older versions. Just to try something, I made the entire album (Frances The Mute) into a gapless album in iTunes (there's an option to make an album or 2+ tracks a gapless album). No dice in MB.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
you mean older versions of LAME? If there is no gapless info in the lame header, then MB will look for the iTunSMPB tag, so could you confirm whether there is such a tag in the file (you can use the tag editor grid in MB or mp3Tag extended tags to see if its there). I should also mention MB only looks for this tag if the encoder starts with 'iTunes' so could you also confirm that.
If neither are present then MB doesnt have a way to play the file gapless.

But i dont understand your test with the gapless album - i'm not familiar with this function in iTunes but i assume what it does is combines all the MP3 files into one big file where the gaps are removed? Are you saying that when you played the large file in MP3 you could hear gaps? If so that doesnt make sense as gapless settings only apply to the very start and very end of a file.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
For this, it doesn't have the iTunSMPG tag. However, the tag has a COMM/iTunPGAP set to "1" (which I know means true, but what the true value means I do not know).



Here's a picture to describe what I am doing...

The "check: to "part of a gapless album" is what I'm describing.
Last Edit: November 16, 2009, 10:09:07 PM by Maleko12

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
the iTunPGAP tag is as you suggest - just a true/false indicator that corresponds to the 'part of gapless album' tickbox. Not sure why iTunes is not writing the iTunSMPB tag which holds the necessary gapless data - i guess it must be only stored internally in iTunes in this case.
Without the LAME header populated with the necessary data and no iTunSMPB tag i dont think there is anything more i can do in this case (at least on what i know at the moment!).
When i tested the new functionality today i tested it against a very difficult classical music track that had been split into 20 sections and i'm quite confident it is working when either the lame info or itunes tag is present.
If you still find it not working in a number of your other tracks please let me know though.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
OK then. It is very interesting indeed. But since it only affects such a small amount of songs anyway (and it does seem to work with newer versions of LAME), it's not a big problem.