Hi agian,
Hmm, I was hoping you would have access to the power of the keyboard, just using 2 wires, that carry 0.5ma when connected, is tricky.
A 'PIC' would need power. You can get some low power versions, but they generally rely on 'sleep mode', where nothing much can be done, and is used when the PIC really has nothing to do except use up vital power. I don't understand why you are so eager to use them, they would use more current than a simple transistor circuit, take up space, possibly require an external osc and other external components... and the code would probably consist of 4 lines. (if -then- else type affair).
I honestly can't see a way of using the PIC's without an external power source, and even then what would it do? Someone mentioned 'over-kill', like using a PC to make an led flash.
All we need to do is 'connect' two wires. Without a 'GND' it seems we can't just connect the GND's of the circuits (medal adapter box and keyboard) and control the 'sustain' signal with logic. Now, when you connect your multimeter to each of the leads/wires, is there a voltage across them? Thats a sure way to test the direction of current flow, so we can use standard transistors (after all, they're polarity sensitive). However, any circuit thats connected to these '2 wires' would draw some current, therefore, current would flow, and so....if enough current flows (0.5mA?) the keyboard will interperet this as 'pedal off'. One other thing...if the wires carry 0.5ma (again, I'm assuming) when they are shorted, then this is the maximum current that can flow, we can't draw any more.
I'm still going with a reed relay, or an FET (very high impedence when turned off) both would provide 'some' form of isolation, however, I think both would require an external power source (albeit, a few mA, but not quite 0.5ma :/ ).
Sorry for rambling, but its one of those problems that seems simple, but is actually really difficult, unless I'm over complicating things, which happens all too often.
Blueteeth.