|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.hogent.tarsos.dsp.pitch.Yin
public final class Yin
An implementation of the AUBIO_YIN pitch tracking algorithm. See the YIN paper. Implementation based on aubio
Field Summary | |
---|---|
static int |
DEFAULT_BUFFER_SIZE
The default size of an audio buffer (in samples). |
static int |
DEFAULT_OVERLAP
The default overlap of two consecutive audio buffers (in samples). |
Constructor Summary | |
---|---|
Yin(float audioSampleRate,
int bufferSize)
Create a new pitch detector for a stream with the defined sample rate. |
|
Yin(float audioSampleRate,
int bufferSize,
double yinThreshold)
Create a new pitch detector for a stream with the defined sample rate. |
Method Summary | |
---|---|
PitchDetectionResult |
getPitch(float[] audioBuffer)
The main flow of the YIN algorithm. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_OVERLAP
Constructor Detail |
---|
public Yin(float audioSampleRate, int bufferSize)
audioSampleRate
- The sample rate of the audio stream. E.g. 44.1 kHz.bufferSize
- The size of a buffer. E.g. 1024.public Yin(float audioSampleRate, int bufferSize, double yinThreshold)
audioSampleRate
- The sample rate of the audio stream. E.g. 44.1 kHz.bufferSize
- The size of a buffer. E.g. 1024.yinThreshold
- The parameter that defines which peaks are kept as possible
pitch candidates. See the YIN paper for more details.Method Detail |
---|
public PitchDetectionResult getPitch(float[] audioBuffer)
getPitch
in interface PitchDetector
audioBuffer
- The buffer with audio information. The information in the
buffer is not modified so it can be (re)used for e.g. FFT
analysis.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |