[Csnd-dev] Opcode Request: k-time versions of notnum and veloc
| Date | 2026-07-16 15:30 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | [Csnd-dev] Opcode Request: k-time versions of notnum and veloc |
|
Use case:
For notnum: When pressing a note (via MIDI key, button or pad), an always on instrument receives that message and instantiates an event in another instrument.
For veloc: ability to eliminate the above routing when veloc = 0. (Other uses also possible.)
For both cases, the need for midiin is avoided and coding simplified.
Rationale: we've long had the k-time flexibility of ctrl7 for pots and sliders. We need the same flexibility for buttons, keys and pads.
Art Hunkins
abhunkin@uncg.edu
http://www.arthunkins.com
|
| Date | 2026-07-17 11:51 |
| From | vlz |
| Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Opcode Request: k-time versions of notnum and veloc |
Isn't that what midiin is for? An UDO would do the trick. notnum and veloc are i-time because they tap into the midi event starting the instrument. On the other hand, midiin listens to incoming midi traffic and reads from it. Internally, it is a different source. If we were to do a perf pass notnum etc, it would be basically a wrap over midiin. An UDO seems just as appropriate. best Prof. Victor Lazzarini Maynooth University Ireland On 16 Jul 2026, at 15:31, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|
| Date | 2026-07-17 14:49 |
| From | Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Opcode Request: k-time versions of notnum and veloc |
Here’s a sketch of what I had in mind
opcode notvel():(k,k)
nxt:
st:k, ch:k, not:k, vel:k midiin
if (st != 0) then
if (st == 144 && vel != 0) then // note on
notnum:k = not
veloc:k = vel
endif
kgoto nxt
endif
xout notnum, veloc
endop
> On 17 Jul 2026, at 11:51, vlz |
| Date | 2026-07-17 17:13 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Opcode Request: k-time versions of notnum and veloc |
|
Thanks for this, Victor. Your UDO would indeed accomplish the task.
I was hoping to simplify my code by avoiding both midiin and UDOs, in much the same way ctrl7 (my favorite opcode) does for knobs and sliders. (For me, coming back to my code later, I need to do things that I don't find complicated/confusing; i.e., [my] age
matters.)
Come to think of it, midinoteonkey might be a good middle ground.
Thanks again. Your comments and suggestions are always wise, helpful and on-target.
abhunkin@uncg.edu
http://www.arthunkins.com
From: Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
Sent: Friday, July 17, 2026 9:49 AM To: CSOUND-DEV@LISTSERV.HEANET.IE <CSOUND-DEV@LISTSERV.HEANET.IE> Subject: Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Opcode Request: k-time versions of notnum and veloc Here’s a sketch of what I had in mind
opcode notvel():(k,k) nxt: st:k, ch:k, not:k, vel:k midiin if (st != 0) then if (st == 144 && vel != 0) then // note on notnum:k = not veloc:k = vel endif kgoto nxt endif xout notnum, veloc endop > On 17 Jul 2026, at 11:51, vlz <viclazzarini@gmail.com> wrote: > > > Isn't that what midiin is for? An UDO would do the trick. > > notnum and veloc are i-time because they tap into the midi event starting the instrument. On the other hand, midiin listens to incoming midi traffic and reads from it. Internally, it is a different source. If we were to do a perf pass notnum etc, it would be basically a wrap over midiin. An UDO seems just as appropriate. > > best > Prof. Victor Lazzarini > Maynooth University > Ireland > >> On 16 Jul 2026, at 15:31, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote: >> >> Use case: >> >> For notnum: When pressing a note (via MIDI key, button or pad), an always on instrument receives that message and instantiates an event in another instrument. >> >> For veloc: ability to eliminate the above routing when veloc = 0. (Other uses also possible.) >> >> For both cases, the need for midiin is avoided and coding simplified. >> >> Rationale: we've long had the k-time flexibility of ctrl7 for pots and sliders. We need the same flexibility for buttons, keys and pads. >> >> Art Hunkins >> >> abhunkin@uncg.edu >> http://www.arthunkins.com ======================== Prof. Victor Lazzarini Maynooth University Ireland The information contained in this email may be confidential and privileged. It is intended only for the addressee(s) stated above. If you are not an addressee any use, dissemination, distribution, publication or copying of the information contained in this email is strictly prohibited. If you have received this email in error, please immediately notify us by email at dataprotection@mu.ie<mailto:dataprotection@mu.ie> and delete this email from your system. Please note that Maynooth University is subject to Freedom of Information and Data Protection laws. We may be required to disclose the content of emails under the FOI Act 2014, the Data Protection Act 2018 or GDPR. Is don seolaí / do na seolaithe thuasluaite amháin an ríomhphost seo. D’fhéadfadh an t-eolas atá ann a bheith rúnda agus faoi phribhléid. Mura seolaí tú, tá cosc iomlán ar aon eolas atá sa ríomhphost seo a úsáid, a scaipeadh, a dháileadh, a fhoilsiú nó a chóipeáil. Má fuair tú an ríomhphost seo trí thimpiste, cuir sin in iúl dúinn láithreach trí ríomhphost a chur chuig dataprotection@mu.ie<mailto:dataprotection@mu.ie> agus scrios an ríomhphost seo ó do chóras. Tabhair faoi deara go bhfuil Ollscoil Mhá Nuad faoi réir dhlíthe um Shaoráil Faisnéise agus um Chosaint Sonraí. D’fhéadfadh ceangal a bheith orainn ábhar ríomhphoist a nochtadh faoin Acht um Shaoráil Faisnéise 2014, faoin Acht um Chosaint Sonraí 2018 nó faoi GDPR. Registered charity number 20037130 |