Csound Csound-dev Csound-tekno Search About

[Csnd] reading MIDI pitchbend outside the instrument for its channel

Date2013-11-15 20:28
FromForrest Cahoon
Subject[Csnd] reading MIDI pitchbend outside the instrument for its channel
HI all! Another MIDI question here.

My wind controller sends pitch bend signals all the time, not just when a note is playing. While I'm not sure what I'll do with it at this point, I'd like to have all the MIDI controller data I generate available any time it's generated.

The standard pchbend opcode reads the pitch bend values inside the instrument corresponding to the MIDI channel used, which means that I can only read those values between a note on and a note off event.

The numbered controllers I am able to read with ctrl7 and specify the MIDI channel number as a parameter. I have an always-on instrument reading these and putting them into global variables for me to use wherever I want. I want to be able to handle pitchbend in this same way, but so far I haven't figured out how to do that.

As always, any help is very much appreciated.

Forrest


Date2013-11-15 20:42
FromJustin Smith
SubjectRe: [Csnd] reading MIDI pitchbend outside the instrument for its channel
the midiin opcode gets many but not all raw midi messages, and then you can decipher their type and do what you like for the ones that are pitchbend (224 in the kstatus result)


On Fri, Nov 15, 2013 at 12:28 PM, Forrest Cahoon <forrest.cahoon@gmail.com> wrote:
HI all! Another MIDI question here.

My wind controller sends pitch bend signals all the time, not just when a note is playing. While I'm not sure what I'll do with it at this point, I'd like to have all the MIDI controller data I generate available any time it's generated.

The standard pchbend opcode reads the pitch bend values inside the instrument corresponding to the MIDI channel used, which means that I can only read those values between a note on and a note off event.

The numbered controllers I am able to read with ctrl7 and specify the MIDI channel number as a parameter. I have an always-on instrument reading these and putting them into global variables for me to use wherever I want. I want to be able to handle pitchbend in this same way, but so far I haven't figured out how to do that.

As always, any help is very much appreciated.

Forrest



Date2013-11-15 20:46
FromJustin Smith
SubjectRe: [Csnd] reading MIDI pitchbend outside the instrument for its channel
another hint with midiin is to always put calls to midiin in a k time loop, in case you get multiple messages in a k cycle (which is actually pretty likely), so you get all messages in a timely manner.


On Fri, Nov 15, 2013 at 12:42 PM, Justin Smith <noisesmith@gmail.com> wrote:
the midiin opcode gets many but not all raw midi messages, and then you can decipher their type and do what you like for the ones that are pitchbend (224 in the kstatus result)


On Fri, Nov 15, 2013 at 12:28 PM, Forrest Cahoon <forrest.cahoon@gmail.com> wrote:
HI all! Another MIDI question here.

My wind controller sends pitch bend signals all the time, not just when a note is playing. While I'm not sure what I'll do with it at this point, I'd like to have all the MIDI controller data I generate available any time it's generated.

The standard pchbend opcode reads the pitch bend values inside the instrument corresponding to the MIDI channel used, which means that I can only read those values between a note on and a note off event.

The numbered controllers I am able to read with ctrl7 and specify the MIDI channel number as a parameter. I have an always-on instrument reading these and putting them into global variables for me to use wherever I want. I want to be able to handle pitchbend in this same way, but so far I haven't figured out how to do that.

As always, any help is very much appreciated.

Forrest