How to use the pyo.TrigFunc function in pyo

To help you get started, we’ve selected a few pyo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexandrepoirier / PyoSynth / Pyo Synth 0.1.0b / resources / __future__ / tools.py View on Github external
def reinit(self, signal, rate=1/25.):
        self._tablerec.stop()
        self._sig = signal
        self._chnls = len(signal)
        self._calcChnlHeight()
        self._table = NewTable(rate, self._chnls)
        self._tablerec = TableRec(self._sig*self._vzoom, self._table)
        self._trigDraw = TrigFunc(self._tablerec['trig'], self._processBuffer)
        self._drawBackground()
        self.start()
github wehr-lab / autopilot / core / sounds.py View on Github external
def set_trigger(self, trig_fn):
        # Using table triggers...
        self.trigger = pyo.TrigFunc(self.table['trig'], trig_fn)
github wehr-lab / autopilot / stim / sound / sounds.py View on Github external
def set_trigger(self, trig_fn):
            """

            :param trig_fn:
            """
            # Using table triggers, call trig_fn when table finishes playing
            self.trigger = pyo.TrigFunc(self.table['trig'], trig_fn)
github wehr-lab / autopilot / stim / sound / pyoserver.py View on Github external
def set_trigger(self, trig_fn):
        """

        :param trig_fn:
        """
        # Using table triggers, call trig_fn when table finishes playing
        self.trigger = pyo.TrigFunc(self.table['trig'], trig_fn)
github alexandrepoirier / PyoSynth / Pyo Synth 0.1.0b / resources / __future__ / __main___-integration-tabwindow.py View on Github external
#ParamBoxes
        self.boxes_list = []
        self._createBoxes(numControls)

        #server setup
        self.serverSetupPanel = ServerSetupPanel(self, server)
        self.menu_panel.setServerPanel(self.serverSetupPanel)
        
        #update the quick info zone
        self.menu_panel.snd_card_ctrl.DoSetText(self.serverSetupPanel.getOutputInterface())
        self.menu_panel.updateSampRateBufSizeTxt()
        
        #Rafraichissement ecran des valeurs
        self.rate = Metro(config.REFRESH_RATE)
        self.trig_func = TrigFunc(self.rate, self._refresh)
        
        self.Bind(wx.EVT_MOVE, self.OnMove)
        self.Bind(wx.EVT_CLOSE, self.OnQuit)
        self.Bind(EVT_INTERFACE_CHANGED, self.updateInterfaceText)
        self.Bind(EVT_SAMP_RATE_CHANGED, self.updateSampRateBfsText)
        self.Bind(EVT_BUFSIZE_CHANGED, self.updateSampRateBfsText)
        self.Bind(EVT_NCHNLS_CHANGED, self.updateNchnls)
        self.Bind(buttons.EVT_BTN_RUN, self._prepareToRunScript)
github alexandrepoirier / PyoSynth / Pyo Synth 0.1.0b / resources / controls.py View on Github external
self._max = max
        self._range = float(max)-min
        self._value = init if init != None else self._range/2
        self._lastValue = self._value
        self._val_prec = valprec
        self._bmp_margin = 0
        self._textMargin = 0
        self._clickPos = None
        self._mouseRatio = float(ratio)
        self.ctl_num = 74
        self._callback = None
        
        #objs audio
        self._midictl = Midictl(self.ctl_num, self._min, self._max)
        self._change = Change(self._midictl).stop()
        self._trigFunc = TrigFunc(self._change, self._setValueFromCtl).stop()
        
        #variables trigo pour le dessin de l'indicateur
        self._minRad = 5*math.pi/4
        self._maxRad = 7*math.pi/4
        self._rangeRad = 2*math.pi-(self._maxRad-self._minRad)
        self._rayon = 8
        self._calcTheta = lambda x:self._minRad-(self._rangeRad*x)
        self._calcX = lambda x:(self._rayon*2)+(math.cos(self._calcTheta(x))*self._rayon)+self._bmpMargin
        self._calcY = lambda x:(self._rayon*2)-(math.sin(self._calcTheta(x))*self._rayon)
        
        #state variable
        self.MIDI_LEARN = False
        self.IS_CONTROLLED = False
        self.SHOW_VALUE = False
        self._clicked = False
github wehr-lab / autopilot / sound / sounds.py View on Github external
def set_trigger(self, trig_fn):
        # Using table triggers, call trig_fn when table finishes playing
        self.trigger = pyo.TrigFunc(self.table['trig'], trig_fn)