• SONAR
  • [SOLVED] How to route a specific CC to multiple channels at same time?
2017/02/02 14:03:57
rogeriodec
I'm using NoteMapper successfully to route notes to different channels.
But it only routes NOTES and not CC.
I would like to know if there is any way or some plugin that allows me the following:
1) Listen a CC 64 on channel 1
2) Play CC 64 on both channel 1 and channel 2?
2017/02/08 19:29:00
rogeriodec
I did not find any plugin suitable for this in the market, so I created a script using Blue Cat's Plug'n Script.
 
#include "library/Midi.hxx"
// temp MIDI events for processing
MidiEvent tempEvent;
int8 ch;

void processBlock(BlockData& data)
{
 for(uint i=0;i<data.inputMidiEvents.length;i++) {

  ch=1;
  MidiEventType type=MidiEventUtils::getType(data.inputMidiEvents[i]);
  tempEvent=data.inputMidiEvents[i];
  
  if(type==kMidiControlChange) {
   data.outputMidiEvents.push(tempEvent);
   int8 cc=MidiEventUtils::getCCNumber(data.inputMidiEvents[i]);
   int8 cv=MidiEventUtils::getCCValue(data.inputMidiEvents[i]);
   if (cc == 64)
    ch = 2;
   MidiEventUtils::setCCValue(tempEvent,cv);
  }
        MidiEventUtils::setChannel(tempEvent,ch);
  data.outputMidiEvents.push(tempEvent);
 }
}

© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account