# Is it possible KSP send OSC messages to TouchOSC?



## Victor Sa (May 9, 2018)

My scenario is as follows:

I control the parameters of a kontakt instrument by the TouchOSC program (knobs, faders, buttons, etc).

What I would like to know is if I is it possible send OSC messages via kontakt script to TouchOSC? Is there a KSP command that sends OSC messages?

Contextualizing with an example:


*touchOSC* spin a knob and select 'Piano 1' in the kontakt interface (via MIDI)
*kontakt* by KSP sends OSC message back to touchOSC: /1/lblInstSelected/text "Piano1"
With the above message the TouchOSC label of my layout can be changed.

Thank you for your help.


----------



## EvilDragon (May 9, 2018)

No. KSP can send only MIDI.


----------



## Victor Sa (May 9, 2018)

Thanks for reply @EvilDragon. So, I have to use a middleware to translate the MIDI message from kontakt to OSC pattern.


----------



## Victor Sa (May 9, 2018)

By curious, which KSP command sends the MIDI message? Tks


----------



## EvilDragon (May 9, 2018)

play_note(), set_controller(), set_rpn(), set_nrpn(). And of course you need to have the option to send MIDI to outside world in Kontakt's options enabled for script notes/CCs.

I didn't test if (N)RPNs get sent out, but I think they are.


----------



## Victor Sa (May 9, 2018)

This in on Engine Tab > Send MIDI to outside world options (in kontakt's manual).

▪ *GUI keyboard*: MIDI events that are generated when you click on KONTAKT’s virtual OnScreen Keyboard. 
▪ *script generated CC’s*: MIDI controller events that originate from running Scripts. 
▪ *script generated notes*: Note-on and note-off events that originate from running Scripts. 
▪ *incoming CC’s*: This will mirror incoming MIDI controller events at the MIDI output. 
▪ *incoming notes*: Mirrors incoming MIDI note events at the MIDI output.

In this case, for me, I presume that is '*incoming CC’s*' option.


----------



## EvilDragon (May 9, 2018)

No, you need to have only "script generated CCs" enabled. You don't need to duplicate the incoming CCs or notes I would assume, you'd possibly create a feedback loop then, which is not nice.


----------



## Victor Sa (May 9, 2018)

As you've seen, I'm starting on KSP so sometimes my mind blews!


----------



## Claud9 (Jun 16, 2018)

Victor Sa said:


> As you've seen, I'm starting on KSP so sometimes my mind blews!


Hi Victor I have the same problem, have you find a solution? Can you give me some advise? Thanks a lot!


----------



## Victor Sa (Jun 16, 2018)

As @EvilDragon answered kontakt sends MIDI messages only. The solution is using a middleware (like osculator for Mac) to intermediate and map/translate MIDI messages to OSC. But for Windows, I didn't found a usefull tool implemented yet.

Until now, that's it @Claud9.


----------



## EvilDragon (Jun 16, 2018)

https://www.cockos.com/oscii-bot/


----------

