About
Software
Services
Ideas
Rants
nklein logo

soundToStream

Overview

This program is the inverse of the fromStream program. This program will take raw signed 16-bit PCM and emits our stream format for it. The following example should be pretty close to the identity transformation (assuming that the incoming stream had 32 columns.

... | fromStream | soundToStream -width 32 | ...

Options

[-lps linesPerSecond]
This is the number of lines of stream are to be generated for each second of input music. The default is 64.0.
[-width width]
The number of pixels across for the output stream. The default is 32.0.
[-gamma gamma]
This is the gamma correction factor that one would expect to use to decode the stream. The default value is 0.44. For more information, see the documentation for fromStream.
[-minHz minHz]
The minimum frequency. The default is 128.0.
[-maxHz maxHz]
The maximum frequency. The default is 4096.0. Note, if the minimum and maximum aren't both powers of the same number, chances are that there will be a great deal of interference between your frequencies that results in crackles in the sound. Also note, that there is no reason that the minimum frequency really has to be smaller than the maximum frequency.
[-freq frequencyOfInputSoundSample]
The input sound sample has a frequency associated with it. For CD quality sound, this is 44100. The default value is 8192.
[-stereo]
If the input sound sample is stereo, this flag will downmix the stereo to mono. Unfortunately, the stream format is only mono at this point, so there is no better way to deal stereo sound.
[-wave sine|square|triangle|sawtooth|toothsaw]
This specifies what type of waveform one expects to use for playback with fromStream. The default is sine.

(copyright 2001) (gpg keys)

Valid XHTML 1.0! Valid CSS!