Exemple #1
0
 def checkExercise(self):
     theoryAnalyzer.setKeyMeasureMap(self.studentExercise,{0:'F'})
     theoryAnalyzer.identifyMotionType(self.studentExercise, self.pn['part1'],self.pn['part2'],dictKey='motionType')
     theoryAnalyzer.identifyScaleDegrees(self.studentExercise, self.pn['part1'],dictKey='p1ScaleDegrees')
     theoryAnalyzer.identifyHarmonicIntervals(self.studentExercise, self.pn['part1'],self.pn['part2'],dictKey='harmIntervals')
     
     scaleDegreeOffsetFunc = lambda resultObj: resultObj.n.offset
     scaleDegreeLyricTextFunc = lambda resultObj: resultObj.value
     
     self.compareMarkerLyricAnswer(self.studentExercise,taKey='p1ScaleDegrees',\
                             markerPartName='p1ScaleDegrees',\
                             offsetFunc = scaleDegreeOffsetFunc,\
                             lyricFunc = scaleDegreeLyricTextFunc)
     
     motionTypeOffsetFunc = lambda resultObj: resultObj.offset()
     motionTypeLyricTextFunc = lambda resultObj: resultObj.value[0]
     
     self.compareMarkerLyricAnswer(self.studentExercise,taKey='motionType',\
                             markerPartName='motionType',\
                             offsetFunc = motionTypeOffsetFunc,\
                             lyricFunc = motionTypeLyricTextFunc)
     
     harmonicIntervalOffsetFunc = lambda resultObj: resultObj.offset()
     
     harmonicIntervalTextFunc = lambda resultObj: resultObj.value 
     
     self.compareMarkerLyricAnswer(self.studentExercise,taKey='harmIntervals',\
                             markerPartName='harmIntervals',\
                             offsetFunc = harmonicIntervalOffsetFunc,\
                             lyricFunc = harmonicIntervalTextFunc)
Exemple #2
0
 def checkExercise(self):
     theoryAnalyzer.setKeyMeasureMap(self.studentExercise, {0:'G',5:'D',8:'F'})
     theoryAnalyzer.identifyHarmonicIntervals(self.studentExercise, self.pn['part1'],self.pn['part2'],dictKey='harmIntervals')
     theoryAnalyzer.identifyCommonPracticeErrors(self.studentExercise, self.pn['part1'],self.pn['part2'],dictKey='counterpointErrors')
             
     self.textResultString = theoryAnalyzer.getResultsString(self.studentExercise, ['counterpointErrors'])
     
     harmonicIntervalOffsetFunc = lambda resultObj: resultObj.offset()
     
     harmonicIntervalTextFunc = lambda resultObj: resultObj.value 
     self.compareMarkerLyricAnswer(self.studentExercise,taKey='harmIntervals',\
                             markerPartName='harmIntervals',\
                             offsetFunc = harmonicIntervalOffsetFunc, \
                             lyricFunc = harmonicIntervalTextFunc)