示例#1
0
 def parseFile(self, fp, number=None):
     from music21.romanText import rtObjects
     from music21.romanText import translate as romanTextTranslate
     rtf = rtObjects.RTFile() # not sure why -- @UndefinedVariable
     rtf.open(fp)
     # returns a handler instance of parse tokens
     rtHandler = rtf.read()
     rtf.close()
     romanTextTranslate.romanTextToStreamScore(rtHandler, self.stream)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 def parseFile(self, fp, number=None):
     '''
     '''
     from music21 import romanText as romanTextModule
     from music21.romanText import translate as romanTextTranslate
     rtf = romanTextModule.RTFile()
     rtf.open(fp)
     # returns a handler instance of parse tokens
     rtHandler = rtf.read()
     rtf.close()
     romanTextTranslate.romanTextToStreamScore(rtHandler, self.stream)
示例#5
0
 def parseFile(self, fp, number=None):
     '''
     '''
     from music21 import romanText as romanTextModule
     from music21.romanText import translate as romanTextTranslate
     rtf = romanTextModule.RTFile()
     rtf.open(fp)
     # returns a handler instance of parse tokens
     rtHandler = rtf.read()
     rtf.close()
     romanTextTranslate.romanTextToStreamScore(rtHandler, self.stream)
示例#6
0
 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)
示例#7
0
 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)