# Integrating Kontakt with Roli Seaboard 49



## Jeshua (Oct 13, 2016)

Hello!

While working on a sound design project, we needed something with a large amount of input for touch and invested in a Roli Seaboard. It has been pretty great so far, but when integrating with Kontakt we only have +/- 12 semitones of pitchbend to work with that tracks on the keyboard.

My question is, is there any scripting that could be done to get PB data to go to +/- 24 semitones? This would allow us to edit our fx across the whole keyboard range.

Adding two Pitch Bend modulators set to +12 does provide a large pitch bend window, however this is still within a 1 octave movement of the ROLI keyboard range, instead of your finger traveling two octaves.

Cheers!


----------



## EvilDragon (Oct 13, 2016)

You could try this, but you're losing the benefit of smoothing the modulator using LAG (which is quite important for pitch bend):


```
on note
   change_tune($EVENT_ID,%CC[$VCC_PITCH_BEND] * 293,0)
end on

on controller
   if ($CC_NUM = $VCC_PITCH_BEND)
     message(%CC[$VCC_PITCH_BEND])
     change_tune($ALL_EVENTS,%CC[$VCC_PITCH_BEND] * 293,0)
   end if
end on
```


----------



## Jeshua (Oct 13, 2016)

Thank you so much! I will give this a try when I am back in the studio with the ROLI and let you know how it goes.

In the meantime I am studying a fantastic post by Big Bob on creating a lag filter for parameter data in KSP here: http://vi-control.net/community/threads/scripting-lag-filters.46766/

While a lot of it is over my head, I am going to attempt to hook up some of this math to smooth out the pitch bend data if needed.


----------



## neblix (Oct 13, 2016)

You can also use ENGINE_PAR_TUNE on the groups if you think that would save anything (all relevant groups vs. all relevant events). We use that in Super Audio Cart, if you chose our TUNE [Ext.] destination in the mod matrix. IIRC we support up to 3 octaves.






It sounds pretty good, and we didn't use any lag whatsoever. Obviously because it's on old game console waveforms it might be different than on something more modern/hybrid. But it's a start.


----------



## polypx (Oct 14, 2016)

Mario, do you know if there is a way to recognize the MIDI channel a CC arrives on in an Instrument script?
(EVENT_ID doesn't work for controllers)
cheers,
Dan


----------



## EvilDragon (Oct 14, 2016)

Don't think there is, unfortunately. :/


----------



## neblix (Oct 14, 2016)

polypx said:


> Mario, do you know if there is a way to recognize the MIDI channel a CC arrives on in an Instrument script?
> (EVENT_ID doesn't work for controllers)
> cheers,
> Dan



It's unfortunately impossible. We ran into this issue when allowing multi MIDI channel support in Super Audio Cart. The sad thing is, while Kontakt supports omni for a patch (and therefore receives data from all channels), it doesn't actually let scripters have a lot of power to properly support it. Note events, for example, work fine, but the KEY_DOWN[] array isn't detectable per channel, and neither is CC[]. You can at least code around the KEY_DOWN[] thing because events tell you their channels, but with CC's you absolutely cannot.


----------



## polypx (Oct 14, 2016)

Right. Well that might be one step towards MPE support in Kontakt, simply allowing EVENT_ID to work in the controller callback, then we could script some kind of support. Although better perhaps would be a simple "MPE enable" setup, like EXS24.

C'mon NI...


----------



## olmerk (Aug 10, 2021)

Not to create another post. I want both: at some condition to relay physical pitch-wheel to my patch and at another condition discard it and use change_tune on voice level. Will ignore_controller work for overriding? So far it seems for me that ignore_controller is not applicable as in the case of CC, for example.


----------



## EvilDragon (Aug 12, 2021)

ignore_controller() will work for blocking the pitch bend events, you just need to do it after querying if $CC_NUM = $VCC_PITCH_BEND.

Also, it's possible to query the MIDI channel of CCs (it's just not documented), by querying against $MIDI_CHANNEL in controller callback. This was possible since at least Kontakt 4, when it was used in NI's Vintage Organs library.


----------

