Example #1
0
 def __init__(
     self,
     session,
     bus_count=1,
     calculation_rate=None,
     session_id=None,
     ):
     import supriya.nonrealtime
     SessionObject.__init__(self, session)
     self._session_id = session_id
     assert calculation_rate is not None
     calculation_rate = supriya.CalculationRate.from_expr(
         calculation_rate)
     self._calculation_rate = calculation_rate
     bus_count = int(bus_count)
     assert 0 < bus_count
     self._buses = tuple(
         supriya.nonrealtime.Bus(
             session,
             bus_group=self,
             calculation_rate=self.calculation_rate,
             session_id=(session_id, i),
             )
         for i in range(bus_count)
         )
Example #2
0
    def __init__(
        self,
        session,
        session_id,
        buffer_group=None,
        channel_count=None,
        frame_count=1,
        duration=None,
        start_offset=None,
        file_path=None,
        starting_frame=None,
    ):
        import supriya.nonrealtime

        SessionObject.__init__(self, session)
        self._events = {}
        self._session_id = int(session_id)
        if buffer_group is not None:
            assert isinstance(buffer_group, supriya.nonrealtime.BufferGroup)
        self._buffer_group = buffer_group
        start_offset = start_offset or 0
        self._start_offset = float(start_offset)
        if duration is None:
            duration = float("inf")
        self._duration = duration
        if file_path is not None:
            starting_frame = int(starting_frame or 0)
        else:
            channel_count = int(channel_count or 1)
            frame_count = int(frame_count or 1)
        self._frame_count = frame_count
        self._channel_count = channel_count
        self._starting_frame = starting_frame
        self._file_path = file_path
    def __init__(
        self,
        session,
        session_id,
        buffer_group=None,
        channel_count=None,
        frame_count=1,
        duration=None,
        start_offset=None,
        file_path=None,
        starting_frame=None,
    ):
        import supriya.nonrealtime

        SessionObject.__init__(self, session)
        self._events = {}
        self._session_id = int(session_id)
        if buffer_group is not None:
            assert isinstance(buffer_group, supriya.nonrealtime.BufferGroup)
        self._buffer_group = buffer_group
        start_offset = start_offset or 0
        self._start_offset = float(start_offset)
        if duration is None:
            duration = float("inf")
        self._duration = duration
        if file_path is not None:
            starting_frame = int(starting_frame or 0)
        else:
            channel_count = int(channel_count or 1)
            frame_count = int(frame_count or 1)
        self._frame_count = frame_count
        self._channel_count = channel_count
        self._starting_frame = starting_frame
        self._file_path = file_path
Example #4
0
 def __init__(
     self,
     session,
     buffer_count=1,
     duration=None,
     channel_count=1,
     frame_count=1,
     start_offset=None,
 ):
     import supriya.nonrealtime
     SessionObject.__init__(self, session)
     buffer_count = int(buffer_count)
     assert 0 < buffer_count
     buffers = []
     start_id = len(self.session.buffers)
     for session_id in range(start_id, buffer_count + start_id):
         buffer_ = supriya.nonrealtime.Buffer(
             session,
             session_id=session_id,
             buffer_group=self,
             duration=duration,
             channel_count=channel_count,
             frame_count=frame_count,
             start_offset=start_offset,
         )
         buffers.append(buffer_)
     self._buffers = tuple(buffers)
    def __init__(
        self,
        session,
        buffer_count=1,
        duration=None,
        channel_count=1,
        frame_count=1,
        start_offset=None,
    ):
        import supriya.nonrealtime

        SessionObject.__init__(self, session)
        buffer_count = int(buffer_count)
        assert 0 < buffer_count
        buffers = []
        start_id = len(self.session.buffers)
        for session_id in range(start_id, buffer_count + start_id):
            buffer_ = supriya.nonrealtime.Buffer(
                session,
                session_id=session_id,
                buffer_group=self,
                duration=duration,
                channel_count=channel_count,
                frame_count=frame_count,
                start_offset=start_offset,
            )
            buffers.append(buffer_)
        self._buffers = tuple(buffers)
Example #6
0
 def __init__(self, session, offset):
     SessionObject.__init__(self, session)
     self._transitions = collections.OrderedDict()
     self._nodes_to_children = None
     self._nodes_to_parents = None
     self._start_nodes = set()
     self._stop_nodes = set()
     self._start_buffers = set()
     self._stop_buffers = set()
     self._offset = offset
Example #7
0
 def __init__(self, session, offset):
     from supriya.nonrealtime import Node
     SessionObject.__init__(self, session)
     self._transitions = collections.OrderedDict()
     self._nodes_to_children: Dict[Node, Tuple[Node]] = {}
     self._nodes_to_parents: Dict[Node, Tuple[Node]] = {}
     self._start_nodes = set()
     self._stop_nodes = set()
     self._start_buffers = set()
     self._stop_buffers = set()
     self._offset = offset
Example #8
0
    def __init__(self, session, bus_group=None, calculation_rate=None, session_id=None):
        import supriya.nonrealtime

        SessionObject.__init__(self, session)
        self._session_id = session_id
        if bus_group is not None:
            assert isinstance(bus_group, supriya.nonrealtime.BusGroup)
        self._bus_group = bus_group
        assert calculation_rate is not None
        calculation_rate = supriya.CalculationRate.from_expr(calculation_rate)
        self._calculation_rate = calculation_rate
        self._events = []
Example #9
0
 def __init__(
     self,
     session,
     session_id: int,
     duration: float = None,
     start_offset: float = None,
 ) -> None:
     SessionObject.__init__(self, session)
     self._session_id = int(session_id)
     start_offset = start_offset or 0
     self._start_offset = float(start_offset)
     if duration is None:
         duration = float("inf")
     self._duration = duration
     self._events: Dict[str, List[Tuple[float, float]]] = {}
Example #10
0
 def __init__(
     self,
     session,
     session_id: int,
     duration: float = None,
     start_offset: float = None,
 ) -> None:
     SessionObject.__init__(self, session)
     self._session_id = int(session_id)
     start_offset = start_offset or 0
     self._start_offset = float(start_offset)
     if duration is None:
         duration = float("inf")
     self._duration = duration
     self._events: Dict[str, List[Tuple[float, float]]] = {}
Example #11
0
 def __init__(
     self,
     session,
     session_id,
     duration=None,
     start_offset=None,
 ):
     SessionObject.__init__(self, session)
     self._session_id = int(session_id)
     start_offset = start_offset or 0
     self._start_offset = float(start_offset)
     if duration is None:
         duration = float('inf')
     self._duration = duration
     self._events = {}
    def __init__(self, session, bus_count=1, calculation_rate=None, session_id=None):
        import supriya.nonrealtime

        SessionObject.__init__(self, session)
        self._session_id = session_id
        assert calculation_rate is not None
        calculation_rate = supriya.CalculationRate.from_expr(calculation_rate)
        self._calculation_rate = calculation_rate
        bus_count = int(bus_count)
        assert 0 < bus_count
        self._buses = tuple(
            supriya.nonrealtime.Bus(
                session,
                bus_group=self,
                calculation_rate=self.calculation_rate,
                session_id=(session_id, i),
            )
            for i in range(bus_count)
        )
Example #13
0
 def __init__(self, session, offset, state, propagate=True):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state
     self._propagate = bool(propagate)
Example #14
0
 def __init__(self, session, offset, state, propagate=True):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state
     self._propagate = bool(propagate)