The Alternative Csound Reference Manual
Previous |  | Next

# cvanal

cvanal -- Converts a soundfile into a single Fourier transform frame.

## Description

Impulse Response Fourier Analysis for convolve operator

## Syntax

CSound -U cvanal [flags] infilename outfilename

## Initialization

cvanal -- converts a soundfile into a single Fourier transform frame. The output file can be used by the convolve operator to perform Fast Convolution between an input signal and the original impulse response. Analysis is conditioned by the flags below. A space is optional between the flag and its argument.

-s rate -- sampling rate of the audio input file. This will over-ride the srate of the soundfile header, which otherwise applies. If neither is present, the default is 10000.

-c channel -- channel number sought. If omitted, the default is to process all channels. If a value is given, only the selected channel will be processed.

-b begin -- beginning time (in seconds) of the audio segment to be analyzed. The default is 0.0

-d duration -- duration (in seconds) of the audio segment to be analyzed. The default of 0.0 means to the end of the file.

## Examples

    cvanal asound cvfile

will analyze the soundfile "asound" to produce the file "cvfile" for the use with convolve.

To use data that is not already contained in a soundfile, a soundfile converter that accepts text files may be used to create a standard audio file, e.g., the .DAT format for SOX. This is useful for implementing FIR filters.

### Files

The output file has a special convolve header, containing details of the source audio file. The analysis data is stored as "float", in rectangular (real/imaginary) form.

| Note
| The analysis file is not system independent! Ensure that the original impulse recording/data is retained. If/when required, the analysis file can be recreated.

## Credits

Author: Greg Sullivan

Based on algorithm given in Elements Of Computer Music, by F. Richard Moore.

Previous | Home | Next
pvanal | Up | File Queries