コード例 #1
0
ファイル: tinyNotation.py プロジェクト: 00gavin/music21
 def affectTokenAfterParse(self, n):
     '''
     puts a tuplet on the note
     '''
     super(TupletState, self).affectTokenAfterParse(n)
     newTup = duration.Tuplet()
     newTup.durationActual = duration.durationTupleFromTypeDots(n.duration.type, 0)
     newTup.durationNormal = duration.durationTupleFromTypeDots(n.duration.type, 0)
     newTup.numberNotesActual = self.actual
     newTup.numberNotesNormal = self.normal
     n.duration.appendTuplet(newTup)
     return n      
コード例 #2
0
ファイル: tinyNotation.py プロジェクト: Trzyszcz/Derp
 def affectTokenAfterParse(self, n):
     '''
     puts a tuplet on the note
     '''
     super(TupletState, self).affectTokenAfterParse(n)
     newTup = duration.Tuplet()
     newTup.durationActual = duration.durationTupleFromTypeDots(n.duration.type, 0)
     newTup.durationNormal = duration.durationTupleFromTypeDots(n.duration.type, 0)
     newTup.numberNotesActual = self.actual
     newTup.numberNotesNormal = self.normal
     n.duration.appendTuplet(newTup)
     return n