Musepack

Musepack audio streams with APEv2 tags.

Musepack is an audio format originally based on the MPEG-1 Layer-2 algorithms. Stream versions 4 through 7 are supported.

For more information, see http://www.musepack.net/.

class mutagen.musepack.Musepack(filename=None, *args, **kwargs)

Bases: mutagen.apev2.APEv2File

class mutagen.musepack.MusepackInfo(fileobj)

Musepack stream information.

Attributes:

  • channels – number of audio channels
  • length – file length in seconds, as a float
  • sample_rate – audio sampling rate in Hz
  • bitrate – audio bitrate, in bits per second
  • version – Musepack stream version

Optional Attributes:

  • title_gain, title_peak – Replay Gain and peak data for this song
  • album_gain, album_peak – Replay Gain and peak data for this album

These attributes are only available in stream version 7/8. The gains are a float, +/- some dB. The peaks are a percentage [0..1] of the maximum amplitude. This means to get a number comparable to VorbisGain, you must multiply the peak by 2.