Close circuit on MIDI note

Hello! I am brand new to the forum and I am trying to get the following result, but I have trouble finding a good way to start.

What I've got:

  • Funduino MEGA board & starter pack
  • MIDI - USB Keyboard
  • Mac Mini

What I've tried:

  • Experiment with the MidiUSB library, which seems not to work with the MEGA board (No USB in).
  • Search the web for similar approaches

What I want to archive:

  • Push a button on the MIDI keyboard (connected via USB to the Mac)
  • The Board receives the command (connected via USB to the Mac)
  • If the command matches a certain note, close a circuit (9V)

I would highly appreciate any suggestion/example.
br
Alex