Using scripts to control other instruments

Okay, I'm a total newbie to kontakt scripting (though I have decades of general programming experience). I've read the ksp scripting manual (okay, I skimmed some parts), but I couldn't figure this out.
Is it possible for a script (either a script in an instrument, or a multi script) to affect events (not just midi events, but volume, pan, effects, etc) in multiple instruments in a midi? Say, e.g., to program a slider that crossfades two sounds from two different instruments together, based on slider position?
Or is each instrument's scripts limited to its own instrument, and multis just limited to pure midi manipulation?
There are tons of kontakt instruments that do something similar (e.g., Fables, Lores) with their own on-board sounds, but I already have a zillion string, brass, etc, libraries, and I'd like to script my own ad hoc instrument mixes and mashes. Is this even possible?
Thanks for help with my dumb newbie question. 🙂
Comments
-
Sorry, I didn't mean "multiple instruments in a midi" -- I meant "multiple instruments in a multi."
0 -
Yeah a multiscript will do this for you. If your instruments are on different channels, you can make e.g. a volume message on one channel trigger an inverse volume message on another. Or use a third channel to trigger both.
Bit more tricky if you want to use the same volume controls on those instruments to give them individual expression, but with a bit of simple maths it wouldn't be any problem for an experienced programmer.
0 -
I've just sussed out how to do that with an xy controller. Since its values in each dimension range from 0 to 1, I simply multiply each voice's starting volume value to either the x value or 1 - the x value (to move between left & right voices), and ditto for y values for upper and lower voices). So users, mousing around on the xy pad, should be able to dynamically move between 4 voices.
I also put together an automatic mode, where the position moves in a circle or ellipse (shaped by user input). Right now it's hardwired for one circuit per 4 bars, but I'll add gui control to that later. The trig functions actually make this pretty easy.
I'm now at the point of needing to build a ui. I have zero graphics talent, but fortunately I have a buddy skilled at that. Next weekend I hope to finish the coding and start testing. It's looking pretty simple.
Here's the code in its current state. Completely untested, and no gui layout at all, but the logic seems sound to me. I'd love any feedback.
I'm planning on open sourcing this project when it's done, so feel free to share, steal, whatever.
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 786 Tech Talks
- 4.1K Native Access
- 16.6K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 380 Battery 4
- 847 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators