My attempts to swap between noteInput and noteOnActionMatchers

Post Reply New Topic
RELATED
PRODUCTS

Post

i spent a couple hours digging into noteInputs and noteOnAction Matchers and wanted to share my findings. And perhaps someone else has a solution that I haven't thought of...

My idea was to possibly get a linnstrument which could also serve as a multi purpose controller, maybe grid, step sequencer and note playback.

On a single port, it seems like noteInput and action matchers have no method of disabling one and favoring the other.

I tried creating multiple ports and setting the same device on the same port... and setting the same device in the configuration panel.

Code: Select all

    midiInPort = host.getMidiInPort(0);
    midiInPort2 = host.getMidiInPort(1);

    midiInPort.setMidiCallback(this::onMidi);
    midiInPort2.setMidiCallback(this::onMidi2);
    
    ...
      private void onMidi(int i, int i1, int i2) {
   // noteInput.sendRawMidiEvent( i,  i1 + 5, i2);
    host.println(MessageFormat.format("Status: {0}, : {1}, : {2}) ", i, i1,i2));
  }

  private void onMidi2(int i, int i1, int i2) {
    host.println(MessageFormat.format("MIDI 2 Status: {0}, : {1}, : {2}) ", i, i1,i2));
  }
    
But here only one of the callbacks is triggered. midi2, so using the same controller on multiple inputs/outputs seems to ignore the first port.

The only thing i could think of doing is to skip all the HardwareAction matcher stuff. go old school pre-hardware button... Have note inputs setup directly with the mpe stuff enabled. and then use when its time to disable or enable the note input....

Code: Select all

noteInput.setShouldConsumeEvents(false);
includeInAllIn = noteInput.includeInAllInputs();
includeInAllIn.markInterested();
includeInAllIn.set(false);
If anyone has other suggestions i'm open ears. it would be nice to use those hardware action matchers as they help me right clean code.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”