diff options
Diffstat (limited to 'examples/pchbend.csd')
-rw-r--r-- | examples/pchbend.csd | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/examples/pchbend.csd b/examples/pchbend.csd index fa87b87..e803f80 100644 --- a/examples/pchbend.csd +++ b/examples/pchbend.csd @@ -1,34 +1,31 @@ -<CsoundSynthesizer> +<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -; Audio out Audio in No messages MIDI in --odac -iadc -d -M0 ;;;RT audio I/O with MIDI in +-odac -Q1 -Ma ;;;realtime audio out and midi in (on all inputs) and out +;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o pchbend.wav -W ;;; for file output any platform </CsOptions> -<CsInstruments> +<CsInstruments> -; Initialize the global variables. sr = 44100 -kr = 4410 -ksmps = 10 -nchnls = 1 - -; Instrument #1. -instr 1 - i1 pchbend - - print i1 -endin - - -</CsInstruments> -<CsScore> - -; Play Instrument #1 for 12 seconds. -i 1 0 12 -e - - -</CsScore> -</CsoundSynthesizer> +ksmps = 32 +nchnls = 2 +0dbfs = 1 + +instr 1 ;use external midi keyboard + +icps cpsmidi +kbnd pchbend 0, 100 ;one octave lower and higher +kenv linsegr 0,.001, 1, .1, 0 ;amplitude envelope +asig pluck .8 * kenv, icps+kbnd, 440, 0, 1 + outs asig, asig + +endin +</CsInstruments> +<CsScore> + +f 0 30 ;runs 30 seconds + +</CsScore> +</CsoundSynthesizer> |