Skip to content

Instantly share code, notes, and snippets.

@yaxu
Last active January 16, 2018 08:48
Show Gist options
  • Save yaxu/2822ea149c202d9dd0ceb2ae5bfe2f2b to your computer and use it in GitHub Desktop.
Save yaxu/2822ea149c202d9dd0ceb2ae5bfe2f2b to your computer and use it in GitHub Desktop.
Midi interface
// 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"
@jarmitage
Copy link

@telephon in terms of mappings for CCs, something like this? http://nickfever.com/music/midi-cc-list

@telephon
Copy link

ok, good. Next is a list of parameter names we want to use in tidal. Should we prefix by 'midi' or is that too wordy?

e.g.

midichan
midion
midioff
midicc

etc.

cc could be an exception, because it is clear

@telephon
Copy link

you wouldn't name devices, but just link names and default parameters to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment