Example #1
0
	def __init__(self, input, **config):
		self.dc = Signal()
		self.ac = Signal()

		super(DCBlock, self).__init__(**config)

		self.input = input
Example #2
0
    def init(self, input):
        self.input = input
        self.last_time = monotonic()

        self.time_diff = Signal()
        self.sample_rate = Signal()
        self.jitter = Signal()
Example #3
0
    def init(self, input):
        self.input = input

        self.output = Signal()
        self.bpm = Signal()
        self.gradient = Signal()
        self.pulse = Signal()

        self.last_beat = -1
        self.timestamp = 0
Example #4
0
    def init(self, input):
        self.input = input
        self.cnt = 0

        self.window = np.hanning(self.chunk_size)

        self.freq = Signal()
Example #5
0
    def init(self, input, sample_rate):
        self.input = input
        self.output = Signal()
        self.period = 1.0 / sample_rate

        self.buffer = []

        self.started = False
Example #6
0
    def __init__(self, sample_rate):
        super(TestClock, self).__init__()

        self.output = Signal()
        self.period = 1.0 / sample_rate

        #self.start(QtCore.QThread.HighestPriority)
        #self.start()
        threading.Thread(target=self.run).start()
Example #7
0
    def __init__(self, input, **config):
        self.output = Signal()

        super(Normalizer, self).__init__(**config)

        self.min = 0.0
        self.max = 1.0

        self.input = input
Example #8
0
    def init(self, name, input):
        self.FS = 250
        self.name = name

        epoch_samples = int(self.FS * self.epoch)

        self.signal = Signal(buffer_size=epoch_samples)
        self.passfail = Signal()
        self.ratio = Signal()

        self.threshold = 1.0
        self.high_threshold = 0.0

        self.calc_cnt = 0

        self.bar = QtGui.QProgressBar(orientation=QtCore.Qt.Vertical)
        self.slider = QtGui.QSlider()

        self.slider.setRange(0, 17)
        self.bar.setRange(0, 17)

        self.pass_palette = self.bar.palette()

        self.input = input

        if isinstance(self.input.color, QtGui.QColor):
            self.color = self.input.color
        else:
            self.color = QtGui.QColor(self.input.color)

        self.bar.setStyleSheet("""
			QProgressBar::chunk { background: red; }
			QProgressBar::chunk[pass='******'] { background: %s ; }
			""" % self.color.name())

        self.button = QtGui.QPushButton("config")
        self.button.clicked.connect(self.configure_traits)

        self._widget = ThresholdWidget(self)
Example #9
0
	def init(self, func, *args):
		# HACK: should not directly reference lupa here
		import lupa
		if lupa.lua_type(args) == 'table':
			args = args.values()


		print ('Expression: ', func, args)
		self.func = func
		self.args = list(args)
		
		self.output = Signal()

		# Workaround for list event bug 
		self.input = self.args[0]
Example #10
0
	def init(self, input):
		self.compute_filter()
		self.input = input

		self.output = Signal()
Example #11
0
	def __init__(self, input):
		self.output = Signal(buffer_size=1000)
		self.cnt = 0

		super(Trendline, self).__init__(input=input)
Example #12
0
	def __init__(self, input):
		self.output = Signal()
		self.average = 0.0
		self.factor = 0.99
		super(Averager, self).__init__(input=input)
Example #13
0
	def init(self, lo, hi, input):
		self.lo = lo
		self.hi = hi
		self.input = input
		self.output = Signal()
Example #14
0
	def init(self, input):
		self.output = Signal()
		self.input = input
Example #15
0
	def init(self, input):
		self.readjust()
		self.input = input
		self.output = Signal()
		self.delayed = Signal()
Example #16
0
 def register_channel(self, idx, channel_name):
     self.input_channels[idx] = Signal(name=channel_name)
Example #17
0
 def init(self):
     self.beat = Signal('Beat Event')
     self.bpm = Signal("Beats per Minute")