From: Jan S. <ha...@st...> - 2010-10-05 12:00:16
|
Replying to myself, On Sep 27 15:17:12, Jan Stary wrote: > Since the very beginning, SoX supports the WAV file format. > There doesn't seem to be any support for the BWF format, > http://en.wikipedia.org/wiki/Broadcast_Wave_Format > which is a kind of "augmented WAV", most notably supporting > markers in the audio. A BWF file is just a WAV file with > a richer header (more "chunks"); audio software that does > not support BWF (such as sox) can simply treat it as a WAV > (sox does, and plays them just fine). > > Tons of audio software and hardware support WAV obviously, > and support seems to be growing for the BWF. For example, > my shiny new M-Audio Microtrack II recorder can record > into BWF. > > One nice application of having support of the markers in sox > would be trimming by the markers. As in, say, a journalist > records an interview into BWF, marking the beginning of each > question. Then, > > sox interview.wav question4.wav trim 4m 5m > > Or, I make seven takes of a tuba solo, separated > by the BWF markers; then, > > sox solo.wav take5.wav trim 5m 6m > > It would also play nicely with 'newfile' and 'restart' effects. starting small, I wrote me a simple standalone tool that parses some of the chunk types I have seen, and just skips over others; here's the code: http://stare.cz/~hans/.tmp/wavmeta.c > Obviously, this needs thinking and code. Would please someone > more knowledgeable point me to a place in the codebase where > I could get started? Is there documentation of the internals? > Is there a documented way to add a new format? Or does this > simply go into src/wav.c? Looking at the sox source, I am inclined to think that if I want to add this metadata support into sox, I need to augment the display_file_info() funtion, after adding certain fields to the sox_format_t structure, right? Thank you Jan |