| Hello,
i'm attacking the midi section of Csound now and have a question about it.
I want to be able to play an instrument by its score but also at the same
time by midi - and later find a way to store the midimovements. I'm using
the midi/score interoperatbility opcodes.
First question: can i play a score and midi on the same instrument at the
same time?
In the file below i can either play midi or use the score note by commenting
out (or not): kcps = p4
but can not use them both.
; Generated by blue 0.125.0 (http://csounds.com/stevenyi/blue/index.html)
;
sr=44100
ksmps=1
nchnls=2
; Initialize the global variables.
; Instrument #1.
opcode declick,a,a
ain xin
aenv linseg 0, 0.1, 1, p3 - 0.05, 1, 0.02, 0, 0.01, 0
xout ain * aenv ; apply envelope and write output
endop
instr 1 ;midinoteoncps
kcps init 0
kvelocity init 0
midinoteoncps kcps, kvelocity
kcps = p4
kamp = kvelocity*200
; Display the cycles-per-second value when it changes.
printk2 kvelocity
aout oscil kamp, kcps, 1
aout declick aout
outs aout, aout
endin
f 1 0 16384 10 1
i1 0.0 10 440
e
Menno
-----
http://www.jamendo.com/de/album/6789/
http://www.jamendo.com/en/album/7428/
--
View this message in context: http://www.nabble.com/midi-and-score-tp20794179p20794179.html
Sent from the Csound - General mailing list archive at Nabble.com.
|