What is the best way to map multiple duplicate controllers in the same mapping on different channels?

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi,

I'm putting together a Allen & Heath Xone:K2 mapping using Javascript. I have a basic mapping with full LED feedback operating and control over the MainTrackBank but looking for advice on handling multiples of the same controller.

My goal is to have the mapping cover 4 separate controllers, however, not all 4 will be plugged in all the time. Either 2 or 4 K2's will be used at a time.

I want the first two controllers to control the drum rack alone, and the next 2 controllers to control the mixer section of the remaining tracks.

If only 2 controllers are being used, it should only control the main mixer.

Currently, I'm just hard coding the channel the K2 is running on and when filtering out the midi notes allocating the channel number to the correct K2. Is there a better way to handle this? eg.

This isn't my code, but it's similar in nature.

Code: Select all

class Control {
  constructor(public note, public channel) {}
}
const control = new Control(42, 6);

onMidi(status, note, velocity) {
  if (isNoteOn(status)) {
    const channel = getChannel(status);
    if (note === control.note && channel === control.channel) {
      // do stuff
    }
  }
}
It would also be really cool if I can just make the mapping for 2 controllers, and have a shift layer between either the drum rack or the mixer. If you could offer any advice on how I can allocate specific channels to the mapping that operate independently of each other.

My code isn't currently published to Github as it's horrendous and needs a good refactor and a typescript upgrade, but if you need to see it I can make it happen.

Thanks for any assistance!

Post

You can setup either two separate extensions or scripts .

Or you can increase the number of in and outs in your definition and add them there.
And then setup a different on midi event for each controller
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post

Thanks for your advice Kirkwood West, I was able to aggregate 2 pairs of K2's, I think because they were all named XoneK2 either they merged together or I missed that there was multiple available, but this is perfect for what I want!

Cheers,

Post Reply

Return to “Controller Scripting”