Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

ofxMidi - Handling several messages at the same time

$
0
0

@Cyril wrote:

Hi,

I'm trying to link Bitwig and OF, but as there is no OSC support at the moment (out port), I'm doing it with OfxMidi.
For example, I'm trying to draw some stuff with several note. C0 draw a rect. and C1 a sphere.
So i'm using :

 if (  (midiMessage.status == MIDI_NOTE_ON )& (midiMessage.pitch == 0)){
    bDrawSphere = true;
}
else {bDrawSphere = false;}

 if (  (midiMessage.status == MIDI_NOTE_ON )& (midiMessage.pitch == 12)){
    bDrawRect = true;
}
else {bDrawRect = false;}

But only one note is supported at the same time. Like if I press C0 (draw sphere), then C1 (draw sphere+Rect) and I release C1 (nothing drawn), all my shapes are disabled because a note off messages is sent so it breaks my if condition.

Does anyone know how to make a polyphony ?

Thank !
Cyril

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles