示例#1
0
 def set_pitches(self, pitches, velocity):
     for pitch, rhythm in zip(pitches, self.rhythms):
         midi.unlockPitch(rhythm.pitch)
         rhythm.pitch = pitch
         midi.lockPitch(rhythm.pitch, 'rhythm')
         rhythm.loud = min(max(velocity+10,20),127)
         rhythm.quiet = min(max(velocity-20, 10),100)
示例#2
0
 def set_pitches(self, pitches, velocity):
     for pitch, rhythm in zip(pitches, self.rhythms):
         midi.unlockPitch(rhythm.pitch)
         rhythm.pitch = pitch
         midi.lockPitch(rhythm.pitch, 'rhythm')
         rhythm.loud = min(max(velocity + 10, 20), 127)
         rhythm.quiet = min(max(velocity - 20, 10), 100)
示例#3
0
 def _stop(self):
     self.ictus.stop()
     for r in self.rhythms:
         r.stop()
         midi.unlockPitch(r.pitch)
示例#4
0
 def _stop(self):
     self.ictus.stop()
     for r in self.rhythms:
         r.stop()
         midi.unlockPitch(r.pitch)