Last active
April 9, 2016 06:46
-
-
Save Enkerli/75de6cd3762a7e14c9a67c5922034870 to your computer and use it in GitHub Desktop.
Quick Sonic Pi script using MIDI in from a WX11 wind controller to control amplitude. Based on Robin Newman’s blogpost: https://rbnrpi.wordpress.com/2016/04/01/a-completely-different-way-to-use-sonic-pi-with-a-midi-controller/
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
require 'drb/drb' | |
DRB_URI="drbunix:/var/tmp/sonic-pi-midiconnector" | |
@midi = DRbObject.new_with_uri(DRB_URI) | |
use_bpm 240 | |
use_synth :dtri | |
note_node=play 60, release: 100, attack: 1 | |
live_loop :ctl do | |
control note_node, amp: @midi.k2/127.0 | |
sleep 0.19 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment