I was checking out the midiin opcode and ran into something I don’t quite understand. When I play multiple notes, each new note on adds another event to the stream… In this output there are 5 noteon events followed by 5 noteoff events… But with each added note, there are multiple lines printed, the first note prints one, the second note prints two, etc. And then with each note off, it prints a line for each note still holding and the note just released. I attached the program…
OK, but how are the extra instances of instr 100 getting started? I’ve only got one reference in the score.
Also, I changed the instr by starting it with “alwayson” in the orchestra, but it still gives the same output, for each additional noteon, it prints an extra line of output.
Thank you, joachim! I guess I didn’t understand how this worked. I thought I suppressed the incoming midi being automatically fed to an instrument. Adding the “massign” did eliminate the multiple instances. I guess that was how there were multiple instance of 100.
yes each midi note event by default triggers the first csound instance. so another way to get rid of the multiple instances should be to put an empty instr 1 in the code.
i personally never use the midiin opcode when i work with midi notes because it is so handy to pipe the note events to any instrument and then distribute them.
I wasn’t looking at midiin because of notes, but it seems to be the only way to capture any pitch bend events unless there is an active midi event. You can read the controllers without there being an event, but there isn’t an opcode that does the same thing for pitch bends. I am hoping to capture the pitch bend info so that I can use it to control the pitch of an automated series of events.
And after playing with the midiin opcode, it has given me some ideas about how to rework one of my projects, but that will have to wait so that I can at least get something working now!!!