diff options
Diffstat (limited to 'examples/randh.csd')
-rw-r--r-- | examples/randh.csd | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/examples/randh.csd b/examples/randh.csd index a50d372..ecc3fe0 100644 --- a/examples/randh.csd +++ b/examples/randh.csd @@ -1,47 +1,41 @@ <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 randh.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 - ; Choose a random frequency between 200 and 1000. - ; Generate new random numbers at 4 Hz. - ; kamp = 400 - ; kcps = 4 - ; iseed = 0.5 - ; isize = 0 - ; ioffset = 600 - - kcps randh 400, 4, 0.5, 0, 600 - printk2 kcps - - a1 oscil 30000, kcps, 1 - out a1 +ksmps = 32 +nchnls = 2 +0dbfs = 1 + +instr 1 ;same values every time + +krnd randh 100, 10 + printk2 krnd ; look +aout oscili 0.8, 440+krnd, 1 ; & listen + outs aout, aout + endin +instr 2 ;different values every time + +krnd randh 100, 10, 10 ; seed from system clock + printk2 krnd ; look +aout oscili 0.8, 440+krnd, 1 ; & listen + outs aout, aout +endin </CsInstruments> <CsScore> +f 1 0 16384 10 1 ;sine wave. -; Table #1, a sine wave. -f 1 0 16384 10 1 - -; Play Instrument #1 for one second. -i 1 0 5 +i 1 0 1 +i 2 2 1 e - - </CsScore> </CsoundSynthesizer> |