Encoding into Sound Files

This section describes how audio data recorded in a log file can be exported into a WAV file.

Important

The produced WAV file will be incorrect in the sense that the file header will not specify the correct file size. This does not seem to be a problem for common audio processing tools, though.

Steps (0.7 version)

  1. Start a bag-cat process to write the output file:

    bag-cat --load-idl "rst/proto/stable/rst/audition/SoundChunk.proto" \
            --style audio-stream/wav                                    \
            input.tide                                                  \
            > output.wav
    

    Note

    When the log file has additional channel s which are not relevant for the audio export, the --channel option can be used to restrict processing to the relevant channel(s).

    Note

    The export can be restricted to a specific time interval using the --start-index, --start-time, --end-index and --end-time options.

  2. The bag-cat process terminates when all events have been processed.

Steps (0.6 version)

  1. Start a bag-cat process to write the output file:

    bag-cat --load-idl "rst/proto/stable/rst/audition/SoundChunk.proto"        \
            --style 'programmable/script :script #p"export-audio-as-wav.lisp"' \
            input.tide                                                         \
            > output.wav
    

    Note

    The export-audio-as-wav.lisp script is part of the RSBag distribution. Details where these scripts can be found were given under Preparation.

    Note

    When the log file has additional channels which are not relevant for the audio export, the --channel option can be used to restrict processing to the relevant channel(s).

    Note

    The export can be restricted to a specific time interval using the --start-index, --start-time, --end-index and --end-time options.

  2. The bag-cat process terminates when all events have been processed.