public class PitchResyntheziser extends java.lang.Object implements PitchDetectionHandler
PitchEstimationAlgorithm algo = PitchEstimationAlgorithm.FFT_YIN;
PitchResyntheziser prs = new PitchResyntheziser(samplerate);
AudioDispatcher dispatcher = AudioDispatcher.fromFile(new File("in.wav"),1024, 0);
//Handle pitch detection
dispatcher.addAudioProcessor(new PitchProcessor(algo, samplerate, size, prs));
//Write the synthesized pitch to an output file.
dispatcher.addAudioProcessor(new WaveformWriter(format, "out.wav"));//
dispatcher.run();
Constructor and Description |
---|
PitchResyntheziser(float samplerate) |
PitchResyntheziser(float samplerate,
boolean followEnvelope,
boolean pureSine) |
PitchResyntheziser(float samplerate,
boolean followEnvelope,
boolean pureSine,
int filterSize) |
Modifier and Type | Method and Description |
---|---|
void |
handlePitch(PitchDetectionResult pitchDetectionResult,
AudioEvent audioEvent)
Handle a detected pitch.
|
public PitchResyntheziser(float samplerate)
public PitchResyntheziser(float samplerate, boolean followEnvelope, boolean pureSine)
public PitchResyntheziser(float samplerate, boolean followEnvelope, boolean pureSine, int filterSize)
public void handlePitch(PitchDetectionResult pitchDetectionResult, AudioEvent audioEvent)
PitchDetectionHandler
handlePitch
in interface PitchDetectionHandler