Produces a signal that is the maximum of the absolute values of any number of input signals.
The maxabs opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the maximum of all of the inputs. It is identical to the max opcode except that it takes the absolute value of each input before comparing them. Therefore, the output is always non-negative. For a-rate signals, the inputs are compared one sample at a time (i.e. maxabs does not scan an entire ksmps period of a signal for its local maximum as the max_k opcode does).
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o maxabs.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1k1oscili1,10.0,1;combine 3 sinussesk2oscili1,1.0,1;at different ratesk3oscili1,3.0,1kmaxmaxabsk1,k2,k3kmax=kmax*250;scale kmaxprintk2kmax;check the valuesaoutvco2.5,220,6;sawtoothasigmoogvcf2aout,600+kmax,.5;change filter above 600 Hz outsasig,asigendin</CsInstruments><CsScore>f1032768101i105e</CsScore></CsoundSynthesizer>