K2 Xone buttons NoteOn NoteOff Mapping to Ableton

With K2 Latching Layers off
Difficulty having K2 illuminate LED on K2
have tried the

ga=ga^1
pp=0
if ga==1 then pp=127

provided in the Bome video
however the K2s use momentary NoteOn NoteOff
instead I need to transform this into a toggle of the Ableton parameters.
I am imagining that it is possible to set the output to colour any one of the tri colours.

Any suggestions here would be of great assistance.
thankyou

Hi and welcome to the Bome community!

Yes, unlike most controllers which send the color by velocity, the Xone K2 sends different colors by manipulating the note number. I attached an example.

In translator 0.2 I set the Xone Global Channel using rules. In my case I’m on MIDI CH 15. Since MIDI channels start with 0 for MIDI channel 1 I set the value of ga to 14 which is MIDI CH 15. You might need to change this if you have set your K2 to a different MIDI channel.

Preset 1 handles the color manipulation

1.0 is looking for Button ‘M’ push. We then increment the value of gb so that we cycle from red, yellow, green then off.

We then trigger translator 1.1 and send 2 parameters

  • Note Number
  • Color value

In translator 1.1 we manipulate the outgoing note number by using the color value to get the right note number to send.
If the color value is 0 we send the red value. If color value is 1 we send yellow value. If color value is 2 we send green value. And if color value is 3 we turn the note off.

Here are the rules.

// first paramter is note number
// second paramter is velocity
// Color values are 36 notes apart
rr=qq*36
// change the color value by note number
tt=pp+rr
// set the velocity
qq=127
// Turn off if color value is 3
if gb==3 then qq=0
// note number for off is pp
if gb==3 then tt=pp

if gb==0 then Log "Log Note %pp% is red"
if gb==1 then Log "Log Note %pp% is yellow"
if gb==2 then Log "Log Note %pp% is green"
if gb==3 then Log "Log Note %pp% is off"

Since I’m manipulating the value of gb for this note number, other note numbers will need their own global variables if you want to cycle through colors this way.

Very strange the way Allen & Health implemented their controller.

Using the new perform action of MIDI translator, it would likely be easier having an application sending note color messages by velocity based on the base note number and color value.

Xone-LED-Demo.bmtp (2.6 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

The below is a modification to the original that I did.

In this version you can connect to Ableton Live and it is set to:

  1. Toggle all buttons on each push.
  2. On receiving feedback from Ableton with the same note number as sent, a velocity value of 0 will be off, 1 will be red, 2 will be yellow, 3 will be green. Anything larger than 3 will be red.

I use the global variables gb and gc to define a bit map of on/off states (not color states). The global variable gb handles the 32 buttons and LEDs above the bottom row as a single 32 bit integer bitmap. The global variable gc handles the bottom 2 buttons and LEDs.

As before, the global variable ga handles the desired MIDI channel.

My aliases are set up as follows.

image

You can learn more about aliases from this tutorial.

In Ableton Live, you will need to use BMT 1 to interact with your K2.

Preset 0 handles housekeeping. Preset 1 handles messages from K2 to the application. Preset 2 is for LED feedback from the application.

Device selection is at the preset level.

For more information about device selection, seethis tutorial.

Since the K2 is a strange beast, the rules are somewhat complex to do all of this. I also found a bug on the K2 with turning off the bottom left LED and put in a workaround to fix it.

Xone-K2-DAW-Note-Feedback.bmtp (5.4 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thank you for sending these examples.

I have looked at them. However, they seem to be a little more complex than what I am after presently.

I think possibly I did not explain myself clearly enough.

Presently I am using 4 Xone K2 controllers with latching layers turned on to control parameters inside Ableton. Functionally they work great, and I am very happy.

I have purchased Bome Midi Translator to control layout selection on an EUC4 and a Launchpad proMK2 via Sysex from the K2s. These are also working great.

I am taking things a step further by considering disconnecting latching layers and customising the K2 layouts using Bome Midi Translator.

At the moment I am looking for a simple example of the translators and method necessary to effectively control an individual buttons colour . Switching on and off with bidirectional activation state being updated in both the software and hardware.

I realise this will probably require me to manually insert Channel, Note and Velocity numbers for each outgoing Midi message in order to use the desired colour on each respective button.

If you could provide an example of how Bome accomplishes this for an individual button , it would be very helpful.

Thankyou

The first example that I posted shows how you can control a single LED light. Yes, you need to set the project file to match MIDI channel of the K2 your are using without latching layers.

This is set in the rules of translator 0.2 and is set to 14 (MIDI CH 15). Once you change it you need to save and restart the project for it to take effect.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz