diff options
Diffstat (limited to 'examples/sqrt.csd')
-rw-r--r-- | examples/sqrt.csd | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/examples/sqrt.csd b/examples/sqrt.csd index 8637e96..b0ea677 100644 --- a/examples/sqrt.csd +++ b/examples/sqrt.csd @@ -1,33 +1,32 @@ <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 sqrt.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> -; Initialize the global variables. -sr = 44100 -kr = 4410 -ksmps = 10 -nchnls = 1 +sr = 44100 +ksmps = 32 +0dbfs = 1 +nchnls = 2 -; Instrument #1. instr 1 - i1 = sqrt(64) - print i1 -endin +asig pluck 0.7, 55, 55, 0, 1 +kpan line 0,p3,1 +kleft = sqrt(1-kpan) +kright = sqrt(kpan) +printks "square root of left channel = %f\\n", 1, kleft ;show coarse of sqaure root values + outs asig*kleft, asig*kright ;where 0.707126 is between 2 speakers +endin </CsInstruments> <CsScore> -; Play Instrument #1 for one second. -i 1 0 1 +i 1 0 10 e - - </CsScore> -</CsoundSynthesizer> +</CsoundSynthesizer>
\ No newline at end of file |