Example #1
0
 def __init__(
     self,
     calculation_rate=None,
     decay_scale=1,
     frequency_offset=0,
     frequency_scale=1,
     source=None,
     specifications=None,
 ):
     frequencies, amplitudes, decay_times = specifications
     assert len(frequencies)
     if not amplitudes:
         amplitudes = [1.0] * len(frequencies)
     elif not isinstance(amplitudes, collections.Sequence):
         amplitudes = [amplitudes] * len(frequencies)
     if not decay_times:
         decay_times = [1.0] * len(frequencies)
     elif not isinstance(decay_times, collections.Sequence):
         decay_times = [decay_times] * len(frequencies)
     specifications = utils.zip_sequences(frequencies, amplitudes,
                                          decay_times)
     specifications = utils.flatten_iterable(specifications)
     specifications = tuple(specifications)
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         decay_scale=decay_scale,
         frequency_offset=frequency_offset,
         frequency_scale=frequency_scale,
         source=source,
         specifications=specifications,
     )
Example #2
0
 def __init__(
     self,
     calculation_rate=None,
     adparam=1,
     ampdist=1,
     ampscale=0.5,
     ddparam=1,
     durdist=1,
     durscale=0.5,
     init_cps=12,
     knum=None,
     maxfrequency=660,
     minfrequency=440,
 ):
     if knum is None:
         knum = init_cps
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         adparam=adparam,
         ampdist=ampdist,
         ampscale=ampscale,
         ddparam=ddparam,
         durdist=durdist,
         durscale=durscale,
         init_cps=init_cps,
         knum=knum,
         maxfrequency=maxfrequency,
         minfrequency=minfrequency,
     )
    def __init__(
        self,
        calculation_rate=None,
        label=None,
        source=None,
        trigger=None,
        trigger_id=-1,
    ):
        import supriya.synthdefs
        import supriya.ugens

        if label is None:
            if isinstance(source, supriya.synthdefs.UGen):
                label = type(source).__name__
            elif isinstance(source, supriya.synthdefs.OutputProxy):
                label = type(source.source).__name__
        UGen.__init__(
            self,
            calculation_rate=calculation_rate,
            source=source,
            trigger=trigger,
            trigger_id=trigger_id,
        )
        label = str(label)
        self._configure_input("label", len(label))
        for character in label:
            self._configure_input("label", ord(character))
 def __init__(
     self,
     calculation_rate=None,
     command_name="/reply",
     peak_lag=3,
     reply_id=-1,
     reply_rate=20,
     source=None,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         peak_lag=peak_lag,
         reply_id=reply_id,
         reply_rate=reply_rate,
     )
     command_name = str(command_name)
     if not isinstance(source, Sequence):
         source = (source, )
     self._configure_input("source", len(source))
     for input_ in source:
         self._configure_input("source", input_)
     self._configure_input("command_name", len(command_name))
     for character in command_name:
         self._configure_input("label", ord(character))
Example #5
0
 def __init__(self, addend=0.0, multiplier=1.0, calculation_rate=None, source=None):
     UGen.__init__(
         self,
         addend=addend,
         multiplier=multiplier,
         calculation_rate=calculation_rate,
         source=source,
     )
Example #6
0
 def __init__(
     self,
     calculation_rate=None,
     trigger=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         trigger=trigger,
     )
Example #7
0
 def __init__(
     self,
     calculation_rate=None,
     envelope=None,
     index=None,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         envelope=envelope,
         index=index,
     )
 def __init__(
     self,
     calculation_rate=None,
     diff=0.01,
     source=None,
     ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         diff=diff,
         source=source,
         )
 def __init__(
     self,
     calculation_rate=None,
     buffer_id=0,
     input_array=None,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         buffer_id=buffer_id,
         input_array=input_array,
     )
Example #10
0
 def __init__(self, input_one=None, input_two=None, input_three=None):
     inputs = [input_one, input_two, input_three]
     calculation_rate = CalculationRate.from_expr(inputs)
     inputs.sort(key=lambda x: CalculationRate.from_expr(x), reverse=True)
     inputs = tuple(inputs)
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         input_one=input_one,
         input_two=input_two,
         input_three=input_three,
     )
Example #11
0
 def __init__(self,
              calculation_rate=None,
              ugen_id=0,
              post_mode=2,
              source=None):
     assert int(post_mode) in (0, 1, 2)
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         ugen_id=ugen_id,
         post_mode=post_mode,
         source=source,
     )
Example #12
0
 def __init__(self,
              calculation_rate=None,
              maximum=127,
              minimum=0,
              trigger=0):
     minimum = int(minimum)
     maximum = int(maximum)
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         maximum=maximum,
         minimum=minimum,
         trigger=trigger,
     )
 def __init__(
     self,
     calculation_rate=None,
     amp=1,
     duration=0.2,
     frequency=440,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         amp=amp,
         duration=duration,
         frequency=frequency,
     )
Example #14
0
 def __init__(
     self,
     calculation_rate=None,
     div=2,
     start=0,
     trigger=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         div=div,
         start=start,
         trigger=trigger,
     )
Example #15
0
 def __init__(
     self,
     calculation_rate=None,
     mod=1,
     x=0,
     y=0,
     ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         mod=mod,
         x=x,
         y=y,
         )
Example #16
0
 def __init__(
     self,
     calculation_rate=None,
     freqoffset=0,
     freqscale=1,
     specifications_array_ref=None,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         freqoffset=freqoffset,
         freqscale=freqscale,
         specifications_array_ref=specifications_array_ref,
     )
Example #17
0
 def __init__(
     self,
     calculation_rate=None,
     fftsize=None,
     irbufnum=None,
     source=None,
     ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         fftsize=fftsize,
         irbufnum=irbufnum,
         source=source,
         )
Example #18
0
 def __init__(
     self,
     calculation_rate=None,
     rect=None,
     x=0,
     y=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         rect=rect,
         x=x,
         y=y,
     )
Example #19
0
 def __init__(
     self,
     calculation_rate=None,
     id=0,
     source=None,
     value=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         id=id,
         source=source,
         value=value,
     )
Example #20
0
 def __init__(
     self,
     calculation_rate=None,
     buffer_id=0,
     channel_count=1,
     delay_time=0.2,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         buffer_id=buffer_id,
         channel_count=channel_count,
         delay_time=delay_time,
     )
 def __init__(
     self,
     calculation_rate=None,
     in_a=None,
     in_b=0,
     level=1,
     pan=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         in_a=in_a,
         in_b=in_b,
         level=level,
         pan=pan,
     )
Example #22
0
 def __init__(
     self,
     calculation_rate=None,
     binindex=None,
     bufsize=None,
     chain=None,
     whichmeasure=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         binindex=binindex,
         bufsize=bufsize,
         chain=chain,
         whichmeasure=whichmeasure,
     )
Example #23
0
 def __init__(
     self,
     calculation_rate=None,
     bus=None,
     channel_count=None,
     clip=None,
     offset=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         bus=bus,
         channel_count=channel_count,
         clip=clip,
         offset=offset,
     )
Example #24
0
 def __init__(
     self,
     calculation_rate=None,
     keycode=0,
     lag=0.2,
     maxval=1,
     minval=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         keycode=keycode,
         lag=lag,
         maxval=maxval,
         minval=minval,
     )
 def __init__(
     self,
     calculation_rate=None,
     input_array=None,
     max_frames=4096,
     scope_frames=None,
     scope_num=0,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         input_array=input_array,
         max_frames=max_frames,
         scope_frames=scope_frames,
         scope_num=scope_num,
     )
 def __init__(
     self,
     calculation_rate=None,
     maximum=7,
     minimum=0,
     reset=0,
     resetval=None,
     step=1,
     trigger=0,
     ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         maximum=maximum,
         minimum=minimum,
         reset=reset,
         resetval=resetval,
         step=step,
         trigger=trigger,
         )
Example #27
0
    def __init__(
        self,
        calculation_rate=None,
        done_action=0,
        duration=1,
        initial_phase=0,
        loop=1,
        width=0.1,
    ):
        import supriya.synthdefs

        done_action = supriya.DoneAction.from_expr(done_action)
        UGen.__init__(
            self,
            calculation_rate=calculation_rate,
            done_action=done_action,
            duration=duration,
            initial_phase=initial_phase,
            loop=loop,
            width=width,
        )
 def __init__(
     self,
     calculation_rate=None,
     center=0,
     channel_count=4,
     in_array=None,
     level=1,
     level_comp=True,
     orientation=0.5,
     spread=1,
     width=2,
 ):
     UGen.__init__(
         self,
         calculation_rate=calculation_rate,
         center=center,
         channel_count=channel_count,
         in_array=in_array,
         level=level,
         level_comp=level_comp,
         orientation=orientation,
         spread=spread,
         width=width,
     )
Example #29
0
    def __init__(self, maximum=0):
        import supriya.synthdefs

        maximum = float(maximum)
        calculation_rate = supriya.CalculationRate.SCALAR
        UGen.__init__(self, calculation_rate=calculation_rate, maximum=maximum)
 def __init__(self, calculation_rate=None, source=None):
     if not (hasattr(source, "has_done_flag") and source.has_done_flag):
         raise ValueError(repr(source))
     UGen.__init__(self, calculation_rate=calculation_rate, source=source)