You do not need the interop opcodes, at least not for just turning instruments on and off, you can use the command-line flags that assign MIDI key and velocity to pfields. The examples/CsoundAC.csd orchestra is written this way, in CVS I have changed the default command options and cleaned up some of the real-time MIDI behavior, you might want to take a look at it. I use the instruments interchangeably for keyboard performance and for score-driven, off-line rendering, all the time. Either with interop or flags, you can send MIDI and score events to the same instrument. Regards, Mike On 12/2/08, menno <nabob_cd@yahoo.com> wrote: > > 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) > ; > > <CsoundSynthesizer> > > <CsInstruments> > 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 > > > </CsInstruments> > > <CsScore> > > f 1 0 16384 10 1 > > i1 0.0 10 440 > > e > > </CsScore> > > </CsoundSynthesizer> > > 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. > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > -- Michael Gogins Irreducible Productions Michael dot Gogins at gmail dot com