A thought, maybe your instrument is numbered as 1 (this is done internally in Csound). Try calling instr 100 instead. If you provide a CSD I can look into it. Victor ----- Original Message ----- From: Jim Aikin Date: Tuesday, December 11, 2012 5:17 pm Subject: [Csnd] Re: MIDI Thru Message Suppression To: csound@lists.bath.ac.uk > After further investigation, it seems clear to me that Csound is doing > something undocumented and arguably very wrong with real-time > MIDI data. I > edited my simple MIDI thru instrument to add a print statement, > like this: > > instr 104, mThruTest > kstatus, kchan, kdata1, kdata2 midiin > if (kstatus != 0) then > printks "Got an event to play!\\n", 0.01 > endif > midiout kstatus, kchan, kdata1, kdata2 > endin > > At this point, playing one note at a time on the keyboard, > pressing and > releasing the key, causes one message to print on key-down and > another on > key-up -- as expected. > > If I press and hold more and more notes, then I get one message > per note-on, > as before. However, I also get a "new alloc for instr mThruTest" > on each > note-on. This should not be happening. There should be only one > instance of > mThruTest running, because it certainly isn't instr number 1, so it > shouldn't be starting new instances. And when I lift my fingers > one by one > from the chord, instead of seeing one print statement per note- > off, I see as > many print statements as there are active mThruTest instruments. > > The basic problem seems to be that Csound is starting extra > instances of the > alwayson instrument, which it shouldn't do, because that > instrument is not > numbered between 1 and 16. In addition, Csound is shutting off > notes that > have been started by the extra instance of mThruTest according > to some > arbitrary note-count criterion of its own ... and without > shutting off the > instance. > > This is all when the keyboard transmits on MIDI channel 1. When > I switch the > keyboard to send on channel 2, Csound gets even more > confusificated. I start > getting stuck notes when I lift my fingers -- and they're notes > that I > didn't play! I can play, for instance, an E and then a G#, and > when the G# > starts, Csound may also play a D. The D won't be ended when I > lift my > fingers, of course, as it's a phantom event. It will get stuck. > (I'm playing > an organ preset on the softsynth, so as to hear stuck notes and > droppednotes more easily.) > > midiin and midiout ought to be simple, transparent objects, but > it seems > they're not. The business of extra instances of an alwayson instrument > getting initiated is just as troubling. > > Any insights on this weird situation would be more than welcome.... > > --JA > > > > -- > View this message in context: > http://csound.1045644.n5.nabble.com/MIDI-Thru-Message- > Suppression-tp5718720p5718736.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe csound" > Dr Victor Lazzarini, Senior Lecturer, Dept. of Music, National University of Ireland, Maynooth