[LAU] stereo channel differeces
lorenzofsutton at gmail.com
Wed Jan 9 15:53:47 UTC 2013
On 01/01/13 19:18, Robin Gareus wrote:
> On 01/01/2013 07:07 PM, Brent Busby wrote:
>> First off, Happy New Year to all! :)
>> Can anyone recommend a quick way of seeing the differences highlighted
>> visually between two channels in a stereo sample...sort of like a
>> graphical 'diff' for waveforms?
>> I think I may have some Akai MPC2000 samples that somehow were saved by
>> the Akai as mono samples even though they actually contain two channels
>> and are really stereo:
>> Using 'sndfile-info' on them reports them as mono, but it's just looking
>> at the 22nd byte in the file, which should contain 0x00 or 0x01 to say
>> if it is mono or stereo. The file contains 0x00 in that location, so
>> sndfile-info believes that it's mono because the file header says so.
>> However, if I flip the bit in a hex editor and resave the file, now I
>> can load the file in a sample editor and it seems to have two channels
>> which play at double speed. I'm still not positive I'm hearing stereo
>> (if I am, it's very subtle), but I'm definitely seeing two channels
>> visually, and I know this sample was sampled on the Akai in stereo.
>> Any way to do a graphical comparison that will highlight even small
>> channel waveform differences?
> Invert the phase of one channels (volume *=-1) and downmix to mono. If
> both channels are identical it'll result in a flat zero line.
> I'd use rezound for that, but pretty much any soundfile editor should do.
You could probably also do it with sox and diff (possibly script it for
sox mystery_file.wav c1.wav remix 1
sox mystery_file.wav c2.wav remix 2
diff c1.wav c2.wav
If mystery_file.wav had exact same channels diff will just exit with no
output (exit code 0) otherwise it will output something like: Binary
files c1.wav and c2.wav differ (and exit code 2)
More information about the Linux-audio-user