コード例 #1
0
ファイル: section.py プロジェクト: bennymartinson/torrent
class TopTremoloSection(Section):
    trem = None
    
    def _setup(self):
        events.listen('facing_front', self.front_shift)
        events.listen('facing_back', self.back_shift)
        self.front_pitches = [x+84 for x in 2,4,5,7,9,11,12,14]
        self.back_pitches = [x+84 for x in 1,3,5,7,8,10,12,13]
        self.trem = Tremolo(self.front_pitches, 30, crescendo=False)
    
    def front_shift(self):
        self.trem.pitches = self.front_pitches

    def back_shift(self):
        self.trem.pitches = self.back_pitches
    
    def _start(self):
        self.trem.start()
    
    def _stop(self):
        self.trem.stop()
        events.unlisten('facing_front', self.front_shift)
        events.unlisten('facing_back', self.back_shift)
コード例 #2
0
ファイル: section.py プロジェクト: bennymartinson/torrent
class TopTremoloSection(Section):
    trem = None

    def _setup(self):
        events.listen('facing_front', self.front_shift)
        events.listen('facing_back', self.back_shift)
        self.front_pitches = [x + 84 for x in 2, 4, 5, 7, 9, 11, 12, 14]
        self.back_pitches = [x + 84 for x in 1, 3, 5, 7, 8, 10, 12, 13]
        self.trem = Tremolo(self.front_pitches, 30, crescendo=False)

    def front_shift(self):
        self.trem.pitches = self.front_pitches

    def back_shift(self):
        self.trem.pitches = self.back_pitches

    def _start(self):
        self.trem.start()

    def _stop(self):
        self.trem.stop()
        events.unlisten('facing_front', self.front_shift)
        events.unlisten('facing_back', self.back_shift)
コード例 #3
0
ファイル: section.py プロジェクト: bennymartinson/torrent
 def _setup(self):
     events.listen('facing_front', self.front_shift)
     events.listen('facing_back', self.back_shift)
     self.front_pitches = [x+84 for x in 2,4,5,7,9,11,12,14]
     self.back_pitches = [x+84 for x in 1,3,5,7,8,10,12,13]
     self.trem = Tremolo(self.front_pitches, 30, crescendo=False)
コード例 #4
0
ファイル: section.py プロジェクト: bennymartinson/torrent
 def _setup(self):
     events.listen('facing_front', self.front_shift)
     events.listen('facing_back', self.back_shift)
     self.front_pitches = [x + 84 for x in 2, 4, 5, 7, 9, 11, 12, 14]
     self.back_pitches = [x + 84 for x in 1, 3, 5, 7, 8, 10, 12, 13]
     self.trem = Tremolo(self.front_pitches, 30, crescendo=False)