示例#1
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     leave_open=None,
     starting_frame_in_buffer=None,
     starting_frame_in_file=None,
     ):
     from supriya.tools import nonrealtimetools
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     if not isinstance(file_path, nonrealtimetools.Session):
         file_path = str(file_path)
     self._file_path = file_path
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if leave_open is not None:
         leave_open = bool(leave_open)
     self._leave_open = leave_open
     if starting_frame_in_buffer is not None:
         starting_frame_in_buffer = int(starting_frame_in_buffer)
         assert 0 <= starting_frame_in_buffer
     self._starting_frame_in_buffer = starting_frame_in_buffer
     if starting_frame_in_file is not None:
         starting_frame_in_file = int(starting_frame_in_file)
         assert 0 <= starting_frame_in_file
     self._starting_frame_in_file = starting_frame_in_file
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     leave_open=None,
     starting_frame_in_buffer=None,
     starting_frame_in_file=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     self._file_path = str(file_path)
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if leave_open is not None:
         leave_open = bool(leave_open)
     self._leave_open = leave_open
     if starting_frame_in_buffer is not None:
         starting_frame_in_buffer = int(starting_frame_in_buffer)
         assert 0 <= starting_frame_in_buffer
     self._starting_frame_in_buffer = starting_frame_in_buffer
     if starting_frame_in_file is not None:
         starting_frame_in_file = int(starting_frame_in_file)
         assert 0 <= starting_frame_in_file
     self._starting_frame_in_file = starting_frame_in_file
示例#3
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     leave_open=None,
     starting_frame_in_buffer=None,
     starting_frame_in_file=None,
 ):
     from supriya.tools import nonrealtimetools
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     if not isinstance(file_path, nonrealtimetools.Session):
         file_path = str(file_path)
     self._file_path = file_path
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if leave_open is not None:
         leave_open = bool(leave_open)
     self._leave_open = leave_open
     if starting_frame_in_buffer is not None:
         starting_frame_in_buffer = int(starting_frame_in_buffer)
         assert 0 <= starting_frame_in_buffer
     self._starting_frame_in_buffer = starting_frame_in_buffer
     if starting_frame_in_file is not None:
         starting_frame_in_file = int(starting_frame_in_file)
         assert 0 <= starting_frame_in_file
     self._starting_frame_in_file = starting_frame_in_file
示例#4
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     header_format='aiff',
     leave_open=False,
     sample_format='int24',
     starting_frame=None,
     ):
     from supriya.tools import soundfiletools
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     self._file_path = str(file_path)
     if frame_count is None:
         frame_count = -1
     frame_count = int(frame_count)
     assert -1 <= frame_count
     self._frame_count = frame_count
     self._header_format = soundfiletools.HeaderFormat.from_expr(
         header_format)
     self._leave_open = bool(leave_open)
     self._sample_format = soundfiletools.SampleFormat.from_expr(
         sample_format)
     if starting_frame is None:
         starting_frame = 0
     starting_frame = int(starting_frame)
     assert 0 <= starting_frame
     self._starting_frame = starting_frame
示例#5
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     header_format='aiff',
     leave_open=False,
     sample_format='int24',
     starting_frame=None,
 ):
     from supriya.tools import soundfiletools
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     self._file_path = str(file_path)
     if frame_count is None:
         frame_count = -1
     frame_count = int(frame_count)
     assert -1 <= frame_count
     self._frame_count = frame_count
     self._header_format = soundfiletools.HeaderFormat.from_expr(
         header_format)
     self._leave_open = bool(leave_open)
     self._sample_format = soundfiletools.SampleFormat.from_expr(
         sample_format)
     if starting_frame is None:
         starting_frame = 0
     starting_frame = int(starting_frame)
     assert 0 <= starting_frame
     self._starting_frame = starting_frame
示例#6
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
     file_path=None,
     frame_count=None,
     leave_open=None,
     starting_frame_in_buffer=None,
     starting_frame_in_file=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
     self._file_path = str(file_path)
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if leave_open is not None:
         leave_open = bool(leave_open)
     self._leave_open = leave_open
     if starting_frame_in_buffer is not None:
         starting_frame_in_buffer = int(starting_frame_in_buffer)
         assert 0 <= starting_frame_in_buffer
     self._starting_frame_in_buffer = starting_frame_in_buffer
     if starting_frame_in_file is not None:
         starting_frame_in_file = int(starting_frame_in_file)
         assert 0 <= starting_frame_in_file
     self._starting_frame_in_file = starting_frame_in_file
示例#7
0
 def __init__(
     self,
     include_controls=False,
     node_id=None,
 ):
     Request.__init__(self)
     self._node_id = node_id
     self._include_controls = bool(include_controls)
示例#8
0
 def __init__(
     self,
     buffer_id=None,
     indices=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._indices = tuple(int(index) for index in indices)
示例#9
0
 def __init__(
     self,
     completion_message=None,
     synthdef_path=None,
     ):
     Request.__init__(self)
     self._completion_message = completion_message
     self._synthdef_path = os.path.abspath(synthdef_path)
示例#10
0
 def __init__(
     self,
     include_controls=False,
     node_id=None,
     ):
     Request.__init__(self)
     self._node_id = node_id
     self._include_controls = bool(include_controls)
示例#11
0
 def __init__(
     self,
     buffer_ids=None,
     ):
     Request.__init__(self)
     if buffer_ids:
         buffer_ids = tuple(int(buffer_id) for buffer_id in buffer_ids)
     self._buffer_ids = buffer_ids
示例#12
0
 def __init__(
     self,
     node_id=None,
     **kwargs
     ):
     Request.__init__(self)
     self._node_id = node_id
     self._kwargs = kwargs
示例#13
0
 def __init__(
     self,
     completion_message=None,
     synthdef_path=None,
 ):
     Request.__init__(self)
     self._completion_message = completion_message
     self._synthdef_path = os.path.abspath(synthdef_path)
示例#14
0
 def __init__(
     self,
     buffer_ids=None,
 ):
     Request.__init__(self)
     if buffer_ids:
         buffer_ids = tuple(int(buffer_id) for buffer_id in buffer_ids)
     self._buffer_ids = buffer_ids
示例#15
0
 def __init__(
     self,
     buffer_id=None,
     indices=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._indices = tuple(int(index) for index in indices)
示例#16
0
 def __init__(
     self,
     indices=None,
     ):
     Request.__init__(self)
     if indices:
         indices = tuple(int(index) for index in indices)
         assert all(0 <= index for index in indices)
     self._indices = indices
示例#17
0
 def __init__(
     self,
     node_ids=None
     ):
     Request.__init__(self)
     if not isinstance(node_ids, collections.Sequence):
         node_ids = (node_ids,)
     node_ids = tuple(int(_) for _ in node_ids)
     self._node_ids = node_ids
 def __init__(
     self,
     buffer_id=None,
     completion_message=None
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
示例#19
0
 def __init__(
     self,
     synthdef=None,
 ):
     from supriya.tools import synthdeftools
     Request.__init__(self)
     prototype = (str, synthdeftools.SynthDef)
     assert isinstance(synthdef, prototype)
     self._synthdef = synthdef
 def __init__(
     self,
     completion_message=None,
     directory_path=None,
     ):
     Request.__init__(self)
     Request.__init__(self)
     self._completion_message = completion_message
     self._directory_path = os.path.abspath(directory_path)
示例#21
0
 def __init__(
     self,
     buffer_id=None,
     completion_message=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
示例#22
0
 def __init__(
     self,
     synthdef=None,
     ):
     from supriya.tools import synthdeftools
     Request.__init__(self)
     prototype = (str, synthdeftools.SynthDef)
     assert isinstance(synthdef, prototype)
     self._synthdef = synthdef
示例#23
0
 def __init__(
     self,
     buffer_id=None,
     index_count_pairs=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._index_count_pairs = tuple(
         (int(index), int(count)) for index, count in index_count_pairs)
示例#24
0
 def __init__(self, node_id_run_flag_pairs=None):
     Request.__init__(self)
     if node_id_run_flag_pairs:
         pairs = []
         for node_id, run_flag in node_id_run_flag_pairs:
             node_id = int(node_id)
             run_flag = bool(run_flag)
             pairs.append((node_id, run_flag))
         node_id_run_flag_pairs = tuple(pairs)
     self._node_id_run_flag_pairs = node_id_run_flag_pairs
示例#25
0
 def __init__(
     self,
     node_id=None,
     **kwargs
     ):
     Request.__init__(self)
     self._node_id = node_id
     self._kwargs = dict(
         (name, int(value))
         for name, value in kwargs.items()
         )
示例#26
0
    def __init__(self, node_id_pairs=None):
        from supriya.tools import requesttools

        Request.__init__(self)
        if node_id_pairs:
            if not isinstance(node_id_pairs, collections.Sequence):
                node_id_pairs = [node_id_pairs]
            prototype = requesttools.NodeIdPair
            assert all(isinstance(x, prototype) for x in node_id_pairs)
            node_id_pairs = tuple(node_id_pairs)
        self._node_id_pairs = node_id_pairs
示例#27
0
 def __init__(
     self,
     buffer_id=None,
     index_count_pairs=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._index_count_pairs = tuple(
         (int(index), int(count))
         for index, count in index_count_pairs
         )
示例#28
0
 def __init__(
     self,
     add_action=None,
     node_id=None,
     target_node_id=None,
 ):
     from supriya.tools import servertools
     Request.__init__(self)
     self._add_action = servertools.AddAction.from_expr(add_action)
     self._node_id = node_id
     self._target_node_id = target_node_id
示例#29
0
 def __init__(
     self,
     add_action=None,
     node_id=None,
     target_node_id=None,
     ):
     from supriya.tools import servertools
     Request.__init__(self)
     self._add_action = servertools.AddAction.from_expr(add_action)
     self._node_id = node_id
     self._target_node_id = target_node_id
 def __init__(
     self,
     node_id=None,
     **kwargs
     ):
     Request.__init__(self)
     self._node_id = node_id
     self._kwargs = dict(
         (name, int(value))
         for name, value in kwargs.items()
         )
示例#31
0
 def __init__(
     self,
     amplitudes=None,
     as_wavetable=None,
     buffer_id=None,
     command_name=None,
     frequencies=None,
     phases=None,
     should_clear_first=None,
     should_normalize=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     assert command_name in (
         'cheby',
         'sine1',
         'sine2',
         'sine3',
     )
     self._command_name = command_name
     if as_wavetable is not None:
         as_wavetable = bool(as_wavetable)
     self._as_wavetable = as_wavetable
     if should_clear_first is not None:
         should_clear_first = bool(should_clear_first)
     self._should_clear_first = should_clear_first
     if should_normalize is not None:
         should_normalize = bool(should_normalize)
     self._should_normalize = should_normalize
     self._frequencies = None
     self._phases = None
     if command_name in ('cheby', 'sine1'):
         if not isinstance(amplitudes, collections.Sequence):
             amplitudes = (amplitudes, )
         amplitudes = tuple(float(_) for _ in amplitudes)
         assert len(amplitudes)
         self._amplitudes = amplitudes
     if command_name == 'sine2':
         amplitudes = tuple(float(_) for _ in amplitudes)
         frequencies = tuple(float(_) for _ in frequencies)
         assert 0 < len(amplitudes)
         assert len(amplitudes) == len(frequencies)
         self._amplitudes = amplitudes
         self._frequencies = frequencies
     if command_name == 'sine3':
         amplitudes = tuple(float(_) for _ in amplitudes)
         frequencies = tuple(float(_) for _ in frequencies)
         phases = tuple(float(_) for _ in phases)
         assert 0 < len(amplitudes)
         assert len(amplitudes) == len(frequencies) == len(phases)
         self._amplitudes = amplitudes
         self._frequencies = frequencies
         self._phases = phases
示例#32
0
 def __init__(
     self,
     as_wavetable=None,
     buffer_id=None,
     new_maximum=1.0,
     ):
     Request.__init__(self)
     if as_wavetable is not None:
         as_wavetable = bool(as_wavetable)
     self._as_wavetable = as_wavetable
     self._buffer_id = int(buffer_id)
     self._new_maximum = float(new_maximum)
示例#33
0
 def __init__(
     self,
     amplitudes=None,
     as_wavetable=None,
     buffer_id=None,
     command_name=None,
     frequencies=None,
     phases=None,
     should_clear_first=None,
     should_normalize=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     assert command_name in (
         'cheby',
         'sine1',
         'sine2',
         'sine3',
         )
     self._command_name = command_name
     if as_wavetable is not None:
         as_wavetable = bool(as_wavetable)
     self._as_wavetable = as_wavetable
     if should_clear_first is not None:
         should_clear_first = bool(should_clear_first)
     self._should_clear_first = should_clear_first
     if should_normalize is not None:
         should_normalize = bool(should_normalize)
     self._should_normalize = should_normalize
     self._frequencies = None
     self._phases = None
     if command_name in ('cheby', 'sine1'):
         if not isinstance(amplitudes, collections.Sequence):
             amplitudes = (amplitudes,)
         amplitudes = tuple(float(_) for _ in amplitudes)
         assert len(amplitudes)
         self._amplitudes = amplitudes
     if command_name == 'sine2':
         amplitudes = tuple(float(_) for _ in amplitudes)
         frequencies = tuple(float(_) for _ in frequencies)
         assert 0 < len(amplitudes)
         assert len(amplitudes) == len(frequencies)
         self._amplitudes = amplitudes
         self._frequencies = frequencies
     if command_name == 'sine3':
         amplitudes = tuple(float(_) for _ in amplitudes)
         frequencies = tuple(float(_) for _ in frequencies)
         phases = tuple(float(_) for _ in phases)
         assert 0 < len(amplitudes)
         assert len(amplitudes) == len(frequencies) == len(phases)
         self._amplitudes = amplitudes
         self._frequencies = frequencies
         self._phases = phases
示例#34
0
 def __init__(
     self,
     node_id_pairs=None,
 ):
     from supriya.tools import requesttools
     Request.__init__(self)
     if node_id_pairs:
         if not isinstance(node_id_pairs, collections.Sequence):
             node_id_pairs = [node_id_pairs]
         prototype = requesttools.NodeIdPair
         assert all(isinstance(x, prototype) for x in node_id_pairs)
         node_id_pairs = tuple(node_id_pairs)
     self._node_id_pairs = node_id_pairs
示例#35
0
 def __init__(
     self,
     buffer_id=None,
     index_count_value_triples=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     triples = []
     for index, count, value in index_count_value_triples:
         triple = (int(index), int(count), float(value))
         triples.append(triple)
     triples = tuple(triples)
     self._index_count_value_triples = triples
示例#36
0
 def __init__(
     self,
     node_id_run_flag_pairs=None,
 ):
     Request.__init__(self)
     if node_id_run_flag_pairs:
         pairs = []
         for node_id, run_flag in node_id_run_flag_pairs:
             node_id = int(node_id)
             run_flag = bool(run_flag)
             pairs.append((node_id, run_flag))
         node_id_run_flag_pairs = tuple(pairs)
     self._node_id_run_flag_pairs = node_id_run_flag_pairs
示例#37
0
 def __init__(
     self,
     buffer_id=None,
     index_count_value_triples=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     triples = []
     for index, count, value in index_count_value_triples:
         triple = (int(index), int(count), float(value))
         triples.append(triple)
     triples = tuple(triples)
     self._index_count_value_triples = triples
 def __init__(self, index_count_value_triples=None):
     Request.__init__(self)
     if index_count_value_triples:
         triples = []
         for index, count, value in index_count_value_triples:
             index = int(index)
             count = int(count)
             value = float(value)
             assert 0 <= index
             assert 0 < count
             triple = (index, count, value)
             triples.append(triple)
         index_count_value_triples = tuple(triples)
     self._index_count_value_triples = index_count_value_triples
 def __init__(self, index_values_pairs=None):
     Request.__init__(self)
     if index_values_pairs:
         pairs = []
         for index, values in index_values_pairs:
             index = int(index)
             values = tuple(float(value) for value in values)
             assert 0 <= index
             assert values
             if not values:
                 continue
             pair = (index, values)
             pairs.append(pair)
         index_values_pairs = tuple(pairs)
     self._index_values_pairs = index_values_pairs
 def __init__(
     self,
     index_value_pairs=None,
     ):
     Request.__init__(self)
     if index_value_pairs:
         pairs = []
         for index, value in index_value_pairs:
             index = int(index)
             value = float(value)
             assert 0 <= index
             pair = (index, value)
             pairs.append(pair)
         index_value_pairs = tuple(pairs)
     self._index_value_pairs = index_value_pairs
 def __init__(
     self,
     completion_message=None,
     synthdefs=None,
     ):
     from supriya.tools import synthdeftools
     Request.__init__(self)
     self._completion_message = completion_message
     if synthdefs:
         prototype = synthdeftools.SynthDef
         if isinstance(synthdefs, prototype):
             synthdefs = (synthdefs,)
         assert all(isinstance(x, prototype) for x in synthdefs)
         synthdefs = tuple(synthdefs)
     self._synthdefs = synthdefs
示例#42
0
 def __init__(
     self,
     completion_message=None,
     synthdefs=None,
 ):
     from supriya.tools import synthdeftools
     Request.__init__(self)
     self._completion_message = completion_message
     if synthdefs:
         prototype = synthdeftools.SynthDef
         if isinstance(synthdefs, prototype):
             synthdefs = (synthdefs, )
         assert all(isinstance(x, prototype) for x in synthdefs)
         synthdefs = tuple(synthdefs)
     self._synthdefs = synthdefs
示例#43
0
 def __init__(
     self,
     index_value_pairs=None,
 ):
     Request.__init__(self)
     if index_value_pairs:
         pairs = []
         for index, value in index_value_pairs:
             index = int(index)
             value = float(value)
             assert 0 <= index
             pair = (index, value)
             pairs.append(pair)
         index_value_pairs = tuple(pairs)
     self._index_value_pairs = index_value_pairs
示例#44
0
 def __init__(
     self,
     buffer_id=None,
     frame_count=None,
     channel_count=None,
     completion_message=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._frame_count = frame_count
     if channel_count is not None:
         channel_count = int(channel_count)
         assert 0 < channel_count
     self._channel_count = channel_count
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
 def __init__(
     self,
     index_count_pairs=None,
     ):
     Request.__init__(self)
     if index_count_pairs:
         pairs = []
         for index, count in index_count_pairs:
             index = int(index)
             count = int(count)
             assert 0 <= index
             assert 0 < count
             pair = (index, count)
             pairs.append(pair)
         index_count_pairs = tuple(pairs)
     self._index_count_pairs = index_count_pairs
示例#46
0
 def __init__(
     self,
     buffer_id=None,
     index_values_pairs=None,
 ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     if index_values_pairs:
         pairs = []
         for index, values in index_values_pairs:
             index = int(index)
             values = tuple(float(value) for value in values)
             pair = (index, values)
             pairs.append(pair)
         pairs = tuple(pairs)
     self._index_values_pairs = pairs
示例#47
0
 def __init__(
     self,
     buffer_id=None,
     frame_count=None,
     channel_count=None,
     completion_message=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     self._frame_count = frame_count
     if channel_count is not None:
         channel_count = int(channel_count)
         assert 0 < channel_count
     self._channel_count = channel_count
     self._completion_message = self._coerce_completion_message_input(
         completion_message)
示例#48
0
 def __init__(
     self,
     index_count_pairs=None,
 ):
     Request.__init__(self)
     if index_count_pairs:
         pairs = []
         for index, count in index_count_pairs:
             index = int(index)
             count = int(count)
             assert 0 <= index
             assert 0 < count
             pair = (index, count)
             pairs.append(pair)
         index_count_pairs = tuple(pairs)
     self._index_count_pairs = index_count_pairs
示例#49
0
 def __init__(
     self,
     buffer_id=None,
     index_value_pairs=None,
     ):
     Request.__init__(self)
     self._buffer_id = int(buffer_id)
     if index_value_pairs:
         pairs = []
         for index, value in index_value_pairs:
             index = int(index)
             value = float(value)
             pair = (index, value)
             pairs.append(pair)
         pairs = tuple(pairs)
     self._index_value_pairs = index_value_pairs
示例#50
0
 def __init__(
     self,
     index_count_value_triples=None,
 ):
     Request.__init__(self)
     if index_count_value_triples:
         triples = []
         for index, count, value in index_count_value_triples:
             index = int(index)
             count = int(count)
             value = float(value)
             assert 0 <= index
             assert 0 < count
             triple = (index, count, value)
             triples.append(triple)
         index_count_value_triples = tuple(triples)
     self._index_count_value_triples = index_count_value_triples
示例#51
0
 def __init__(
     self,
     add_action=None,
     node_id=None,
     synthdef=None,
     target_node_id=None,
     **kwargs
     ):
     from supriya.tools import servertools
     from supriya.tools import synthdeftools
     Request.__init__(self)
     self._add_action = servertools.AddAction.from_expr(add_action)
     self._node_id = node_id
     prototype = (str, synthdeftools.SynthDef)
     assert isinstance(synthdef, prototype)
     self._synthdef = synthdef
     self._target_node_id = target_node_id
     self._kwargs = kwargs
示例#52
0
 def __init__(
     self,
     add_action=None,
     node_id=None,
     synthdef=None,
     target_node_id=None,
     **kwargs
     ):
     from supriya.tools import servertools
     from supriya.tools import synthdeftools
     Request.__init__(self)
     self._add_action = servertools.AddAction.from_expr(add_action)
     self._node_id = node_id
     prototype = (str, synthdeftools.SynthDef)
     assert isinstance(synthdef, prototype)
     self._synthdef = synthdef
     self._target_node_id = target_node_id
     self._kwargs = kwargs
 def __init__(
     self,
     index_values_pairs=None,
     ):
     Request.__init__(self)
     if index_values_pairs:
         pairs = []
         for index, values in index_values_pairs:
             index = int(index)
             values = tuple(float(value) for value in values)
             assert 0 <= index
             assert values
             if not values:
                 continue
             pair = (index, values)
             pairs.append(pair)
         index_values_pairs = tuple(pairs)
     self._index_values_pairs = index_values_pairs
示例#54
0
 def __init__(
     self,
     frame_count=None,
     source_buffer_id=None,
     source_starting_frame=None,
     target_buffer_id=None,
     target_starting_frame=None,
 ):
     Request.__init__(self)
     self._source_buffer_id = int(source_buffer_id)
     self._target_buffer_id = int(target_buffer_id)
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if source_starting_frame is not None:
         source_starting_frame = int(source_starting_frame)
         assert 0 <= source_starting_frame
     self._source_starting_frame = source_starting_frame
     if target_starting_frame is not None:
         target_starting_frame = int(target_starting_frame)
         assert 0 <= target_starting_frame
     self._target_starting_frame = target_starting_frame
示例#55
0
 def __init__(
     self,
     frame_count=None,
     source_buffer_id=None,
     source_starting_frame=None,
     target_buffer_id=None,
     target_starting_frame=None,
     ):
     Request.__init__(self)
     self._source_buffer_id = int(source_buffer_id)
     self._target_buffer_id = int(target_buffer_id)
     if frame_count is not None:
         frame_count = int(frame_count)
         assert -1 <= frame_count
     self._frame_count = frame_count
     if source_starting_frame is not None:
         source_starting_frame = int(source_starting_frame)
         assert 0 <= source_starting_frame
     self._source_starting_frame = source_starting_frame
     if target_starting_frame is not None:
         target_starting_frame = int(target_starting_frame)
         assert 0 <= target_starting_frame
     self._target_starting_frame = target_starting_frame
示例#56
0
 def __init__(self, node_id=None, **kwargs):
     Request.__init__(self)
     self._node_id = node_id
     self._kwargs = kwargs
示例#57
0
 def __init__(self):
     Request.__init__(self)
     raise NotImplementedError
示例#58
0
 def __init__(
     self,
     sync_id=None,
 ):
     Request.__init__(self)
     self._sync_id = int(sync_id)