SNDFILE-INTERLEAVE(1)

✨ SNDFILE-INTERLEAVE πŸ’–

okay bestie, so this is a page from the General Commands Manual, and it's about two lil tools that live together: sndfile-interleave and sndfile-deinterleave. one glues mono files into a big multi-channel file, the other takes a big multi-channel file apart into lil mono ones. it's giving ✨file scissors✨ but for audio.


🌸 NAME 🌸

<pink>sndfile-interleave</pink>, <pink>sndfile-deinterleave</pink> β€” convert mono files into a multi-channel file and vice versa

like. the whole vibe. one direction and then the other direction. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

sndfile-interleave input1 input2 ... -o output
sndfile-deinterleave file

literally that's it. that's the whole thing. no cap. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

sndfile-interleave β€” the glue one 🫢

so sndfile-interleave creates a multi-channel file, and it does that by taking audio data from two or more mono files and treating each one as its own individual channel. so like. two monos walk in, one stereo walks out. iconic.

the format of the output file is determined by its filename suffix. so yes bestie, the extension IS the format, that's the whole mechanism, don't fight it. πŸŽ€

the audio parameters of the output file will be made so that the format can accommodate each of the mono inputs β€” for example, the samplerate will be the maximal samplerate occurring in the inputs. so if one input is faster, the output matches the fastest one. main character energy wins, obviously. πŸ‘‘

⚠️ the output file will be overwritten if it already exists. like. gone. bye. no confirmation dialog, no "are you sure", nothing. πŸ™ˆ

sndfile-deinterleave β€” the un-glue one 🧚

sndfile-deinterleave creates two or more mono files from a multi-channel audio file, containing data from the individual channels. so it's the exact reverse vibe. πŸ’–

the names of the resulting mono files are of the form <yellow>name_XY.suf</yellow> where name and suf are the basename and suffix of the original file.

⚠️ if any file of such name already exists, it will be overwritten. same energy. same drama. πŸ’€

apart from the number of channels, the audio format of the resulting mono files is the same as that of the original file. so it doesn't remix or rescale anything, it just splits. periodt. ✨


🌈 EXIT STATUS 🌈

the sndfile-interleave utility exits 0 on success, and >0 if an error occurs.

so like. 0 = we ate. anything above 0 = something went sideways. 😭


πŸ“ EXAMPLES πŸ“

merge a mono OGG file and a mono FLAC file into a stereo WAV file:

$ sndfile-interleave left.ogg right.flac -o stereo.wav

two different formats, one happy stereo wav. slay. πŸ”₯

split a multi-channel into individual mono files:

$ sndfile-deinterleave multi.wav
Input file : multi
Output files :
    multi_00.wav
    multi_01.wav
    multi_02.wav
    multi_03.wav

see how it named them? multi_00.wav, multi_01.wav, multi_02.wav, multi_03.wav β€” that's the name_XY.suf thing in action. four channels, four files, zero chaos. πŸŽ€


🌸 SEE ALSO 🌸

go look at it bestie, iykyk. πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

Erik de Castro Lopo <erikd@mega-nerd.com>

absolute legend, we stan. πŸ’œ


and that's the whole page fr fr. this version came from the Debian folks, dated November 2, 2014, and it's SNDFILE-INTERLEAVE(1) β€” ok bye bestie, go interleave something πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from