def setInitialPitch(self, pitch): if not self.language: self.setLanguage("nederlands") if not self.initialPitchSet: index = self.fromPitch.findText(pitch.output(self.language)) if index != -1: self.fromPitch.setCurrentIndex(index) self.toPitch.setCurrentIndex(index) self.initialPitchSet = True
def output(self, relativemode=False, language='nederlands'): if relativemode: pitch = self._pitch.copy() pitch.makeRelative(Note.LastPitch) Note.LastPitch.note = self._pitch.note Note.LastPitch.octave = self._pitch.octave else: pitch = self._pitch # also octavecheck if Shift is held return pitch.output(language) + (('='+ly.pitch.octaveToString(self._pitch.octave)) if QApplication.keyboardModifiers() & Qt.SHIFT else '')
def output(self, relativemode=False, language='nederlands'): if relativemode: pitch = self._pitch.copy() pitch.makeRelative(Note.LastPitch) Note.LastPitch.note = self._pitch.note Note.LastPitch.octave = self._pitch.octave else: pitch = self._pitch # also octavecheck if Shift is held return pitch.output(language) + ( ('=' + ly.pitch.octaveToString(self._pitch.octave)) if QApplication.keyboardModifiers() & Qt.SHIFT else '')