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
#This program polls the keyboard and then maps the code for detected keys to midi note values | |
#which are tranmsitted to the new OSC-API in Sonic Pi | |
#Warning THIS API IS EXTREMEMLY EXPERIMENTAL AND MAY CHANGE (current version 2.11 dev 2d13e) | |
#This script runs in a terminal window. Once the SP script is running, type in the terminal window to send key presses. | |
require 'io/wait' | |
require 'socket' | |
require 'rubygems' | |
require 'osc-ruby' | |
client ||= OSC::Client.new('localhost', 4559) #set up OSC channel to port 4559 |