midi-cc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
midi-cc [2024/01/01 18:12] steve.wangmidi-cc [2024/03/18 19:55] (current) steve.wang
Line 1: Line 1:
 ====== Create CC Changes For A Player to Follow ====== ====== Create CC Changes For A Player to Follow ======
-This tutorial will teach you how to use Konduktiva to send MIDI Control Change(CC) messages. +**Overview: ** 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. +**Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https://github.com/renickbell/konduktiva|Konduktiva installation]] instructions and have read through and understood the [[:first_steps|first steps tutorial]]. The tutorial also assumes 2 things. One, Konduktiva has been assigned to the //K// variable. Two, user created a Musical Environment using the //setUpMusicalEnvironment// function using //K.defaultConfigurationObject// as the first argument and //'exampleMidiPlayer'// as the third argument then, assigned the output to the //e// variable. 
- +<code javascript> 
-\\ WARNING\\ This tutorial assumes you have already [[https://github.com/renickbell/konduktiva/blob/main/README.md#installation|installed Konduktiva properly]] and have read the [[http://konduktiva.org/doku.php?id=first_steps|first steps tutorial]]. This tutorial also assumes you have imported Konduktiva into the K variable and the e variable is a default MusicalEnvironment.+const K = require('konduktiva'
 +let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject,4,'exampleMidiPlayer'
 +</code>
  
 The example below is based on Yoshimi. Click [[https://yoshimi.github.io/docs/user-guide/mlearn/mlearn.html|here]] to read more about MIDI CC in Yoshimi. The example below is based on Yoshimi. Click [[https://yoshimi.github.io/docs/user-guide/mlearn/mlearn.html|here]] to read more about MIDI CC in Yoshimi.
 +
 +
 +A player that sends controlChange messages will not send other MIDI messages anymore. After configured, it will only send MIDI control change messages and nothing more.
 +To configure a player to ONLY send MIDI CC messages change the action function and define the controlChangeMap variable in the player.
 +<code javascript>
 +//Changing action function:
 +e.players.exampleMidiPlayer1.action = 'sendMidiCCMessages'
 +</code>
  
 The key to making Konduktiva send control change messages is the //controlChangeMap// variable in the //MusicalEnvironment//. //QuantizedMaps// stored in //controlChangeMap// variable.  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//+Create a controlChange map and add it to //e.controlChangeMaps//. I will call this one //p1//
 <code javascript> <code javascript>
 e.controlChangeMaps.p1 = new K.QuantizedMap(10, e.controlChangeMaps.p1 = new K.QuantizedMap(10,
Line 22: Line 32:
 In Yoshimi, this will change whatever you assign 37 to. In Yoshimi, this will change whatever you assign 37 to.
  
-Next I will ensure the exampleMidiPlayer4 uses it:+  
 +Next I will ensure the exampleMidiPlayer1 uses it:
 <code javascript> <code javascript>
-e.players.exampleMidiPlayer4.controlChangeMap = 'p4'+e.players.exampleMidiPlayer1.controlChangeMap = 'p1'
 </code> </code>
  
Line 30: Line 41:
  
 <code javascript> <code javascript>
-e.play('exampleMidiPlayer4')+e.play('exampleMidiPlayer1')
 </code> </code>
  
 [[http://konduktiva.org/doku.php?id=action-functions|Click here to learn about action functions an important part about how Konduktiva works]] [[http://konduktiva.org/doku.php?id=action-functions|Click here to learn about action functions an important part about how Konduktiva works]]
  • midi-cc.1704161564.txt.gz
  • Last modified: 2024/01/01 18:12
  • by steve.wang