@Ignore @Test public void testNoConfidence() { List<SoundEvent> pitch = new ArrayList<SoundEvent>(); pitch.add(new SoundEvent(0.00f, 440)); pitch.add(new SoundEvent(0.01f, 440)); pitch.add(new SoundEvent(0.02f, 440)); float timeWindow = 0.050f; ConfidenceEvaluator evaluator = new ConfidenceEvaluator(); evaluator.compute(pitch, timeWindow); assertNoConfidence(pitch); }
public void compute(List<SoundEvent> pitch, double timeWindow) { for (int i = 0; i < pitch.size(); i++) { int winStop = i; int winStart = getPreviousWindowStart(pitch, i, timeWindow); if(hasMoreThanOctaveRangeForWindow(pitch, winStart, winStop)){ pitch.get(i).confidence = 0; } } }
ConfidenceEvaluator { public void compute(List<SoundEvent> pitch, double timeWindow) { for (int i = 0; i < pitch.size(); i++) { int winStop = i; int winStart = getPreviousWindowStart(pitch, i, timeWindow); if(hasMoreThanOctaveRangeForWindow(pitch, winStart, winStop)){ pitch.get(i).confidence = 0; } } } }
ConfidenceEvaluator { public void compute(List<SoundEvent> pitch, double timeWindow) { for (int i = 0; i < pitch.size(); i++) { int winStop = i; int winStart = getPreviousWindowStart(pitch, i, timeWindow); if(hasMoreThanOctaveRangeForWindow(pitch, winStart, winStop)){ pitch.get(i).confidence = 0; } } }  }
ConfidenceEvaluator { public void compute(List<SoundEvent> pitch, double timeWindow) { for (int i = 0; i < pitch.size(); i++) { int winStop = i; int winStart = getPreviousWindowStart(pitch, i, timeWindow); if(hasMoreThanOctaveRangeForWindow(pitch, winStart, winStop)){ pitch.get(i).confidence = 0; } } }  void compute(List<SoundEvent> pitch, double timeWindow); }
ConfidenceEvaluator { public void compute(List<SoundEvent> pitch, double timeWindow) { for (int i = 0; i < pitch.size(); i++) { int winStop = i; int winStart = getPreviousWindowStart(pitch, i, timeWindow); if(hasMoreThanOctaveRangeForWindow(pitch, winStart, winStop)){ pitch.get(i).confidence = 0; } } }  void compute(List<SoundEvent> pitch, double timeWindow);  }