|
@@ -440,7 +440,11 @@ public class SoundCompareHandler implements WebSocketEventHandler {
|
|
|
musicXmlInfo.setAvgFrequency(avgPitch.floatValue());
|
|
|
intonationRight = score>70;
|
|
|
|
|
|
- integrityValidNum = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<5).count();
|
|
|
+ if(score>0){
|
|
|
+ integrityValidNum = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<5).count();
|
|
|
+ }else{
|
|
|
+ integrityValidNum = 0;
|
|
|
+ }
|
|
|
}
|
|
|
//完成度
|
|
|
if(integrityValidNum > compareNum){
|