diff --git a/core/src/main/java/be/tarsos/dsp/pitch/PitchProcessor.java b/core/src/main/java/be/tarsos/dsp/pitch/PitchProcessor.java index b9e9145..69af003 100644 --- a/core/src/main/java/be/tarsos/dsp/pitch/PitchProcessor.java +++ b/core/src/main/java/be/tarsos/dsp/pitch/PitchProcessor.java @@ -124,6 +124,20 @@ public PitchProcessor(PitchEstimationAlgorithm algorithm, float sampleRate, detector = algorithm.getDetector(sampleRate, bufferSize); this.handler = handler; } + + /** + * Initialize a new pitch processor. + * + * @param detector + * The pitch detector to use. + * + * @param handler + * The handler handles detected pitch. + */ + public PitchProcessor(PitchDetector detector, PitchDetectionHandler handler) { + this.detector = detector; + this.handler = handler; + } @Override public boolean process(AudioEvent audioEvent) {