Gapless playback
Encyclopedia
Gapless playback is the uninterrupted playback of consecutive audio tracks without intervening silence or clicks at the point of the track change. Gapless playback is common with compact discs
Compact Disc
The Compact Disc is an optical disc used to store digital data. It was originally developed to store and playback sound recordings exclusively, but later expanded to encompass data storage , write-once audio and data storage , rewritable media , Video Compact Discs , Super Video Compact Discs ,...

, gramophone record
Gramophone record
A gramophone record, commonly known as a phonograph record , vinyl record , or colloquially, a record, is an analog sound storage medium consisting of a flat disc with an inscribed, modulated spiral groove...

s, or tapes, but is not always available with other formats that employ compressed digital audio. This may be a source of annoyance to listeners of music where tracks segue
Segue
A segue is a smooth transition from one topic or section to the next.-In music:In music, segue is a direction to the performer. It means continue without a pause. It comes from the Italian "it follows". The term attacca is also used in classical music.For written music it implies a transition...

 into each other, such as some classical music
Classical music
Classical music is the art music produced in, or rooted in, the traditions of Western liturgical and secular music, encompassing a broad period from roughly the 11th century to present times...

 (opera
Opera
Opera is an art form in which singers and musicians perform a dramatic work combining text and musical score, usually in a theatrical setting. Opera incorporates many of the elements of spoken theatre, such as acting, scenery, and costumes and sometimes includes dance...

 in particular), progressive rock
Progressive rock
Progressive rock is a subgenre of rock music that developed in the late 1960s and early 1970s as part of a "mostly British attempt to elevate rock music to new levels of artistic credibility." John Covach, in Contemporary Music Review, says that many thought it would not just "succeed the pop of...

, concept albums, electronic music
Electronic music
Electronic music is music that employs electronic musical instruments and electronic music technology in its production. In general a distinction can be made between sound produced using electromechanical means and that produced using electronic technology. Examples of electromechanical sound...

, and live recordings with audience noise between tracks.

Causes of gaps

There are two main reasons why gaps occur during playback: compression scheme artifacts, and delayed output.

Compression scheme artifacts

Most lossy audio compression schemes add a small amount of silence to the beginning of a track. One reason that this happens is because many such schemes involve a time/frequency domain transform (such as an MDCT
Modified discrete cosine transform
The modified discrete cosine transform is a Fourier-related transform based on the type-IV discrete cosine transform , with the additional property of being lapped: it is designed to be performed on consecutive blocks of a larger dataset,...

) which can introduce gaps called encoder delay. These gaps can be enlarged at decode time when a reverse-MDCT is performed, because the reverse transform will also introduce gaps (decoder delay) of its own. Another factor is that transforms act on the data in units of fixed-size blocks. In order for the audio signal to be encoded in its entirety, small amounts of silence are appended to the input before the transform. If the amount of padded silence is not accounted for, the padding will be decoded together with the audio data, also introducing gaps between tracks. Because of the introduction of such gaps, the playtime of the audio data is often slightly increased.

This issue is technical but also standards-related. The popular MP3
MP3
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...

 standard, for example, defines no way to record the amount of delay or padding for later removal.Despite this, there are encoders which store the amount of delay and padding introduced in metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 to allow gapless playback. This can only be used if the playback software is able to interpret the metadata information.
Also, the encoder delay may vary from encoder to encoder, making automatic removal difficult. Even if two tracks are decompressed and merged into a single track, a gap will usually remain between them. More recent compressed audio formats (such as Ogg Vorbis) have been designed to address this problem, and can therefore produce gapless audio if played back correctly.

Delayed output

Even when the audio file itself does not contain undesirable gaps, software, firmware and hardware design often add gaps during playback. In some cases, software closes and re-opens the output stream when switching tracks, causing the hardware to create a very short "click". This problem is solved in more sophisticated designs of gapless playback.

A different design problem relates to software/firmware/hardware which are not ready to seamlessly move to the next track by the time the current track is complete. In this scenario, the listener is left waiting in silence as the player locates the next file, reads it, decodes the first blocks if necessary and then starts loading the buffer for playback. The gap can be as much as half a second, or even more — very noticeable in "continuous" music such as certain classical or dance genres.

Many older audio players on personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

s do not implement the required buffering to play gapless audio. Some of these rely on third-party gapless audio plug-ins to buffer output. Some newer players and newer versions of old players now support gapless playback directly.

Precise gapless playback

When gaps are caused by silence introduced during the compression process, it is possible to store metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 in the file that explicitly declares the amount of delay or padding that was introduced. The audio playback software must be able to recognize the metadata and trim the decoded audio accordingly or else the information is just ignored. Typically uncompressed audio formats don't require this because the start and end of the original audio data is clearly defined.

That alone may not address the issue of introduced gaps. Ensuring the audio hardware itself is not stopped and started between tracks such that a click is added may also be necessary and it may help to process the next track while the current one is running so that the data is available as a continuous stream.

With such measures there will be no guesswork being performed by the software: the playback timing would be identical to the source.

Alternative solutions

Digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

 (DSP) plugins can be used to detect silence between tracks and trim the audio as necessary on playback. This is not an optimal solution because it does not always produce results identical to the source. Sometimes an artist may intentionally leave silence at track boundaries for dramatic effect; removing this silence also removes that effect.

It can also be difficult to properly implement silence removal. If the silence threshold is too low and the track contains decoder artifacts, the software may not recognize some silences. Conversely, if the threshold is too high, the software may remove entire sections of quiet music at the beginning or end of a track.

DSP plugins can also be used to cross-fade
Fade (audio engineering)
In audio engineering, a fade is a gradual increase or decrease in the level of an audio signal. The term can also be used for film cinematography or theater lighting, in much the same way ....

 between tracks. This eliminates gaps that some listeners find distracting, but also greatly alters the audio data and is not always desirable. In particular, when tracks are meant to be played together and perform the transition at high volume, cross-fading results in a large volume drop.

Both of these alternate solutions are typically used to address compression methods that do not support the metadata for gapless playback. Like the optimal solution, they still require buffering and not closing the output stream; however, they require more computations, making them less efficient. In portable digital audio players, this can mean a reduced playing time on batteries.

Because of the drawbacks of the alternative solutions above, some listeners dislike their negative effects more than the gap they attempt to remove. Another problem is that the solutions above do nothing to prevent the output stream from being closed and reopened at track boundaries; some measures can be taken to simulate a gapless output stream, but they are not always successful and side-effects may occur.

Another alternative is to ignore track boundaries, encoding a single collection of tracks as a single compressed file, relying on cue sheets (or something similar) for navigation. While this method results in gapless playback within the collection of tracks with consecutive playback, it can be unwieldy because of the possibly large size of the resulting compressed file. Furthermore, unless the playback software or hardware can recognize the cue sheets, navigating between tracks may be difficult.

Last of all, with some implementations, it is possible to add gapless metadata to existing files. If the encoder is known, it is possible to guess the encoder delay. Assuming the compression was performed on CD audio to create the files, the original playback length will be an integer multiple of 588 samples. Thus the total playback time can be guessed also. Adding such information to audio files will work with implementations which recognize metadata.

Format support

Since lossless data compression
Lossless data compression
Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange...

 excludes the possibility of the introduction of padding, all lossless audio file formats are inherently gapless.

These lossy
Lossy data compression
In information technology, "lossy" compression is a data encoding method that compresses data by discarding some of it. The procedure aims to minimize the amount of data that need to be held, handled, and/or transmitted by a computer...

 audio file formats have provisions for gapless encoding:
  • Musepack
    Musepack
    Musepack or MPC is an open source lossy audio codec, specifically optimized for transparent compression of stereo audio at bitrates of 160–180 kbit/s...

  • Ogg Vorbis
    Vorbis
    Vorbis is a free software / open source project headed by the Xiph.Org Foundation . The project produces an audio format specification and software implementation for lossy audio compression...

  • Speex
    Speex
    Speex is a patent-free audio compression format designed for speech and also a free software speech codec that may be used on VoIP applications and podcasts. It is based on the CELP speech coding algorithm. Speex claims to be free of any patent restrictions and is licensed under the revised BSD...

  • Windows Media Audio
    Windows Media Audio
    Windows Media Audio is an audio data compression technology developed by Microsoft. The name can be used to refer to its audio file format or its audio codecs. It is a proprietary technology that forms part of the Windows Media framework. WMA consists of four distinct codecs...


Some other formats do not officially support gapless encoding, but some implementations of encoders or decoders may handle gapless metadata.
  • LAME
    LAME
    LAME is a free software codec used to encode/compress audio into the lossy MP3 file format.-History:The name LAME is a recursive acronym for "LAME Ain't an MP3 Encoder". Around mid-1998, Mike Cheng created LAME 1.0 as a set of modifications against the "8Hz-MP3" encoder source code...

    -encoded MP3 can be gapless with players that support the LAME Mp3 info tag.
  • AAC
    Advanced Audio Coding
    Advanced Audio Coding is a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates....

     in MP4
    MPEG-4 Part 14
    MPEG-4 Part 14 or MP4 is a multimedia container format standard specified as a part of MPEG-4. It is most commonly used to store digital video and digital audio streams, especially those defined by MPEG, but can also be used to store other data such as subtitles and still images...

     encoded with Nero Digital from Nero AG
    Nero AG
    Nero is a global computer software company headquartered in Karlsbad, Germany. It is perhaps most well-known for its burning software, Nero Burning ROM.-History:The company was founded as Ahead Software GmbH in 1995 by Richard Lesser....

     can be gapless with foobar2000
    Foobar2000
    foobar2000 is a freeware audio player for Windows developed by Peter Pawlowski, a former freelance contractor for Nullsoft. It is known for its highly modular design and extensive SDK which allows third-party developers to do such things as completely replace the interface...

    , latest XMMS2
    XMMS2
    XMMS2 is a new generation of the XMMS audio player. It is a new design, written from scratch, separate from the XMMS codebase...

    , and iTunes
    ITunes
    iTunes is a media player computer program, used for playing, downloading, and organizing digital music and video files on desktop computers. It can also manage contents on iPod, iPhone, iPod Touch and iPad....

     7.1.1.5 onwards.
  • AAC in MP4 encoded with iTunes (current and previous versions) is gapless in iTunes 7.0 onwards, 2nd generation iPod nanos, all video-capable iPods with the latest firmware, and recent versions of foobar2000.
  • iTunes-encoded MP3 is gapless when played back in iTunes 7.0 onwards, 2nd generation iPod nanos, and all video-capable iPods with the latest firmware.
  • ATRAC
    ATRAC
    Adaptive Transform Acoustic Coding is a family of proprietary audio compression algorithms developed by Sony. MiniDisc was the first commercial product to incorporate ATRAC in 1992. ATRAC allowed a relatively small disc like MiniDisc to have the same running time as CD while storing audio...

     on both MiniDisc
    MiniDisc
    The disc is permanently housed in a cartridge with a sliding door, similar to the casing of a 3.5" floppy disk. This shutter is opened automatically by a mechanism upon insertion. The audio discs can either be recordable or premastered. Recordable MiniDiscs use a magneto-optical system to record...

     and NW WalkMans is gapless through the use of time codes

Hardware

  • Rockbox
    Rockbox
    Rockbox is a replacement for the standard firmware in various forms of digital audio players . It offers an alternative to the player's operating system, in many cases without removing the original firmware, which provides a plug-in architecture for adding various enhancements and functions...

     for various digital audio players.
  • Cowon
    Cowon
    Cowon Systems, Inc. is a South Korean electronics company. Established in 1995, the company's initial focus was software development. In 2000, with the introduction of the CW100, Cowon expanded their business to the portable digital audio player industry....

     S9 supports gapless playback without software dependency since 2.31b firmware. Most newer Cowon players support gapless playback right out of the box (J3, X7, iAudio 9)
  • Microsoft
    Microsoft
    Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

     Zune
    Zune
    Zune is a digital media brand owned by Microsoft which includes a line of portable media players, a digital media player software for Windows machines, a music subscription service known as a 'Zune Music Pass', music and video streaming for the Xbox 360 via the Zune Software, music, TV and movie...

     supports gapless playback with Zune 2.5 or later firmware, though some bugs remain and occasionally small pops or skips can be heard.
  • Rio Karma
    Rio Karma
    The Rio Karma is a digital audio player originally made by the now defunct Rio. It was released in August 2003. It measures 2.7 × 3 × 0.9 inches and weighs 5.5 ounces . It has a 20 gigabyte hard drive...

     and TrekStor Vibez
    Trekstor Vibez
    The TrekStor Vibez is a microdrive digital audio player released on November 15, 2006. It is currently available in 8 GB and 12 GB capacities....

     gapless hardware players with no software dependency
  • Apple iPod classic
    IPod classic
    The iPod Classic is a portable media player marketed by Apple Inc...

     supports gapless playback of MP3s and AACs from the fifth generation onward
  • Apple iPod nano
    IPod nano
    iPod Nano is a digital media player designed and marketed by Apple Inc.. The first generation of iPod Nano was introduced on September 7, 2005 as a replacement for iPod Mini. It uses flash memory for storage. iPod Nano has gone through six models, or generations, since its introduction...

     second generation and later
  • Apple iPod Touch
    IPod Touch
    The iPod Touch is a portable media player, personal digital assistant, handheld game console, and Wi-Fi mobile device designed and marketed by Apple Inc. The iPod Touch adds the multi-touch graphical user interface to the iPod line...

  • Apple iPhone
    IPhone
    The iPhone is a line of Internet and multimedia-enabled smartphones marketed by Apple Inc. The first iPhone was unveiled by Steve Jobs, then CEO of Apple, on January 9, 2007, and released on June 29, 2007...

  • Olive Media Products Opus and Melody players
  • Linn Products
    Linn Products
    Linn Products is a Scottish company, based in Glasgow, that manufactures hi-fi audio equipment, home theatre, and multi-room integrated audio systems...

     DS network players
  • Archos
    Archos
    Archos is a French consumer electronics company that was established in 1988 by Henri Crohas. Archos manufactures portable media players and portable data storage devices. The name is an anagram of Crohas' last name, and it is also Greek for 'master'...

     Gmini XS202S
  • Sony
    Sony
    , commonly referred to as Sony, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan and the world's fifth largest media conglomerate measured by revenues....

     PlayStation Portable
    PlayStation Portable
    The is a handheld game console manufactured and marketed by Sony Corporation Development of the console was announced during E3 2003, and it was unveiled on , 2004, at a Sony press conference before E3 2004...

     supports gapless with ATRAC file formats (Tested on 5.00 M33-3 firmware)
  • Raumfeld multi-room audio system supports gapless playback since firmware version 1.2
  • All players in the Logitech
    Logitech
    Logitech International S.A. is a global provider of personal peripherals for computers and other digital platforms headquartered in Romanel-sur-Morges, Switzerland. The company develops and markets products like peripheral devices for PCs, including keyboards, mice, microphones, game controllers...

    /Slim Devices
    Slim Devices
    Slim Devices, Inc. is a consumer electronics company based in Mountain View, California, United States. Their main product is the Squeezebox network music player which connects to a home ethernet or Wi-Fi network, and allows the owner to stream digital audio over the network to a stereo...

     Squeezebox range support gapless playback for all gapless formats (lame MP3, FLAC, Vorbis, etc). Crossfading is also optionally available.
  • MiniDisc
    MiniDisc
    The disc is permanently housed in a cartridge with a sliding door, similar to the casing of a 3.5" floppy disk. This shutter is opened automatically by a mechanism upon insertion. The audio discs can either be recordable or premastered. Recordable MiniDiscs use a magneto-optical system to record...

  • ATRAC3 NW Series Sony Walkmans
  • Victor
    JVC
    , usually referred to as JVC, is a Japanese international consumer and professional electronics corporation based in Yokohama, Japan which was founded in 1927...

     Alneo V Series and C Series

Software

  • Apple iTunes
    ITunes
    iTunes is a media player computer program, used for playing, downloading, and organizing digital music and video files on desktop computers. It can also manage contents on iPod, iPhone, iPod Touch and iPad....

     7.0 and later versions support as default gapless playback on Macintosh
    Macintosh
    The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

     and Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

     without having to combine tracks during encoding (a limitation of previous releases). Some users in unusual situations have complained that the one-time analysis is a system-intensive process that can stall or crash computers.
  • Windows Media Player
    Windows Media Player
    Windows Media Player is a media player and media library application developed by Microsoft that is used for playing audio, video and viewing images on personal computers running the Microsoft Windows operating system, as well as on Pocket PC and Windows Mobile-based devices...

    , has supported gapless ripping and playback of WMA since Windows Media 9. Available on all current Windows machines.
  • Winamp
    Winamp
    Winamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...

    , supports gapless playback for MP3 and AAC files (since version 5.3).
  • XMPlay, supports gapless playback for all format files
  • foobar2000
    Foobar2000
    foobar2000 is a freeware audio player for Windows developed by Peter Pawlowski, a former freelance contractor for Nullsoft. It is known for its highly modular design and extensive SDK which allows third-party developers to do such things as completely replace the interface...

    , for Windows
  • Media Center
    Media Center (software application)
    Media Center, or formally, "JRiver Media Center" is a multimedia application that allows the user to play and organize various types of media on a computer running Windows....

    , for Windows
  • Aqualung
  • Music Player Daemon
    Music Player Daemon
    Music Player Daemon is a music player server.- Design :MPD simply runs in the background playing music from its playlist. Client programs communicate with MPD to manipulate playback, the playlist, and the database...

    , for Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     and other Unix-like platforms.
  • Music On Console
    Music on Console
    Music On Console is an ncurses-based console audio player for Linux/UNIX written by Damian Pietras. It is designed to be powerful and easy to use, with a command structure and window layout inspired by the Midnight Commander console file manager...

    , for Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     and other Unix-like platforms.
  • cmus
    Cmus
    cmus is a small and fast console audio player for Unix-like operating systems.cmus is distributed under the terms of the GNU General Public License and operates exclusively through a text-only interface, built with ncurses....

    , for Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     and BSD.
  • Clementine
    Clementine (software)
    Clementine is a cross-platform free and open source music player and library organizer. It is a port of Amarok 1.4 to the Qt 4 framework and the GStreamer multimedia framework. It is available for Unix-like, Windows and Mac OS X...

    , cross-platform
    Cross-platform
    In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

  • Qlab
    Qlab
    QLab is a multimedia playback cue-based software designed for theatre and live entertainment.- History :QLab is a multimedia playback software created by a company based in Baltimore, Maryland, known as Figure 53. Version 1.3.5 of the software was released on May 25, 2007, for use on Macintosh OSX...

    , for OSX
  • Rhythmbox
    Rhythmbox
    Rhythmbox is an audio player that plays and helps organize digital music. Originally inspired by Apple's iTunes, it is free software, designed to work well under the GNOME Desktop using the GStreamer media framework. However, Rhythmbox functions on desktop environments other than GNOME.-Music...

    , for Linux
  • Banshee, for Linux
  • DeadBeef, for Linux
  • PowerAMP, for Android
  • Neutron Music Player, for Android
  • GoneMAD Music Player, for Android


Alternative or partial solutions:
  • Amarok
    Amarok (audio)
    Amarok is a cross-platform free and open source music player for KDE, but is released independently of the central KDE Software Compilation release cycle...

    , for Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     (pre-2.x versions only)

  • XMMS2
    XMMS2
    XMMS2 is a new generation of the XMMS audio player. It is a new design, written from scratch, separate from the XMMS codebase...

     - has native support for gapless MP3 / Ogg Vorbis and FLAC

See also

  • Gapless album
    Gapless album
    A gapless album is a type of album in which some or all of the tracks are intended to be heard seamlessly without any pause. Instead of individual tracks being separated by a brief moment of silence, each transitions directly into the next track without a pause in the sound...

    , a closely related concept
  • Segue
    Segue
    A segue is a smooth transition from one topic or section to the next.-In music:In music, segue is a direction to the performer. It means continue without a pause. It comes from the Italian "it follows". The term attacca is also used in classical music.For written music it implies a transition...

    , the technique in classical music

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK