Set up a pin status HIGH with a midi note coming from PC

Hi there. I'm a beginner and i made a midi controller on USB with Arduino Mega you can see here: Vmix audio and video controller over USB - YouTube

Now I'd like to improve that project adding retroilluminated led buttons. I can do that adding one more Arduino Mega to switch on the leds below the buttons. The problem is that the PC sends some midi notes and I need a sketch who switch on a led when it receives a note value via midi on USB. I use LoopBe1 and hairless midi-serial for the bridge. In other words all I need is a sketch who gives a status HIGH to a pin when a midi note value is received (for example 50) and a status LOW when a different note is sent from the PC (switching on another led through another pin) and so on...

Can you help me? Is there any tutorial about that?
Thank you in advance.

You have to inspect every command, sent from the PC, and switch the outputs accordingly.

This project fires a solenoid when a certain note is received. Much the same as an LED.

http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html\

DrDiettrich:
You have to inspect every command, sent from the PC, and switch the outputs accordingly.

PC sends just midi note I set

spino50:
PC sends just midi note I set

That doesn't matter, you still have to do this.

Grumpy_Mike:
This project fires a solenoid when a certain note is received. Much the same as an LED.

http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html\

Thank you for your answer but I need something much more simple. In the code you indicated there are instructions to work just with some notes and there are other instructions about the "strobe" I don't need it.
All I'd like is something like: if I receved note 46 (for example) pin 2 (for example) status HIGH and when the note is no more played, pin 2 status LOW. At this point I repeat the instructions for all the pins and I have what I need.

but I need something much more simple

Then get my book.

Thank you to everyone. I solved with this: Arduino receives MIDI data from a DAW over USB - YouTube