@steeph software-wise, that's a built-in feature of LSDJ (tho you do have to select that mode first in the main menu), and LSDJ is just run from a flash cartridge. it uses the gameboy's link port, but you still need to attach an arduino to convert that stuff to actual midi signals, along with a few electronic components:
https://github.com/trash80/Arduinoboy the rest is just drilling holes in the gameboy case to fit the midi ports. (this whole thing can of course also be done externally, but you'd either have to add some normal serial port or attempt to find a link cable and
a link port to connect to the arduino - doing it internally is a tight fit and more work, but it works)
In LSDJ you can then use commands to send midi signals. i think it should also be able to receive signals (software like mGB are specifically made to turn the gameboy into a midi synthesizer, LSDJ not so much)