Menu

PerformanceTuning

dbpalan

One of the most critical measurement of the success of The Pianist Box is its real-time performance. There are tons of information flooding the web for how to config and assess the real-time preformance. Many information are obsolete and incorrect. This page provides the real-time point of view from pianist.

A normal play of Flight Of The Bumble Bee is around 150BPM with 16th notes, or 600 notes per minute, or 100ms per note. If sounds too late during live play, the pianist will lost the beat. "Late" is relative terms to the speed of the notes being played. In this case, a pianist will feel out of sync if the sounds delayed a quarter of the time, or 25ms. He will lost the beat if the sounds delayed near half of the time, or 50ms.

The Pianist Box target to provide latency lower than half of the feel out of sync for 150BPM 16th notes playing, or 12.5ms.

Measurement

A digital piano is connected to The Pianist Box. The Pianist Box connected to an analog speaker. A digital sound recorder is placing within 33cm to both the keyboard of the digital piano and the analog speaker. The pianist hit hardly the keyboard of the digital piano so that the hit sound can be recorded. The Pianist Box received the keypress of the digital piano, generated sound to the analog speaker and also be recorded. The recorded sound track is loaded at a sound editing software. By analyzing the time difference between keyboard hit sound and analog speaker output sound, latency can be calculated accurately. The error is within 1ms which is due to the sound propagation distance between the keyboard and the sound recorder, or the speaker and the sound recorder.

Tuning

  • Create custom kernel with PREEMPT options configured (i.e. Low Latency)
  • Create custom kernel with 1000Hz options configured
  • Disable high latency power saving state
  • Disable WiFi module while not in use
  • Minimize USB delay
  • Minimize Fluidsynth buffer size and period size