This is an example on how to use the gem micromidi to control your computer. The idea is to help you in your workflow as a developer and give you idea on how to use a MIDI keyboard to improve your workflow.
Tested with Ruby 2.2, should work with Ruby 2+.
bundle install
bundle exec ruby ./main.rb
In debug mode, commands won't be executed put it can be useful to check which notes/commands are played and what will be executed:
RUBY_ENV=debug bundle exec ruby ./main.rb
main.rbcontains the loop used to catch MIDI events.keyboard.rbcontains the code to handle the mapping between notes and commands.orders.rbcontains the commands you can execute. Feel free to map new things and be creative here.
https://speakerdeck.com/damln/re-think-your-workflow-with-a-piano