コード例 #1
0
ファイル: BufferGroup.py プロジェクト: lisongx/supriya
 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
ファイル: Buffer.py プロジェクト: digideskio/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
コード例 #4
0
ファイル: BufferGroup.py プロジェクト: digideskio/supriya
 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
ファイル: BusGroup.py プロジェクト: digideskio/supriya
 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
ファイル: Moment.py プロジェクト: digideskio/supriya
 def __init__(self, session, offset, state):
     SessionObject.__init__(self, session)
     self._offset = offset
     self._state = state