On Sat, Aug 21, 2021 at 07:44:19PM +0000, Victor Lazzarini wrote: > Given that midiin outputs a single midi byte, it's not really appropriate to signal the arrival of nrpns, which use four bytes. I'm not sure this is strictly true. The 'canonical' way is to send three or four messages: cc99 cc98 cc6 cc38 (optional) but then one is supposed to "close off" the data-entry CC6/38 with: cc101 <127> cc100 <127> Confusingly, it seems one should use the RPN controllers for the reset, even for NRPN setting. Presumably, though, this full sequence isn't necessary. If for instance you need to set a series of NRPNs you might only need ...... cc98 cc6 ...... repeated as appropriate. Then only close off at the end. My alwayson "Tuning" instrument (for RPN Fine Tuning) is quite simple and works well. It simply monitors control messages and if the CC is 100 or 101 sets a local variable. If the CC is 6 and the local variables have the correct value, it sets a global tuning variable. A more generic "readrpn" (or "readnrpn") would be a litle more complex, but not markedly. Without thinking too hard(!) I don't see any real difficulty in an opcode version. Perhaps would return parameter number and value (two args) when a CC6 is received. Might need a 14-bit version, or just ignore CC38. -- 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