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 |
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
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
// http://mikemurko.com/general/jquery-keycode-cheatsheet/ | |
var speed = 0.8; //transition speed | |
var transition = "push"; //types of transition: instant, fade, swap, push | |
var nextKeys= [39, 40, 34]; | |
var prevKeys= [37, 38, 33]; | |
$(function(){ |
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
#a Glass Armonica "voice" for Sonic Pi by Robin Newman November 2014 | |
# revised to use rpitch 2018; corrected 2022 for missing tr function | |
#This simulates the Glass Armonica invented by Benjamin Franklin and for which Mozart | |
#composed the piece played here | |
#This version uses rpitch: parameter added to Sonic Pi after the original was written in 2014 | |
##| sample :ambi_glass_rub | |
##| play :fs5 | |
##| puts note(:fs5) | |
##| stop | |
use_debug false |
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
license: mit | |
height: 300 | |
scrolling: no | |
border: no |
NewerOlder