Repository navigation
audioeffects: AUDIOEFFECTS freezes only the effects you name - #355
Conversation
Like AUDIOINSTRUMENTS. The manifest hands the comma list to selection.py, which follows the named effects' imports (a rack brings the effects it builds on) and writes an __init__ whose class table, __all__ and ALL list only them. An unknown name stops the build and lists the effects. An audioeffects that imports every effect when it loads can't be frozen in part, so the build stops there too rather than freeze a package that fails to import on the board. Unset or empty freezes the whole package.
Both packages' helpers are named selection.py; a plain import found whichever manifest ran first.
AUDIOEFFECTS, what it freezes, and what it saves on an ESP32 Audio Kit: a 4,095 KB image with every effect, 3,843 KB with chorus and reverb.
|
Checked again on current main (afc3057) on the ESP32 Audio Kit: AUDIOEFFECTS=chorus,reverb with the modules pydevices, displayif, lvgl, btclassic, jpegio, audioif, audiodsp and audioeffects, AUDIO_KIT variant. The image is 0x394970 (3,754,352 bytes) in the 0x3d0000 slot, 0x3b690 (243 KB) free. Flashed app-only at 0x10000, files untouched. On the board audioeffects.ALL is ('Chorus', 'Reverb'). Importing audioeffects loads only audioeffects and its _component; Chorus and Reverb resolve; Compressor, Limiter and Phaser raise AttributeError and import audioeffects.compressor raises ImportError. The phone reconnected to the music player app on its own, and two 35 s captures of music from the line out read no real dropouts (the first reported one 10 ms gap at 20.05 s, which the zoom shows is a continuous low-level stretch of the music with no phase break). |
`AUDIOEFFECTS=chorus,reverb` freezes audioeffects' `init`, its shared base and the named effects, plus any effect they build on (a rack brings its parts). It works the way `AUDIOINSTRUMENTS` does: names are module or class names in any case, an unknown name stops the build and lists the effects, and unset or empty freezes the whole package.
It needs an audioeffects that loads each effect on first use (v0.5.2.dev0 on). An older one stops the build with a message that says so, rather than freezing a package whose import fails on the board.
Also: both packages' manifests now load their own `selection.py` by path. Under the same module name, the second manifest to run got the first one's helper.
Checked:
The guide is now "Build with a few instruments and effects", and the links to it use the new title.