GEN53 — Creates a linear-phase or minimum-phase impulse response table from a source table containing a frequency response or an impulse response.
GEN53 creates an impulse response function table with either a linear-phase or a minimum-phase characteristic. The source for this can either be a frequency response or an impulse response, stored in an existing table. Optionally, another function table can be used to window the input and/or the output of the process.
f # time size 53 fsrc
[mode fwin]
fsrc - source function table. If this is an impulse response, the size must match the created function table size. If a frequency response is used, then the created function size needs to be twice the size of this source. Power-of-two is required.
mode - optional, the operation mode, a sum of (a) input, frequency response (0) or impulse respone (1); (b) output, linear phase (0) or minimum-phase (2); (c) windowing, none (0), input (4) and/or output (8). The default mode (0) is frequency response input, linear-phase output, no windowing.
fwin - window function table, power-of-two size is required, but does not need to match the created function table size.
Here is a complete example of the GEN53 generator. Play gen53.csd
Example 1315. Example of the GEN53 generator.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> -o dac </CsOptions> <CsInstruments> instr 1 a1 diskin "fox.wav" a2 ftconv a1, p5, 256 out a2*p4 endin </CsInstruments> <CsScore> ; impulse response f1 0 131072 1 "ir.wav" 0 0 1 ; minimum-phase version f2 0 131072 53 1 3 ; Hann window f3 0 1024 20 1 1 ; low-pass frequency response f4 0 1024 7 0 100 0 24 1 900 1 ; low-pass linear-phase IR f5 0 2048 53 4 4 3 ; scale IR i1 0 3 0.25 2 i1 + 3 1 5 </CsScore> </CsoundSynthesizer>