예제 #1
0
 def __init__(
     self,
     session,
     buffer_count=1,
     duration=None,
     channel_count=1,
     frame_count=1,
     start_offset=None,
     ):
     from supriya.tools import nonrealtimetools
     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_ = nonrealtimetools.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)
예제 #2
0
파일: Buffer.py 프로젝트: lisongx/supriya
 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,
 ):
     from supriya.tools import nonrealtimetools
     SessionObject.__init__(self, session)
     self._events = {}
     self._session_id = int(session_id)
     if buffer_group is not None:
         assert isinstance(buffer_group, nonrealtimetools.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
예제 #3
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,
     ):
     from supriya.tools import nonrealtimetools
     SessionObject.__init__(self, session)
     self._events = {}
     self._session_id = int(session_id)
     if buffer_group is not None:
         assert isinstance(buffer_group, nonrealtimetools.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
예제 #4
0
 def __init__(
     self,
     session,
     buffer_count=1,
     duration=None,
     channel_count=1,
     frame_count=1,
     start_offset=None,
     ):
     from supriya.tools import nonrealtimetools
     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_ = nonrealtimetools.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)
예제 #5
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
예제 #6
0
파일: State.py 프로젝트: digideskio/supriya
 def __init__(self, session, offset):
     SessionObject.__init__(self, session)
     self._actions = 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
예제 #7
0
    def __init__(self, session, bus_group=None, calculation_rate=None):
        from supriya.tools import nonrealtimetools

        SessionObject.__init__(self, session)
        if bus_group is not None:
            assert isinstance(bus_group, nonrealtimetools.BusGroup)
        self._bus_group = bus_group
        assert calculation_rate is not None
        calculation_rate = synthdeftools.CalculationRate.from_expr(calculation_rate)
        self._calculation_rate = calculation_rate
        self._events = []
예제 #8
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 = {}
예제 #9
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 = {}
예제 #10
0
파일: Bus.py 프로젝트: lisongx/supriya
 def __init__(
     self,
     session,
     bus_group=None,
     calculation_rate=None,
 ):
     from supriya.tools import nonrealtimetools
     SessionObject.__init__(self, session)
     if bus_group is not None:
         assert isinstance(bus_group, nonrealtimetools.BusGroup)
     self._bus_group = bus_group
     assert calculation_rate is not None
     calculation_rate = synthdeftools.CalculationRate.from_expr(
         calculation_rate)
     self._calculation_rate = calculation_rate
     self._events = []
예제 #11
0
 def __init__(
     self,
     session,
     bus_count=1,
     calculation_rate=None,
 ):
     from supriya.tools import nonrealtimetools
     SessionObject.__init__(self, session)
     assert calculation_rate is not None
     calculation_rate = synthdeftools.CalculationRate.from_expr(
         calculation_rate)
     self._calculation_rate = calculation_rate
     bus_count = int(bus_count)
     assert 0 < bus_count
     self._buses = tuple(
         nonrealtimetools.Bus(
             session,
             bus_group=self,
             calculation_rate=self.calculation_rate,
         ) for _ in range(bus_count))
예제 #12
0
 def __init__(
     self,
     session,
     bus_count=1,
     calculation_rate=None,
     ):
     from supriya.tools import nonrealtimetools
     SessionObject.__init__(self, session)
     assert calculation_rate is not None
     calculation_rate = synthdeftools.CalculationRate.from_expr(
         calculation_rate)
     self._calculation_rate = calculation_rate
     bus_count = int(bus_count)
     assert 0 < bus_count
     self._buses = tuple(
         nonrealtimetools.Bus(
             session,
             bus_group=self,
             calculation_rate=self.calculation_rate,
             )
         for _ in range(bus_count)
         )
예제 #13
0
파일: Moment.py 프로젝트: lisongx/supriya
 def __init__(self, session, offset, state, propagate=True):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state
     self._propagate = bool(propagate)
예제 #14
0
 def __init__(self, session, offset, state, propagate=True):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state
     self._propagate = bool(propagate)
예제 #15
0
 def __init__(self, session, offset, state):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state