MIDI Control & Global Map

Although I’m really happy with the iPad and KymaControl when performing live I was seeking for a physical controller to provide some global controls. Therefore I purchased an AKAI MidiMix and hooked it up with Kyma today. I haven’t used any MIDI controllers with Kyma before so I wanted to share my experience with you.


First I checked what kind of MIDI messages the MidiMix sends. To see all incoming MIDI messages go to DSP -> Configure MIDI… -> Show MIDI Messages. I realized that the buttons are not sending CCs but Note messages so I downloaded the MidiMix Editor and changed the buttons to CCs 63-86. So far so good, I could use hotValues like !cc63 in my Kyma Sounds and they would react to my controller. But I wanted to map them in a way which makes more sense. Kyma provides a very easy way to accomplish this by using the Global Map. Opening the default.map in the the Kyma 7 Folder reveals that a hotValue like !cc63 is already defined in the Global Map (that was the reason it was working already). If you look at the code it’s pretty simple:

!cc63 is: (`MIDIController63 displayAs: #fader).

First you define the hotValue you want to map, then you put `MIDIController followed by the CC number and finally you select the widget type (#fader, #gate, #toggle, #pot,… and #nothing, which hides the widget). Just copy one of the mapped hotValues and edit it and nearly nothing can go wrong

So I made a copy of the default.map and named it ‘Akai MidiMix.map’ and started to append my code at the end.

As for the MidiMix I decided to use !AkaiF followed by the track number (1-9), !AkaiP followed by the Potentiometer row and track number (for example 12 corresponds to track 1 potentiometer 2) and !AkaiB followed by the Button track and number. Note that the MidiMix uses the ‘Solo’ button on the very right switches the upper row of buttons, so you actually have 3 buttons per track.

Here’s an example for the first one of each:

!AkaiF1 is: (`MIDIController19 displayAs: #fader).

!AkaiP11 is: (`MIDIController16 displayAs: #pot).

!AkaiB11 is: (`MIDIController63 displayAs: #gate).

To use the resulting Global Map you go to File -> Choose Global Map and select the one you want to use. Then you just type for example !AkaiF1 in one of the hotParameters in a Kyma Sound and control it with the fader of track 1 of the MidiMix. Too easy, right?

Now what about the lights of the controller? They don’t work unless they get some kind of MIDI message from the host. Some research on the internet showed that I need to send Note On messages to turn the light on. Using the MIDIOutputEvent prototype in Kyma allows you to do exactly that. The Frequency field defines the note number and the Amplitude field defines the velocity. Finally the Gate parameter acts similar to a triggeredSampleAndHold sampling the current state when true and sending it to the MIDI Out.

Screen Shot 2015-10-16 at 12.46.42

Using the very same button I want to turn on for the Gate updates the state each time I press the button. Using asToggle for the amplitude switches between 1 and 0 (on and off). Nice!

Doing that for all the buttons can be quite timeconsuming so I used a Replicator to do all buttons at once:

Screen Shot 2015-10-16 at 12.50.45

Naming hotValues algorithmically is a very handy thing. The syntax for this is: {‘Name’&Code&moreCode} asHotValue. The ‘&’ means append the result of the code as a string, asHotValue turns the final string into a hotValue. Because of my naming scheme (remember !AkaiB follwed by track and number) and the code I’m using the VoiceNumbers didn’t correspond to the note numbers anymore. That’s why I used an array in the Frequency field.

Now that still wasn’t enough for me I wanted the ‘Rec Arm’ buttons with my looping Sounds which all work like this: 1st Trigger starts recording, 2nd Trigger loops the recording, 3rd Trigger stops. A toggle is obviously not the right thing for this kind of control. It would be nice to have a blinking light when recording, a constant light when playing and no light when stopped. The code below does exactly that (note that I’m doing this only for the RecArm buttons now):

Screen Shot 2015-10-16 at 13.14.48

Using nextIndexMod let’s me step through the array. Don’t get distracted by the code to generate the hotValue, actually the whole thing is very easy. Assuming we get !AkaiB13 as a resulting hotValue it translates to:

((!AkaiB13 nextIndexMod: 3) of: 

#({1 bpm: 120} {!AkaiB13}{!AkaiB13}))

* ((!AkaiB13 nextIndexMod: 3) ne: -1)

The non-equality check for -1 is simply to initially start without blinking lights. Why am I using 120 bpm in the Gate field and 60 bpm in the Amplitude field? because the Amplitude is changing every 0.5 seconds I need to send a Gate every 0.5 seconds. So the Gate has to run at double speed.

Here’s a short video showing it:

Using this method you can create several states for a controller (fast blinking, blinking twice fast then off, etc.) or a Tap button which shows you the resulting bpm with a blinking light.


Download Global Map & Kyma Sounds

3 replies
  1. Domenico Cipriani
    Domenico Cipriani says:

    Unfortunately​ the buttons have all a momentary behaviour. Do you know if there is a way to change their behaviour in the global map? Because it would be more flexible for me to map the controller with the learn function of the VCS.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply