Csound Csound-dev Csound-tekno Search About

[Csnd] Midi CC number

Date2024-01-11 10:28
FromAnders Genell
Subject[Csnd] Midi CC number
Hi!
Just a quick question - does Csound have an opcode that can print what midi controller number is being changed?
I tried midiin and it reports midi channel and midi data, but I can't see how to find what midi cc number is related to the midi data change.
I was hoping to do something akin to midi learn...

Best regards,
Anders
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

Date2024-01-11 10:39
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Midi CC number
I would think that if you check for the status byte and the print the first data byte

kstatus, kchan, kdata1, kdata2 midiin
if kstatus == 176 then
 printk 0, kdata1
endif

that should do what you want.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Jan 2024, at 10:28, Anders Genell  wrote:
> 
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi! 
> Just a quick question - does Csound have an opcode that can print what midi controller number is being changed?
> I tried midiin and it reports midi channel and midi data, but I can't see how to find what midi cc number is related to the midi data change.
> I was hoping to do something akin to midi learn...
> 
> Best regards,
> Anders
> 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

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

Date2024-01-11 10:46
FromAnders Genell
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Midi CC number
That seems to work fine, thank you!

Regards,
Anders

On Thu, Jan 11, 2024 at 11:39 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I would think that if you check for the status byte and the print the first data byte

kstatus, kchan, kdata1, kdata2 midiin
if kstatus == 176 then
 printk 0, kdata1
endif

that should do what you want.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Jan 2024, at 10:28, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi!
> Just a quick question - does Csound have an opcode that can print what midi controller number is being changed?
> I tried midiin and it reports midi channel and midi data, but I can't see how to find what midi cc number is related to the midi data change.
> I was hoping to do something akin to midi learn...
>
> Best regards,
> Anders
> 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

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
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