This is an old revision of the document!
Using Konduktiva With MIDI CC
This tutorial will teach you how to use Konduktiva to send MIDI Control Change(CC) messages. Ensure you have 4 sessions of a music synthesizer that supports MIDI control change messages. Yoshimi recommend for Linux and Surge is recommended for MacOS.
WARNING:
This tutorial assumes you have already installed Konduktiva properly and have read the first steps tutorial. This tutorial also assumes you have imported Konduktiva into the K variable and the e variable is a default MusicalEnvironment.
The example below is based on Yoshimi. Click here to read more about MIDI CC in Yoshimi.
The key to making Konduktiva send control change messages is the controlChangeMap variable in the MusicalEnvironment. QuantizedMaps stored in controlChangeMap variable.
First create a controlChange map and add it to e.controlChangeMaps. I will call this one p4
e.controlChangeMaps.p1 = new K.QuantizedMap(10, [0, 2, 4, 6, 8], [{ controller: 37, value: 80, channel: 0 }, { controller: 37, value: 120, channel: 0 }, { controller: 37, value: 60, channel: 0 }, { controller: 37, value: 70, channel: 0 }, { controller: 37, value: 100, channel: 0} ])
Next I will ensure the exampleMidiPlayer4 uses it:
e.players.exampleMidiPlayer4.controlChangeMap = 'p4'
Now I can play it and if your music synthesizer accepts MIDI CC, if the specific controller and value is configured to change something in your music synthesizer, and if the channel is correct, you might here or see a change in the music synthesizer session.
e.play('exampleMidiPlayer4')
Click here to learn about action functions an important part about how Konduktiva works