Exemple #1
0
 def __init__(self, notes=[], tempo=96):
     self.notes = [note.frequency for note in notes]
     self.times = [note.time(tempo) for note in notes]
     self.amps = [note.amp for note in notes]
     self.tempo = tempo
     self._metro = Metro()
     self.amp = Iter(self._metro, self.amps, init=self.amps[0])
     self.time = Iter(self._metro, self.times, init=self.times[0])
     self._metro.setTime(self.time)
     self.signal = Iter(self._metro, self.notes)
     #triggers are only sent when amp is >0
     self.trigger = Ceil(self.amp * self._metro)