This MIDI thing must have been possible for some time.
A couple of years ago, my daughter's school wanted her to compose a tune using some cloud-based software. We hooked up her laptop to the MIDI USB port on our Yamaha DGX Piano, because it's nicer to use a proper piano keyboard than clicking with a mouse. Whilst this does sort of work, the latency is horrible and website response times are inconsistent. Maybe it would be better on a Fibre connection than home ADSL. But really for anything where accurate timing is important, it's always going to be better to run the software locally than in the cloud.