diff options
Diffstat (limited to 'examples/rnd31_time.csd')
-rw-r--r-- | examples/rnd31_time.csd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/examples/rnd31_time.csd b/examples/rnd31_time.csd new file mode 100644 index 0000000..11f4408 --- /dev/null +++ b/examples/rnd31_time.csd @@ -0,0 +1,41 @@ +<CsoundSynthesizer> +<CsOptions> +; Select audio/midi flags here according to platform +; Audio out Audio in +-odac -iadc ;;;RT audio I/O +; For Non-realtime ouput leave only the line below: +; -o rnd31_time.wav -W ;;; for file output any platform +</CsOptions> +<CsInstruments> + +; Initialize the global variables. +sr = 44100 +kr = 4410 +ksmps = 10 +nchnls = 1 + +; Instrument #1. +instr 1 + ; i-rate random numbers with linear distribution, + ; seeding from the current time. (Note that the seed + ; was used only in the first call.) + i1 rnd31 1, 0.5, 0 + i2 rnd31 1, 0.5 + i3 rnd31 1, 0.5 + + print i1 + print i2 + print i3 +endin + + +</CsInstruments> +<CsScore> + +; Play Instrument #1 for one second. +i 1 0 1 +e + + +</CsScore> +</CsoundSynthesizer> |