Skip to content

Performance

Phil Schatzmann edited this page Sep 14, 2022 · 24 revisions

Overview

It is critical that you can generate all the needed samples within the indicated sample rate! The speed is also driving the polyphonic performance of the instrument. If it takes longer to generate all samples then to play them, the instrument can not be used for life playing!

Measurements

I was measuring the speed of the different instruments on an different microcontrollers.

Time to generate 10 sec music at 44100 samples per second

Instrument ESP32 ESP32-C3 RP2040 STM32 Backpill Unit
BeeThree 3.563 21.879 25.805 7.343 sec
BlowHole 2.117 21.535 23.245 4.706 sec
Bowed 17.748 58.744 32.134 47.184 sec
Clarinet 1.588 12.136 12.922 3.296 sec
Drummer 0.114 0.344 0.507 na sec
Flute 1.969 16.677 16.884 4.462 sec
Rhodey 4.178 25.778 32.288 8.76 sec
TubeBell 4.348 26.771 32.798 8.902 sec
Mandolin 1.102 12.492 13.205 2.489 sec
ModalBar 0.677 15.697 17.875 1.895 sec
Moog 1.17 14.303 14.71 3.035 sec
Plucked 0.235 3.866 3.783 0.608 sec
Saxofony 1.73 14.23 21.633 3.732 sec
Shakers 0.111 0.376 0.424 0.347 sec
Sitar 1.206 7.002 7.615 2.833 sec
StifKarp 0.683 18.802 18.049 1.983 sec
TubeBell 4.349 26.77 32.798 8.902 sec
Wurley 4.154 25.657 32.01 8.683 sec
BlowBotl 2.782 17.511 17.962 5.915 sec
Brass 1.637 14.625 15.38 3.617 sec
FMVoices 9.865 39.772 45.061 18.113 sec
PercFlut 11.777 42.242 47.937 21.327 sec
HevyMetl 11.351 41.42 46.699 20.48 sec
Recorder 53.974 125.949 119.6 84.332 sec
Resonate 0.972 5.753 5.681 1.885 sec
Simple 2 12.211 12.641 4.573 sec
Whistle 37.664 96.064 85.35 82.983 sec

Conclusions

Many instruments can be used on the ESP32, put we are limited in the number of polyphonic voices.

The ESP32-C3 RISC Processor and the RP2040 are too slow for the selected sample rate! Reducing it down to 16000 should however enable most instruments.

I was disappointed with the performance of the STM32 Blackpill which boasts of having a floating point unit!

The library is compiling on an ESP8266 - however it is too slow and there is not enough memory for most instruments!

Arduino Sketch

The Instrument Performance Sketch can be found on github.

Clone this wiki locally