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
#experimental program to try out midi in with Sonic-Pi 2.12.0-midi-alpha3 by Robin Newman March 2017 | |
#An Oxygen8 v2 keyboards is connected to my Mac. | |
#This sends midi signals to the m2o module of osmid which translates the midi to OSC and | |
#feeds the signals to the osc_cues_port in Sonic Pi | |
#the midi messages can therefore be detected by judicious use of the sync command | |
#look at the osmid_m2o and osc_cues logs to figure out the message(s) to intercept | |
#further useful info in osmid readme files at The osmid distribution is at https://github.com/llloret/osmid | |
#in my case the keyboard was connected to port 2, and I used the first midi channel (0) | |
set_sched_ahead_time! 0.1 #reduced this to reduce latency |