Piano Master Classes via the Internet
This paper demonstrates the long-distance reproduction of professional-level piano performance by transmission of multiple UDP packets containing MIDI data over the Internet. Our project was developed with the express intent of enabling remote instruction of piano Master Classes where highly accurate and subtle musical gestures must be reproduced. With MIDI grand pianos on both ends of a connection, the sound quality of our system exceeds other means of performance reproduction. Regardless of the fidelity of compressed audio streaming, no arrangement of microphones and speakers can reproduce the acoustics of a grand piano as accurately as hammers striking the strings of a real, physical instrument.
The Internet standard TCP/IP protocol is designed to minimize data transmission errors and functions poorly in time-sensitive applications. There are three problems with the TCP protocol from a musical standpoint. To guarantee delivery of all data, TCP retransmits lost packets, causing music to stop while dropped notes are re-sent. TCP ensures that packets arrive in the same order they were sent, causing notes to back up waiting for the arrival of differently routed notes. Finally, TCP includes extra overhead to perform these error corrections.
To avoid these problems, we chose UDP datagrams for packet transmission. UDP has nominal overhead but it does not compensate for dropped and out-of-order packets. We solve this by, first, sending multiple copies of each packet, statistically ensuring that at least one copy of each packet arrives at the recipient. MIDI packets are very small, so even hundreds of copies use minimal bandwidth. Second, by adding time-stamps to each packet, we guarantee that they play back with precise rhythm, regardless of their order of arrival. These time-stamps also easily identify which duplicate packets can be discarded. Finally, to allow for inevitable network slow-downs, we incorporate an adjustable buffer of a few seconds. The number of duplicates and buffer length can automatically self-calibrate to optimize for changing network conditions.
Testing Internet UDP performance within the U.S. reveals the following:
Route Latency Drops In-State: ~50 miles Min: ~10 ms Max: ~220 ms Avg: ~25 ms ~1% National: ~2500 miles Min: ~270 ms Max: ~2600 ms Avg: ~350 ms ~4%
Using these measurements as a guideline, we can calculate the appropriate parameters for transmitting, for example, Liszt's Piano Sonata in B Minor, which is a 25-minute piece containing approximately 25,000 MIDI events. Achieving a 1/5000 probability of a dropped event, or one every five minutes, requires 50 duplicates for the in-state connection, and 200 duplicates for the national connection. Thus, the average bandwidth used is 32.5 Kbps for the in-state connection and 130 Kbps for the national connection. A buffer equal to the maximum latency guarantees an uninterrupted performance, even during periods of peak musical density.