-
Notifications
You must be signed in to change notification settings - Fork 2
Performance
Phil Schatzmann edited this page Sep 13, 2022
·
24 revisions
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!
I was measuring the speed of the different instruments on an different microcontrollers.
Time for 10 sec music at 44100 samples per second
| Instrument | ESP32 | RP2040 | STM32 Backpill | Unit |
| BeeThree | 3.563 | 25.805 | 7.343 | sec |
| BlowHole | 2.117 | 23.245 | 4.706 | sec |
| Bowed | 17.748 | 32.134 | 47.184 | sec |
| Clarinet | 1.588 | 12.922 | 3.296 | sec |
| Drummer | 0.114 | 0.507 | na | sec |
| Flute | 1.969 | 16.884 | 4.462 | sec |
| Rhodey | 4.178 | 32.288 | 8.76 | sec |
| TubeBell | 4.348 | 32.798 | 8.902 | sec |
| Mandolin | 1.102 | 13.205 | 2.489 | sec |
| ModalBar | 0.677 | 17.875 | 1.895 | sec |
| Moog | 1.17 | 14.71 | 3.035 | sec |
| Plucked | 0.235 | 3.783 | 0.608 | sec |
| Saxofony | 1.73 | 21.633 | 3.732 | sec |
| Shakers | 0.111 | 0.424 | 0.347 | sec |
| Sitar | 1.206 | 7.615 | 2.833 | sec |
| StifKarp | 0.683 | 18.049 | 1.983 | sec |
| TubeBell | 4.349 | 32.798 | 8.902 | sec |
| Wurley | 4.154 | 32.01 | 8.683 | sec |
| BlowBotl | 2.782 | 17.962 | 5.915 | sec |
| Brass | 1.637 | 15.38 | 3.617 | sec |
| FMVoices | 9.865 | 45.061 | 18.113 | sec |
| PercFlut | 11.777 | 47.937 | 21.327 | sec |
| HevyMetl | 11.351 | 46.699 | 20.48 | sec |
| Recorder | 53.974 | 119.6 | 84.332 | sec |
| Resonate | 0.972 | 5.681 | 1.885 | sec |
| Simple | 2 | 12.641 | 4.573 | sec |
| Whistle | 37.664 | 85.35 | 82.983 | sec |
Many instruments can be used on the ESP32, put we are limited in the number of polyphonic voices. The RP2040 is too slow for the selected sample rate!
I was disappointed from the performance of the STM32 Blackpill which boasts of having a floating point unit!
The Instrument Performance Sketch can be found on github.