|
@@ -420,7 +420,7 @@ public class SoundCompareHandler implements WebSocketEventHandler {
|
|
|
//音准、完成度
|
|
|
if (cadenceRight && !CollectionUtils.isEmpty(measureSoundPitchInfos)){
|
|
|
//音准
|
|
|
- Double avgPitch = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<5).collect(Collectors.averagingDouble(pitch -> pitch.getFrequency()));
|
|
|
+ Double avgPitch = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<15).collect(Collectors.averagingDouble(pitch -> pitch.getFrequency()));
|
|
|
//音分
|
|
|
double recordCents = 0;
|
|
|
if (avgPitch > 0){
|
|
@@ -441,7 +441,7 @@ public class SoundCompareHandler implements WebSocketEventHandler {
|
|
|
intonationRight = score>70;
|
|
|
|
|
|
if(score>0){
|
|
|
- integrityValidNum = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<5).count();
|
|
|
+ integrityValidNum = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<15).count();
|
|
|
}else{
|
|
|
integrityValidNum = 0;
|
|
|
}
|