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
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.
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
The text was updated successfully, but these errors were encountered:
I'd like to leave it for now. I was wrong about it being the cause of the user's problem, but there's a real problem here which can arise when you do something like
which I believe is because of long-lived objects; the "synth" that is played on "speaker" is not the same "synth" that is imported from code.py, and so things don't work.
CircuitPython version
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
The text was updated successfully, but these errors were encountered: