summaryrefslogtreecommitdiff
path: root/examples/trirand.csd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/trirand.csd')
-rw-r--r--examples/trirand.csd48
1 files changed, 20 insertions, 28 deletions
diff --git a/examples/trirand.csd b/examples/trirand.csd
index 3ba4947..d8dd839 100644
--- a/examples/trirand.csd
+++ b/examples/trirand.csd
@@ -1,50 +1,42 @@
<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 RT audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o trirand.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
-; Initialize the global variables.
sr = 44100
-kr = 4410
-ksmps = 10
-nchnls = 1
+ksmps = 32
+nchnls = 2
+0dbfs = 1
-; Instrument #1.
-instr 1
- ; Generate a random number between -1 and 1.
- ; krange = 1
+instr 1 ; every run time same values
- i1 trirand 1
-
- print i1
+ktri trirand 100
+ printk .2, ktri ; look
+aout oscili 0.8, 440+ktri, 1 ; & listen
+ outs aout, aout
endin
-; Instrument #2.
-instr 2
- ; Generate a random number between -1 and 1.
- ; krange = 1
-
- seed 0
-
- i1 trirand 1
+instr 2 ; every run time different values
- print i1
+ seed 0
+ktri trirand 100
+ printk .2, ktri ; look
+aout oscili 0.8, 440+ktri, 1 ; & listen
+ outs aout, aout
endin
</CsInstruments>
<CsScore>
+; sine wave
+f 1 0 16384 10 1
-; Play Instrument #1 for one second.
-i 1 0 1
-; Play Instrument #2 for one second.
-i 2 1 1
+i 1 0 2
+i 2 3 2
e
-
-
</CsScore>
</CsoundSynthesizer>