Sounds Logical
home

WaveWarp 2.0 Component

IndexCurrent GroupPrevious GroupNext GroupPrevious ComponentNext ComponentBottom of Page

Functional Description | Algorithm | Signal Implementations | Related Components | Example DWBs usage

Output ASCII Files:

Output Audio ASCII file

Functional Description
Represents an ASCII file as an audio output destination. The Output ASCII Files category of the Component Library includes the filenames of all files with the ".txt" extension located in the user-specified directory on the hard-disk. For notational convenience, all such files are listed three times each, reflecting their intended use, i.e. as a mono audio file, a stereo audio file, or as a control signal file. The mono audio or the stereo audio entry for a given file in the list can be used as an audio output component on the DrawingBoard. Only one instance of the same file can be connected up on the DrawingBoard.

All connected output files are over-written when the DrawingBoard is played so they should be used with caution. For convenience, and to avoid unintentional over-writing, a set of "place-holder" template output files are always available (regardless of the user-specified directory). These template files are listed in the following table:

Filename Description
NewMono.txt Empty ASCII file intended for mono audio data
NewStereo.txt Empty ASCII file intended for stereo audio data
NewControl.txt Empty ASCII file intended for control signal data

These files can be used on the DrawingBoard as if they were standard (i.e. non-empty) ASCII files. When data has been written to any such file (i.e. after playing the DrawingBoard), it is advisable to change its name so as to preserve the recorded data as well as to preserve the "place-holder" name for new files. The name of any file on the DrawingBoard can be changed by double-clicking on its filename. This will open a conventional "Save As" file dialog box which can then be used to rename the file in the usual "Windows" manner.

When the DrawingBoard is played, the 32-bit floating point data sent to each ASCII file is written "as is", one sample value per line. If the ASCII output file is chosen to store stereo audio data (recalling that any ASCII file can be treated as a mono, stereo, or control source), then the file is written in an "interleaved" fashion, i.e. in successive alternating left-then-right sample pairs.

The file is written at the sample rate of the upstream component. However, since the ASCII file does not store the value of the sample rate, it is irrelevant once the file is written. All that remains is a list of floating-point sample values, one per line.

CAUTION: WaveWarp does not scan for the end of ASCII files. Therefore, if a DrawingBoard contains only ASCII files (i.e. no WAV files), it will continue playing forever. It is particularly important to bear this in mind whenever Output ASCII files are used. If left alone, the DrawingBoard will continue writing to the file(s) indefinitely, rapidly filling up the hard-disk! It is the user's responsibility to manually issue the Stop command (via the Transport Window or toolbar) at the desired point in time.

Note: ASCII files are useful when prototyping a DrawingBoard or when investigating the detailed behaviour of a component or set of components. Since the ASCII data is read "as is" without any scaling (unlike with WAV files) the precise behaviour of a component or set of components can be ascertained from the detailed comparison of input and output ASCII files. However, since the ASCII representation is intrinsically inefficient, ASCII files should only be used with small "test" files, and should not be used for the storage of audio material of any significant length.

Note for MATLAB® users: since it is trivial to import and export ASCII files from within MATLAB (i.e. using the "-ascii" switch with the "load" and "save" commands), it is straightforward to read ASCII files produced by WaveWarp for off-line processing, or indeed, to create ASCII input test files for use by WaveWarp.

Algorithm
n/a
Signal Implementations
Audio signals Control signals Description
Single input monon/a Sends a mono audio signal to an ASCII file as a list of numbers
Single input stereon/a Sends a stereo audio signal to an ASCII file as a list of numbers in an "interleaved" fashion
Related components:
Example DrawingBoards illustrating usage:

IndexCurrent GroupPrevious GroupNext GroupPrevious ComponentNext ComponentTop of Page

home - news - products - store - support - site map - company info
© 2007 Sounds Logical. All rights reserved.
Sounds Logical
legal notice - privacy statement