You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Synth Station: three instruments idle use nearly the whole audio budget on an ESP32-P4 #147
On an ESP32-P4-WIFI6 (Pico size, 400 MHz) playing through audio_out, Synth Station with Poly106 on channel 1, Tonewheel3 on 2 and Rhythm808 on 10 takes 87 to 97 % of each block's time before a key is pressed. The speaker runs short now and then with nothing played, and any playing at all starves it. The voice cap can't help: it can only take voices away, and with one voice per instrument plus the drums the load is about 150 %.
Where the time goes, from the pump's status block (render time over a 256-frame block of the mix, 5333 us, or a 128-frame block for one instrument, 2666 us), with nothing sounding:
What plays
Render time
Share of a block
Poly106 alone, panel closed
468 us of 2666
18 %
Tonewheel3 alone, panel closed
762 us of 2666
29 %
Rhythm808 alone, panel closed
360 us of 2666
14 %
The three through the mix, panel closed
3844 us of 5333
72 %
The same, panel open, meters off
4225 us of 5333
79 %
The same, panel open with its meters
4974 us of 5333
93 %
So, beyond the instruments themselves (about 60 % between them), the audiomixer.Mixer that sums them adds about 12 %, and the panel's level meters about 14 %, though they run on the other core: the meters' 100 ms tick reads the pump's tap and redraws two bars and a light. Setting an instrument's voices lower changes nothing while no notes sound, so free voices cost nothing.
Played, the drums alone (kick, hat, snare, hat, a pad every 250 ms) read 120 to 126 %, and one voice of Poly106 or Tonewheel3 costs about 12 to 14 %.
Open: whether the meters can read the tap less often or draw less, whether the mix can be summed more cheaply than through audiomixer, and whether an instrument with no voices sounding can be skipped once its tail has died away. Each would lower the floor the voice cap works from.
Activity