Re: [LAD] How do I write meta data into a wave file? (Command line tools?)

From: Joel Roth <joelz@email-addr-hidden>
Date: Sat May 04 2013 - 05:29:03 EEST

On Sat, May 04, 2013 at 03:01:11AM +0200, Nils Gey wrote:
> Hello list,
>
> libsndfile-info shows various useful information like the one at the end of this mail.
> I have Sonatina Symphonic Orchestra waves here (violins 1) and a one note wave includes "Midi Note", "Loop Count" and "Cue Start : 92078 End : 223977", which is the actual loop start/end
>
> Is this custom data or does it follow a standard?
> And no matter what, how do I write that into my own wave files?
>
> I would prefer command line tools. But programming interfaces are fine as well.

Nils and all,

Wikipedia says:

        Metadata

        As a derivative of RIFF, WAV files can be tagged with
        metadata in the INFO chunk. In addition, WAV files can embed
        Extensible Metadata Platform (XMP) data. Applications may
        not handle this extra information or may expect to see it in
        a particular place. Although the RIFF specification requires
        that applications ignore chunks they do not recognize, some
        applications are confused by additional chunks.[citation
        needed]

Is it possible these "standards" could be among those the
courts humbly bid that Microsoft open to the uncouth gaze of
slobbering masses? (Providing court-ordered data on file
formats used internally is an area that seems to attract
the most lackadaisical and error prone MS employees.)

Otherwise, there is plenty of code to study.

This parser reveals what data structures it expects...
if you speak C.

https://metacpan.org/source/AGRUNDMA/Audio-Scan-0.93/src/wav.c

Here is a metadata parser/writer for diverse file types.

https://metacpan.org/module/EXIFTOOL/Image-ExifTool-9.27/exiftool

HTH,

Joel

>
> Greetings,
> Nils
>
> $ sndfile-info test.wav
>
> Version : libsndfile-1.0.25
>
> ========================================
> File : test.wav
> Length : 896548
> RIFF : 896540
> WAVE
> fmt : 16
> Format : 0x1 => WAVE_FORMAT_PCM
> Channels : 2
> Sample Rate : 44100
> Block Align : 4
> Bit Width : 16
> Bytes/sec : 176400
> data : 895916
> *** SAUR : 512 (unknown marker)
> smpl : 60
> Manufacturer : 0
> Product : 0
> Period : 22675 nsec
> Midi Note : 76
> Pitch Fract. : 0
> SMPTE Format : 0
> SMPTE Offset : 00:00:00 00
> Loop Count : 1
> Cue ID : 0 Type : 0 Start : 92078 End : 223977 Fraction : 0 Count : 0
> Sampler Data : 0
> End
>
> ----------------------------------------
> Sample Rate : 44100
> Frames : 223979
> Channels : 2
> Format : 0x00010002
> Sections : 1
> Seekable : TRUE
> Duration : 00:00:05.079
> Signal Max : 31468 (-0.35 dB)
>
>
>
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@email-addr-hidden
> http://lists.linuxaudio.org/listinfo/linux-audio-dev

-- 
Joel Roth
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat May 4 08:15:01 2013

This archive was generated by hypermail 2.1.8 : Sat May 04 2013 - 08:15:01 EEST