There's already a cable that exists to link the second controller port with a parallel port for transferring data, it can be used to dump roms with the Sega CD. One approach would be to write a program that runs on the Mega Drive that listens to certain commands sent via that cable (NOTE ON/NOTE OFF, Instrument patches, etc) forwarding them to the YM2612, and a custom PC application to send them with. This does require a computer that still has a parallel port though, which seem to be getting difficult to find.
If you can't get help from someone here, Jeri Ellsworth might help you out if you ask her. Looking at one of her videos, she appears to be very skilled in the areas you're after.
You write a program that you put on a flashcart that will read MIDI input from some hardware (either attached to the cart, the MCD connector or controller ports) and makes the YM sing. Such a thing exists already, google for Little Scale MIDI interface.
Ooh that's interesting. / Ideally, what I really want is to turn a Genesis into a full-blown synthesizer, with physical knobs and everything. There exists a Game Boy Synthesizer ROM called Rez. Is such a thing not possible on a Genesis? I haven't found a similar ROM like it. I figured if you could get a ROM like that going, you could make whatever physical knob setup you wanted and send the commands through the genesis controller ports or something.
Your physical knobs and stuff would sit on your favorite MIDI controller (or a keyboard with MIDI out and decent input capabilities). MIDI out is fed to the M, and the software on MD will make YM sing. Making some kind of actual synth should bypass the MD directly and go for the YM alone : http://gendev.spritesmind.net/forum/viewtopic.php?t=1470
MIDI is just a standard that used between devices to make each other do sound. The CPU listening the MIDI data will have to format what is wanted to whatever your output device needs to do sound. Look up General MIDI spec.