def parseData(self, strData, number=None): from music21.romanText import rtObjects from music21.romanText import translate as romanTextTranslate rtf = rtObjects.RTFile() # not sure why -- @UndefinedVariable rtHandler = rtf.readstr(strData) if rtHandler.definesMovements(): # this re-defines Score as an Opus self.stream = romanTextTranslate.romanTextToStreamOpus(rtHandler) else: romanTextTranslate.romanTextToStreamScore(rtHandler, self.stream)
def parseData(self, strData, number=None): ''' ''' from music21 import romanText as romanTextModule from music21.romanText import translate as romanTextTranslate rtf = romanTextModule.RTFile() rtHandler = rtf.readstr(strData) if rtHandler.definesMovements(): # this re-defines Score as an Opus self.stream = romanTextTranslate.romanTextToStreamOpus(rtHandler) else: romanTextTranslate.romanTextToStreamScore(rtHandler, self.stream)