On Sun, Nov 10, 2019 at 05:32:03PM +0000, Victor Lazzarini wrote: > Michael Gogins is the author. Maybe he can clarify the kind of usage this is supposed to have. > > The manual says velocity when the note was activated, which appears to mean noteon velocity. > I read it as meaning activation by the note-off message. That's what I would have expected, anyway. On Sun, Nov 10, 2019 at 01:54:17PM -0500, Steven Yi wrote: > The code is exactly the same as midinoteon btw. No idea how this > opcode is supposed to work with the code that is in repo at the > moment. > So I see! I didn't try to penetrate all that MIDI code too deeply, but I have a feeling that quite a bit of stuff would need to be added. ATM, it seems to me that a UDO is a better workaround. Here's a quickie that seems to work: opcode MidiNoteOff, k, ii ichan, ikey xin kstatus, kchan, kdata1, kdata2 midiin xout (kstatus == 128 && kchan == ichan && kdata1 == ikey)? kdata2 : -1 endop It's a pity that 0 is a legal release velocity -- means having to check for non-negative return.) -- Pete -- Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here