Created
February 5, 2015 15:56
-
-
Save polamjag/06ddb219fcd4ed48a7c7 to your computer and use it in GitHub Desktop.
Launch Control XL test
This file contains hidden or 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 'unimidi' | |
| dev = UniMIDI::Output.gets.open | |
| def itocol(num) | |
| n = (16 * (num / 4 % 4)) + (num % 4) + 12 | |
| p n | |
| n | |
| end | |
| (0..23).each do |index| | |
| dev.puts(*[240, 0, 32, 41, 2, 17, 120, 8, index, itocol(index), 247]) | |
| sleep 0.1 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment