diff options
author | Felipe Sateler <fsateler@debian.org> | 2014-01-24 13:54:37 -0300 |
---|---|---|
committer | Felipe Sateler <fsateler@debian.org> | 2014-01-24 13:54:37 -0300 |
commit | bcf06a42deb371baf3deb9f4addb474b08273120 (patch) | |
tree | 4a8c3fb811dd164d4486628d8eff6043ebe8a6c3 /examples/midinoteonkey.csd | |
parent | 3a91171181113761a14bcc36a086a8dda144b77b (diff) |
Imported Upstream version 6.02~dfsg
Diffstat (limited to 'examples/midinoteonkey.csd')
-rw-r--r-- | examples/midinoteonkey.csd | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/examples/midinoteonkey.csd b/examples/midinoteonkey.csd index 66110a7..56bba7d 100644 --- a/examples/midinoteonkey.csd +++ b/examples/midinoteonkey.csd @@ -1,38 +1,33 @@ <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 -M1 -Q1 ;;;realtime audio out and midi in and midi out +;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o midinoteonkey.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> -; Initialize the global variables. sr = 44100 -kr = 4410 -ksmps = 10 -nchnls = 1 +ksmps = 32 +nchnls = 2 +0dbfs = 1 -; Instrument #1. -instr 1 - kkey init 0 - kvelocity init 0 +instr 1 ;uses external midi device - midinoteonkey kkey, kvelocity +kkey init 0 ;initialize key number +kvel init 0 ;initialize velocity +midinoteonkey kkey, kvel ;MIDI note number value +printk2 kkey ;display the key value when it changes and when key is pressed +midion 1, kkey, kvel ;sent note to external device - ; Display the key value when it changes. - printk2 kkey endin - - </CsInstruments> <CsScore> +f 0 30 ;runs for 30 seconds -; Play Instrument #1 for ten seconds. -i 1 0 10 +i 1 0 2 62 ; play these notes from score as well +i 1 + 2 65 e - - </CsScore> </CsoundSynthesizer> |