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

High-level vs. low-level audio graph #64

Open
benbovy opened this issue May 11, 2022 · 1 comment
Open

High-level vs. low-level audio graph #64

benbovy opened this issue May 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@benbovy
Copy link
Collaborator

benbovy commented May 11, 2022

It would be nice to have a high-level representation of the graph of audio nodes that doesn't contain all the internal nodes (and their connections) defined within the audio nodes.

  • API

By default, all new connections are considered as high-level. A context manager may help in temporarily disabling this behavior, e.g.,

class MyAudioNode(ipytone.PyAudioNode):

    def __init__(self, **kwargs):
        in_node = Gain()
        out_node = Gain()
        super().__init__(in_node, out_node, **kwargs)

        with self._graph.at_low_level():
            # all connections here will be at low-level
            in_node.connect(out_node)
  • Implementation

For example, add a tag low_level=True to audio graph connections.

@benbovy
Copy link
Collaborator Author

benbovy commented May 11, 2022

Or use internal instead of low_level...

@benbovy benbovy added the enhancement New feature or request label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant