| mp4-sa-> sfront reference manual-> file rendering |
Sections
|
IntroductionThis chapter describes how to use sfront for off-line applications, where audio input and output are sent to files. These rendering applications work on all supported platforms. We begin with decoding applications, including simple MP4 file rendering, and more complex jobs that use multiple file types (ASCII SAOL and SASL files, and binary MIDI Files). We also describe how to use sfront to encode binary MP4 files. Finally, we describe the ways that sfront is not MP4-SA compliant. |
|
MP4 File DecodingIn Chapter I/1, we describe the set of example files included with sfront for testing purposes. These examples use sfront to create an audio file in an off-line fashion. We describe this sfront application as file rendering. To render a binary MP4 file, simply run sfront and specify the binary file name using the -bit option (see the right panel for syntax). Running this command creates the file sa.c, that when compiled and executed, renders the audio performance in the WAV file  output.wav. The -bit option reads both the configuration block and the streaming blocks from the MP4 file, which is the proper behavior for most applications. The alternative -bitc option reads only the configuration block data, and ignores the streaming blocks. Note that sfront uses the MP4 extension for binary files, to match the naming convention of the MPEG reference decoder saolc. Sfront MP4 files are compatible with saolc MP4 files. However, these MP4 files do not use MPEG 4 Systems technology, and are incompatible with Structured Audio files that do use MPEG 4 Systems. C filename optionThe -o command-line option changes the C output filename from the default sa.c. See the right panel for examples. Audio output optionsThe -aout command-line option overrides the default option of writing a WAV file names output.wav. If the string following the -aout option contains a period, sfront assumes the string is a filename, and uses the extension after the period to determine the filetype. See the right panel for examples. At this time, sfront recognizes four extensions:
If a raw file is selected, sfront writes a C file that generates a file containing channel-interleaved, 16-bit signed integers, in the native byte order of the machine. A companion ASCII file, fname.raw.info, is also written, which has three lines: line one is the sampling rate, line two is the number of channels, line three is the total number of samples in the file. If a dat file is selected, sfront writes a C file that creates ASCII .dat files that are readable by the curve viewing and manipulation program view. View is a part of the Chipmunk tools, which are licensed under the GNU Public License. These tools run on most UNIX systems, but do not run under Microsoft Windows. In addition to audio files names, the -aout command-line option recognizes the string std. If this option is used, channel-interleaved, 16-bit signed integers, in the native byte order of the machine, are streamed to standard output (i.e. stdout). |
File Renderingsfront -bit min.mp4 creates sa.c file, that when compiled, renders a WAV file into output.wav, based on the binary MP4-SA file min.mp4. compiles both configuration and streaming data into the sa.c file. sfront -bitc min.mp4 creates sa.c file that only includes information from the configuration block of the MP4-SA min.mp4. comp |
| mp4-sa-> sfront reference manual-> real-time |