Last active
January 16, 2018 08:48
-
-
Save yaxu/2822ea149c202d9dd0ceb2ae5bfe2f2b to your computer and use it in GitHub Desktop.
Midi interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in sc.. | |
MIDIClient.init; | |
~midiOut = MIDIOut.newByName("X18/XR18", "X18/XR18 MIDI 1"); | |
// prototype: addMIDI { |name, device, channel=0| ... } | |
addMIDI("vbass", midiOut, 1) | |
// in tidal | |
d1 $ n "c a f4 e" # s "vbass" | |
// since channel is only default send something to tenth channel on same device as the vbass like this: | |
d1 $ n "40" # s "vbass" # channel 9 | |
// these could all do the same, i.e. set pan (which is general midi control 10): | |
d1 $ cc "10:60 10:122" # s "vbass" | |
d1 $ ccv "63 127" # cc "10" # s "vbass" | |
d1 $ pan "0.5 1" # s "vbass" | |
// could also be paired with 'n' to both set the control change and set the note | |
d1 $ cc "10:60 10:122" # n "c7 a7*2" # s "vbass" | |
// The mapping from the 'pan' parameter to cc 10 would be best in superdirt I think, because tidal wouldn't necessarily know that 'vbass' was a midi synth. | |
// Starting midi clock could be as simple as this, the logic for this could be done in tidal: | |
d10 $ midiclock "vbass" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you wouldn't name devices, but just link names and default parameters to them.