<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 gensone.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1; simple oscillator with loudness correction. kcps=cpspch(p4)kenvlinseg0,p3*0.25,1,p3*0.75,0;amplitude envelopekamptablei16384*kenv,2asigoscilkamp,kcps,1outsasig,asigendininstr2;neutral oscillator to compare withkcps=cpspch(p4)kenvlinseg0,p3*0.25,1,p3*0.75,0;amplitude envelopeasigoscilkenv,kcps,1outsasig,asigendin</CsInstruments><CsScore>f1016384101;sine wavef2016385"sone"032000320000sf01;1 second of silence before we start...si1027.00i1+.7.01i1+.8.02i1+.8.03si2027.00i2+.7.01i2+.8.02i2+.8.03e</CsScore></CsoundSynthesizer>
This is the diagram of the waveforms of the GENsone routine, as used in the example: