Skip to content

E-mu stereo samples are written as double-length mono #32

Description

@bmxcode

The EMU3 sample record's pointer block declares a channel count, and roughly 2 700 of the 14 738 E-mu samples on the reference shelf declare two channels. The payload is a block split — all of the left channel, then all of the right — so reading it as one mono stream concatenates the channels into a file twice as long as the sound.

Found while decoding the loop points in #31 (ADR-0025). Not fixed there: correcting it moves audio, and D17 was scoped to add metadata without touching a byte of payload.

Why this was missed

ADR-0020 rejected the channel-count reading on a measurement that tested the wrong hypothesis: it de-interleaved payloads as LRLR and found the roughness roughly doubled. That is a sound refutation of interleaved stereo and says nothing about a block split, which read as mono is one continuous waveform with a single join in the middle. The rejection is annotated in place; the rest of ADR-0020 stands.

The evidence

Median RMS-envelope correlation between the two halves of a payload, split by what the record's own pointers declare:

esi32-gm eiiix-1 eiiix-2 protozoa analogia studio vitous
two channels declared 0.99 0.71 0.95 0.55 0.91 0.96 0.82
one channel declared 0.13 0.16 0.59 0.26 0.21 0.22

Envelope rather than sample-level correlation: the two channels of a real recording differ in phase and agree in shape.

Records declaring two channels, per disc: esi32-gm 28, eiiix-1 641, eiiix-2 598, protozoa 27, eiv-analogia 279, eiv-studio 320, eiv-vitous 828 (all of it).

What a fix involves

start_R == start_L + P/2 is the test. The two halves interleave into a stereo WAV, which wav.py already writes and stereo.py already interleaves for the name-paired case. Watch for:

  • Every E-mu sample count and payload digest moves for those records. tests/test_discs.py pins both per disc; they will need re-measuring, and the reason recorded.
  • The loop points do not move. (pointer − start) / 2 is a per-channel frame index either way.
  • eiiix-2's one-channel figure of 0.59 is the weakest separation in the table and should be understood before the gate is trusted.
  • The interaction with ADR-0017 name-pairing, which is a separate mechanism these discs also use — both are real, and that is part of why one hid the other.

Written up in docs/formats/emu3.md under "Stereo: the payload is split, not interleaved".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions