public abstract class PitchFrameAnalyser extends PitchFrameProvider
Modifier and Type | Field and Description |
---|---|
protected FrameBasedAnalyser.FrameAnalysisResult[] |
analysisResults
Array containing the analysis results, filled by
analyseAllFrames() . |
protected DynamicWindow |
analysisWindow |
currPitchmark, cutFrame, periodLengths, periodsInMemory, pitchmarks, shiftPeriods, twoHalvesWindow
frame, frameLength, frameShift, frameStart, nextFrameStart, processor, samplingRate, signal, totalRead, validSamplesInFrame
Constructor and Description |
---|
PitchFrameAnalyser(DoubleDataSource signal,
DoubleDataSource pitchmarks,
int windowType,
int samplingRate)
Initialise a PitchFrameAnalyser.
|
PitchFrameAnalyser(DoubleDataSource signal,
DoubleDataSource pitchmarks,
int windowType,
int samplingRate,
int framePeriods,
int shiftPeriods)
Create a new PitchFrameAnalyser with a configurable number of pitch periods per frame and pitch periods to shift by.
|
Modifier and Type | Method and Description |
---|---|
abstract Object |
analyse(double[] frame)
Apply this PitchFrameAnalyser to the given data.
|
FrameBasedAnalyser.FrameAnalysisResult[] |
analyseAllFrames()
Analyse the entire signal as frames.
|
FrameBasedAnalyser.FrameAnalysisResult[] |
analyseAvailableFrames()
Analyse the currently available input signal as frames.
|
FrameBasedAnalyser.FrameAnalysisResult |
analyseNextFrame()
The public method to call in order to trigger the analysis of the next frame.
|
protected FrameBasedAnalyser.FrameAnalysisResult |
constructAnalysisResult(Object analysisResult) |
getCurrentFrame, getData, getFramePeriods, getNextFrame, getShiftPeriods, hasMoreData, main
getFrameLengthSamples, getFrameLengthTime, getFrameShiftSamples, getFrameShiftTime, getFrameStartSamples, getFrameStartTime, getSamplingRate, resetInternalTimer, stopWhenTouchingEnd, validSamplesInFrame
protected DynamicWindow analysisWindow
protected FrameBasedAnalyser.FrameAnalysisResult[] analysisResults
analyseAllFrames()
. Can be used for future reference to the
results.public PitchFrameAnalyser(DoubleDataSource signal, DoubleDataSource pitchmarks, int windowType, int samplingRate)
signal
- the signal source to read frompitchmarks
- the source of the pitchmarks, in seconds from the start of signalwindowType
- type of analysis window to use, Window.getAvailableTypes()
samplingRate
- the number of samples in one second.public PitchFrameAnalyser(DoubleDataSource signal, DoubleDataSource pitchmarks, int windowType, int samplingRate, int framePeriods, int shiftPeriods)
signal
- audio signalpitchmarks
- an array of pitchmarks; each pitch mark is in seconds from signal startwindowType
- type of analysis window to use, Window.getAvailableTypes()
samplingRate
- number of samples per second in signalframePeriods
- number of periods that each frame should containshiftPeriods
- number of periods that frames should be shifted bypublic FrameBasedAnalyser.FrameAnalysisResult analyseNextFrame()
public FrameBasedAnalyser.FrameAnalysisResult[] analyseAllFrames()
public FrameBasedAnalyser.FrameAnalysisResult[] analyseAvailableFrames()
public abstract Object analyse(double[] frame)
frame
- the data to analyse, which is expected to be the number of pitch periods requested from this PitchFrameAnalyser,
PitchFrameProvider.getFramePeriods()
.IllegalArgumentException
- if frame does not have the prescribed lengthprotected FrameBasedAnalyser.FrameAnalysisResult constructAnalysisResult(Object analysisResult)
Copyright © 2000–2016 DFKI GmbH. All rights reserved.