Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Stream-based and event-based audio in Aserver / Arecorder #18

Open
thomas-hermann opened this issue Oct 10, 2019 · 0 comments
Open
Assignees
Labels
draft enhancement New feature or request feedback wanted question Further information is requested

Comments

@thomas-hermann
Copy link
Member

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:

  1. 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.

  2. 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...

@thomas-hermann thomas-hermann added enhancement New feature or request question Further information is requested draft feedback wanted labels Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft enhancement New feature or request feedback wanted question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants