Produces a signal that is the maximum of any number of input signals.
The max opcode takes any number of a-rate, k-rate or i-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. For a-rate signals, the inputs are compared one sample at a time (i.e. max 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 max.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,1kmaxmaxk1,k2,k3kmax=kmax*250;scale kmaxprintk2kmax;check the valuesaoutvco2.5,220,6;sawtoothasigmoogvcf2aout,600+kmax,.5;change filter around 600 Hz outsasig,asigendin</CsInstruments><CsScore>f1032768101i105e</CsScore></CsoundSynthesizer>