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
Aserver currently starts a stream at boot() and stops it at quit(). Asig.play(onset=...,...) simply dispatches an audio object for output at given onset time.
However, there are occasions where a more 'sound object'-oriented output would be wished atone.play(server=f) using a FilewriterBackend to create a file of given format atone.play(server=j) using a JupyterBackend to create an interactive widget that allows to play and replay and navigate within this asig-sound object
etc.
Even for PyaudioBackend, object based output could be helpful, as it avoids any problems with a chopping stream, which still could happen using the stream-based output.
Proposition to solve this issue:
create a method Asig.playobj(), which plays the object using the specified backend outside the stream-based callback logic (alternative names play1(), or play_event().
This method would not have an onset, and implementation would basically create&start a stream on each invocation, close it right after and delete it.
create a new class altogether, e.g. AEventPlayer(), which would not have a boot and quit method, but always frame play() invocations as outlined above by stream management ops.
I tend to favor 1., but wonder whether there is a third hidden better solution for this problem. I can start to implement it once we are on the same page it it...
The text was updated successfully, but these errors were encountered:
Aserver currently starts a stream at boot() and stops it at quit(). Asig.play(onset=...,...) simply dispatches an audio object for output at given onset time.
However, there are occasions where a more 'sound object'-oriented output would be wished
atone.play(server=f)
using a FilewriterBackend to create a file of given formatatone.play(server=j)
using a JupyterBackend to create an interactive widget that allows to play and replay and navigate within this asig-sound objectetc.
Even for PyaudioBackend, object based output could be helpful, as it avoids any problems with a chopping stream, which still could happen using the stream-based output.
Proposition to solve this issue:
create a method Asig.playobj(), which plays the object using the specified backend outside the stream-based callback logic (alternative names play1(), or play_event().
This method would not have an onset, and implementation would basically create&start a stream on each invocation, close it right after and delete it.
create a new class altogether, e.g. AEventPlayer(), which would not have a boot and quit method, but always frame play() invocations as outlined above by stream management ops.
I tend to favor 1., but wonder whether there is a third hidden better solution for this problem. I can start to implement it once we are on the same page it it...
The text was updated successfully, but these errors were encountered: