Closed hugbug closed 6 years ago
When app is connected to piano via WiFi the song is uploaded to piano not via MIDI-messages. Instead the song content is sent via TCP to a separate port (port number 10504).
0000 01 00 00 06 00 00 00 01 00 00 01 bc 00 00 00 01 ................
0010 00 00 00 00 00 00 00 16 45 58 54 45 52 4e 41 4c ........EXTERNAL
0020 3a 2f 41 70 70 53 6f 6e 67 2e 6d 69 64 00 00 00 :/AppSong.mid...
0030 01 96 4d 54 68 64 00 00 00 06 00 01 00 04 01 e0 ..MThd..........
<MIDI-FILE CONTENT CONTINUES>
0000 01 00 00 06 00 00 00 01 00 00 04 80 00 00 00 01 ................
0010 00 00 00 00 00 00 00 16 45 58 54 45 52 4e 41 4c ........EXTERNAL
0020 3a 2f 41 70 70 53 6f 6e 67 2e 6d 69 64 00 00 00 :/AppSong.mid...
0030 04 5a 4d 54 68 64 00 00 00 06 00 00 00 01 07 80 .ZMThd..........
<MIDI-FILE CONTENT CONTINUES>
0000 01 00 00 06 00 00 00 01 MM MM MM MM 00 00 00 01 ................
0010 00 00 00 00 00 00 00 16 45 58 54 45 52 4e 41 4c ........EXTERNAL
0020 3a 2f 41 70 70 53 6f 6e 67 2e 6d 69 64 00 NN NN :/AppSong.mid...
0030 NN NN ..
<MIDI-FILE CONTENT>
Currently we don't know how the song is uploaded when an iOS device is connected via lightning cable. It's also not clear if the similar possibility can be used when a PC is connected to USB-to-host port of the piano.
Any info on this matter is much appreciated.
Anyway our app can upload songs via WiFi even if MIDI-ports are connected via USB cable. That may be a little inconvenient but not a deal breaker.
Our app must emulate Smart Pianist app.
We have investigated how Smart Pianist communicates with digital piano and this issue documents the protocol.
Yamaha CSP protocol
Smart Pianist sends commands to CSP via MIDI-port. MIDI-messages of type System Exclusive is used for that purpose. Messages of this kind allow hardware manufacturers to implement custom commands not described in official MIDI documentation.
CSP responds also with MIDI-messages, which Smart Pianist analyses to keep track of CSP current state.
Lines starting with
<-
represent response messages sent by piano to app.Playback Control
Guide
Position
Volume
Tempo
Transpose
Parts
Response contains info about switched on/off channels (a message for each channel):
Stream lights
Guide Type
Quick Start
MIDI Part Channel
Balance:
Position Info During Playback