1. Things you need to know about the new ‘Conversations’ PM system:

    a) DO NOT REPLY TO THE NOTIFICATION EMAIL! I get them, not the intended recipient. I get a lot of them and I do not want them! It is just a notification, log into the site and reply from there.

    b) To delete old conversations use the ‘Leave conversation’ option. This is just delete by another name.
    Dismiss Notice

The whole "gapless" thing on digital files...

Discussion in 'audio' started by doctorjuggles, Mar 11, 2019.

  1. AndyU

    AndyU pfm Member

    Gapless playback is not an issue. It is a trivial problem that has been solved. In the early days of streaming developers didn't realise it was a problem because they thought in terms of tracks. Even then you could concatenate albums when required and play them back without gaps. You really have to hunt about for crummy software to experience it nowadays.
     
  2. doctorjuggles

    doctorjuggles pfm Member

    Google's stock android music player isn't gapless. I can find countless examples which say they are gapless but don't execute properly, in spite of playing perfectly on, for example, Foobar2000.

    It definitely still is an issue on many DAPs which are in the high-end market.
     
  3. lordsummit

    lordsummit Moderator

    Tidal didn’t do proper gapless last time I tried it. Pretty rubbish really.
     
  4. Barbapapa

    Barbapapa pfm Member

    I'm not sure whether you understand what the problem is that the OP mentions.

    As I said, it can of course be done, but it requires effort (and changes in the software/hardware design), and my experience with industrial software development is that there often is insufficient time and/or skills available to actually implement things that in principle are fairly easy to do for good programmers.

    I tried to explain why, despite you stating that it is trivial, it is not actually trivial: you need to put some thought in it. That explains why quite a lot of DAPs don't implement it, even though it is feasible. You mistake feasible for trivial, and thereby can't explain what the OP asks about.

    To avoid misunderstandings: I agree that software developers SHOULD implement it, I simply state as a matter of fact that they do not.
     
  5. Romulus

    Romulus pfm Member

    Thank you for the above, but to understand this frustration of audiophiles is when in playback the 'player' itself introduces gaps as an extra as what was intended in the studio or final edited recording? I have never experienced such an extra silent gap to make me feel annoyed that the recording itself is being interfered with by the playback; must be lucky..!
     
  6. Jim Audiomisc

    Jim Audiomisc pfm Member

    FWIW For the audio programs I've written that play or record audio the method used is to employ a 'switched' set of two buffers. Then run two processes in parallel. One process 'fills' a buffer when told its is empty, and when this is done, reports it is 'ready to be read'. The other process reads each buffer until it gets to the end, flags it is now 'empty' and starts working though the other buffer's content. Provides the 'filling' process can work faster than the 'emptying' one, the result should be no glitches.

    The snag can be imagined if we think of using buffers that can hold a seconds-worth of audio, but playing a file that is a few samples *longer* than an integer number of seconds. The result is that the final buffer fill only puts a few values into the final buffer. *If* the 'filling' process is clueless that leaves 'old' data in the rest. *If* the readout process is clueless it duly plays the entire content of the buffer - giving you a burst of earlier audio at the end, or silence if the filling process does 'clear' what it didn't fill.

    To deal with this the processes need to communicate and say 'how much buffer was filled'. This lets the playout know to stop at the *actual* end.

    *Or* with gapless playback, the filling process can either start writing the *next* file's content into the buffer right after it finished with the previous file.

    So there are various ways to do this, but they have been well-known and trivial for ages. Hence there really should be no need for an added 'gap' because the processes can't get this organised.

    I've never encountered a DAC that produced audible gaps.
     
  7. Jim Audiomisc

    Jim Audiomisc pfm Member

    Yes. If I'd encountered this problem these days with a player or DAC I'd be really annoyed and decide the designers were clueless. Or had simply chosen hardware that is too slow to keep up with the required bufferring, etc, of the processing involved.
     
  8. iHaveNoNaim

    iHaveNoNaim Active Member

    Pink Floyd need playless gaps :)
     
    lazycat and allthingsanalog like this.
  9. Paul R

    Paul R pfm Member

    As Jim points out the player needs to be designed to avoid gaps between tracks, there are a whole stack of possible delays if you wait for one track to end then switch to the next. The obvious solution is to preload the next track while playing the current, so the file system is ready and the decoder is primed. This requires resources.

    But there are deeper issues with (for example) mp3. This process spreads information across multiple frames of data, so you have to insert silence before the track to prime the encoder, and because it uses 'transforms' (like Fourier but different) these require a constant size of data, so padding may be required at the end of the track to encode/decode the final audio frame given the track is unlikely to start with a power of 2 factor of samples.

    And so on. It's not a completely trivial thing, but it is a solved thing, especially now CPU cycles and memory is relatively infinite in audio terms even on portable equipment. The only real excuse for a pause or glitch is if you change replay sample rate between tracks.
     
  10. AndyU

    AndyU pfm Member

    I do indeed understand what the problem is, I made my living writing software since the 70s, and I have been streaming music gaplessly for a decade or so. Gapless playback is easy to implement, Logitech did it years ago with LMS and the Sqeezeplayer, media players like J River and foobar have had it done and dusted for years, Linn do it, iTunes does it iirc, Qobuz does it, Roon does it. If you need it there’s plenty of ways to get it, and there’s no need to buy hardware or use software that doesn’t support it. If it doesn’t matter to you then forget about it. If it does matter to you and for some perverse reason you have chosen crap software or hardware rip your gapless albums as one track.

    In the early days of DLNA there were issues when renderers failed to respect the SetNextAVTransportURL(), but nowadays they mostly do. Here is a good explanation of the protocol. As you can see there is nothing difficult for anyone with the relevant competencies.

    https://docs.microsoft.com/en-us/previous-versions/windows/hardware/hck/hh997901(v=vs.85)
     
  11. Jim Audiomisc

    Jim Audiomisc pfm Member

    I'm probably falling into using 'trivial' in the way that uni lecturers do. To mean "It's in all the relevant textbooks/papers, so no real thought is needed. You just have to look it up and use it." 8-]

    Similar phrases tend to be: "It's obvious" , "It can be shown that", "Left as an exercise for the student" etc, etc. Cover for, "I can't recall the details off-hand and I want my lunch". :)

    Yes, 'decoding' data in formats that require transforms tends to mean the system has to do more finger-twiddling to get the data in a form to transfer. But again that's one reason for using buffers anyway.
     
  12. amazement

    amazement pfm Member

    So how do I get Glider app to stream gapless from my innuos to my Devialet expert Pro?
     
  13. Paul R

    Paul R pfm Member

    If you are using buffers but not removing the padding then you get gaps. You may not be able to accurately remove the padding without metadata to tell you the original length of the track, so you may end up needing to do a crossfade to give the impression of gapless. The alternative is to remove pre/post silences, but that silence might be intentional....

    15 years ago it was a tricky business, now I'm surprised it's ever an issue, particularly in a 'hifi' context where the vagaries of lossy compression are rare. I've certainly gone through Squeezebox, Foobar2000 and Volumio without it being an issue. And, AFAICT, AppleMusic and Amazon Music manage it on an iPhone. I'll accept a glitch with a sample rate switch, but that's not going to be a gapless transition in most cases regardless.
     
  14. doctorjuggles

    doctorjuggles pfm Member

    Does anyone have recommendations for the best Android app for gapless? I've tried (with varying degrees of success) the paid-for versions of JetAudio HD, GoneMad Music player, Hiby's player, Pulsar and the default Google Play app and while some of them get close, none of them truly execute on all files (I'm excluding badly ripped files which I know have gaps even on PC via Foobar)

    Is there an audiophile-grade player everyone recommends that is known to be good for this?
     
  15. Brian

    Brian Eating fat, staying slim

    I bought and returned an otherwise decent sounding Dap because it was supposed to do gapless but didn’t. This was in 2017, it shouldn’t happen nowadays.

    As others have said, gapless is essential. I have plenty of tracks that are supposed to seamlessly merge into the next track and that is how I want to hear them on any method I use for playback.
     
  16. TonyScarlett

    TonyScarlett pfm Member

    I use the Bubble UPnP app on my Android phone to control my Allo Digione streamer, plays Tidal & Qobuz gapless no problem. Previously I was using an Arcam Rplay streamer with the Playfi app, the gaps it was putting between tracks drove me to distraction, even on conventional albums with a 2 or 3 second gap between tracks it was adding another 3 or 4 seconds!
     
  17. Sonci

    Sonci pfm Member

    There's only one true gappless player, the cd player!
     
  18. AndyU

    AndyU pfm Member

    Not when you’re playing an opera or a concert that goes across more than one cd it isn’t .....
     
  19. demotivated

    demotivated pfm Member

    I have seen digital players that have audible glitches starting individual tracks from data storage eg usb. A bit pants really.
     
  20. Shadders

    Shadders pfm Member

    Hi,
    I understand where the frustration is. I have ripped CD's to a hard disk in the wav format, and each track on the CD has its own wav file. Each album has its own directory too.

    The problem is, how does the playback device which has DLNA, know which two tracks are gapless ?

    How do you notify the playback device that track 1 to 5 are gapless, and tracks 6 to 10 are gapless ?

    How do you notify the playback device that only tracks 2 and 3 are gapless ?

    There are no instructions on how to ensure that the playback device implements the right gapless playback on the correct tracks. I did search the DLNA website, and there were no instructions on how to achieve this.

    Regards,
    Shadders.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice