Hi Mendel --
I've often thoughts about projects like this.
I would leave the original LCD electronics, etc. intact, mount the Raspberry Pi inside the keyboard, and route a USB cable from the RPi to the keyboard's TO HOST USB port. Of course, you'll need a screen/keypad for the RPi, too. If you can find any open space on the keyboard, you could mount the RPi's keypad and screen there.
That would put everything in one package. You could still unplug the USB cable from the TO HOST connector, making it possible to connect to a PC/Mac, not just the RPi.
Getting in the way of the Yamaha hardware runs the risk of getting in the way of the Yamaha software. The Yamaha software may not pass self-test if it thinks the hardware has a fault. Yamaha software goes into zu-zu land when it doesn't pass self-test.
Interesting project! These are just thoughts off the top of my head.
All the best -- pj