diff options
Diffstat (limited to 'examples/notequal.csd')
-rw-r--r-- | examples/notequal.csd | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/examples/notequal.csd b/examples/notequal.csd index d104723..335d21f 100644 --- a/examples/notequal.csd +++ b/examples/notequal.csd @@ -1,43 +1,39 @@ <CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -; Audio out Audio in --odac -iadc ;;;RT audio I/O +-odac ;;;realtime audio out +;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o notequal.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> -; Initialize the global variables. sr = 44100 -kr = 44100 -ksmps = 1 -nchnls = 1 +ksmps = 32 +nchnls = 2 +0dbfs = 1 -; Instrument #1. instr 1 - ; Get the 4th p-field from the score. - k1 = p4 - ; Is it not equal to 3? (1 = true, 0 = false) - k2 = (p4 != 3 ? 1 : 0) +ipch = cpspch(p4) +iprint = p5 +if (iprint != 1) igoto skipPrint +print ipch +asig vco2 .7, ipch + outs asig, asig - ; Print the values of k1 and k2. - printks "k1 = %f, k2 = %f\\n", 1, k1, k2 -endin +skipPrint: +endin </CsInstruments> <CsScore> +f 1 0 65536 10 1 ;sine wave -; Call Instrument #1 with a p4 = 2. -i 1 0 0.5 2 -; Call Instrument #1 with a p4 = 3. -i 1 1 0.5 3 -; Call Instrument #1 with a p4 = 4. -i 1 2 0.5 4 -e - +i1 0 .5 8.00 0 +i1 0 .5 8.01 1 ; this note will print it's ipch value and only this one will be played +i1 0 .5 8.02 2 +e </CsScore> </CsoundSynthesizer> |