-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
CircuitPython version
8.2.0-beta.1
Code/REPL
# see forum thread
Behavior
when some synthio objects (particularly the Synthesizer itself?) are imported, synthio breaks.
these objects refer to each other in complicated ways, e.g., AudioOut -> Synthesizer -> Note -> LFO
If one of these objects is moved (made long-lived) it would break the relationships.
At the same time, Notes in particular are not conceptually "long lived", so the usual thing we've done (e.g., with UART, which frequently is pointed to by an interrupt handler object) of initially allocating as long-lived is not a great solution.
This may be a cause of https://forums.adafruit.com/viewtopic.php?t=202163 -- I saw and ignored something similar during testing.
A workaround that still lets the "create audio player", "create synthesizer" object etc code to be re-used is to place a FUNCTION for creating the object in the import, instead of creating the object itself there.
Description
No response
Additional information
No response