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