next up previous contents index
Next: Functions Summary Up: Float signals Previous: The structure Fsignal   Contents   Index


Related file (external) types

The list of the available formats is the following:

  1. "A_FSIGNAL" MegaWave2 Data Ascii format with a def fsignal area. This area includes the value of the different fields of the object, as comments, scale, shift, ... and at the end the samples of the signal. Since this format uses Ascii encoding, you may read or modify the file just by editing it using a text editor. It can also be plotted using the standard tool gnuplot.

  2. "WAVE_PCM" Microsoft's RIFF WAVE sound file format with PCM encoding. Use this format to perform sound and speech processing with MegaWave2. Stereo inputs are converted to mono when loaded into a Fsignal. Since this format performs bit-encoding, on any output Fsignal variables you should set the field bpsample to the number of bits you want the data to be saved. Default value is 8×sizeof(float) (on most architectures 32), because this matches the size of the samples in the Fsignal structure. However, this value leads to strange results on some audio drivers. If you plan to send the signal on a audio driver, recommended numbers of bits are 16 (signed word) or 8 (signed char). Take care to format your data to fit the corresponding range before playing the file ( [- 32768, + 32767] for signed word and [- 128, + 127] for signed char) or you will not get the expected sound. Another important field to get the right result is sgrate, where you have to set the sample rate in Hz that is, the number of samples per second.


next up previous contents index
Next: Functions Summary Up: Float signals Previous: The structure Fsignal   Contents   Index
mw 2004-05-05