diff options
author | Felipe Sateler <fsateler@gmail.com> | 2008-03-24 16:39:11 -0300 |
---|---|---|
committer | Felipe Sateler <fsateler@gmail.com> | 2008-03-24 16:39:11 -0300 |
commit | 2af72543872544f18b7e3812cb64d9fe5886c47b (patch) | |
tree | e35d9468794be891222d3ddc05e46e2810add952 /examples/midinoteonpch.csd |
Imported Upstream version 5.08
Diffstat (limited to 'examples/midinoteonpch.csd')
-rw-r--r-- | examples/midinoteonpch.csd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/examples/midinoteonpch.csd b/examples/midinoteonpch.csd new file mode 100644 index 0000000..ce02f60 --- /dev/null +++ b/examples/midinoteonpch.csd @@ -0,0 +1,38 @@ +<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 +; For Non-realtime ouput leave only the line below: +; -o midinoteonpch.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 + kpch init 0 + kvelocity init 0 + + midinoteonpch kpch, kvelocity + + ; Display the pitch-class value when it changes. + printk2 kpch +endin + + +</CsInstruments> +<CsScore> + +; Play Instrument #1 for ten seconds. +i 1 0 10 +e + + +</CsScore> +</CsoundSynthesizer> |