Close

Performance: the best you can get?

A project log for eXaDrums

Electronic drums for Linux

JeremyJeremy 02/24/2018 at 13:510 Comments

As I develop eXaDrums, I sometimes wonder how to improve performance without impacting reliability. In my opinion, software robustness always comes first, even at the expense of performance.

Last time I measured the latency, I got about 8 ms. That's not too bad, as I was aiming for less than 10 ms.

More recently I've measured latency again, but this time with a Raspberry Pi 3B and an audio DAC instead of my good old USB soundcard. I chose a JustBoom DAC, as shown on the picture:

All I had to do was to plug it in the GPIO, and it worked straight out of the box. The good thing about the JustBoom is that it doesn't need the Spi pins, and you can stack another board on top of it. So I stacked my ADC, and that was it, eXaDrums was working as before.

As for the configuration, I still use a trigger scan time of 2 ms, and the audio buffer was set to 1 ms.

And just like that, without any software modification, I reduced the latency by almost 3 ms, and went down to 5 to 6 ms of latency:

Yellow curve: trigger's voltage, blue curve: output of the DAC.

So here we are, the latency is lower than 7 ms (that's what is usually considered as usable in a professional environment), and the sound quality is really great. Can we beat that? We'll see...

FYI, previous tests on a Raspberry Pi 2B are here: https://hackaday.io/project/7499-raspidrums/log/25077-latency-goes-below-10ms and more recently https://hackaday.io/project/9350-exadrums/log/58025-performance-the-best-you-can-get.

Discussions