Skip to content

Instantly share code, notes, and snippets.

@polamjag
Created February 5, 2015 15:56
Show Gist options
  • Select an option

  • Save polamjag/06ddb219fcd4ed48a7c7 to your computer and use it in GitHub Desktop.

Select an option

Save polamjag/06ddb219fcd4ed48a7c7 to your computer and use it in GitHub Desktop.
Launch Control XL test
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