Skip to content

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

Description

@benbovy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions