Package ca.phon.audio
Class AbstractSampled
java.lang.Object
ca.phon.audio.AbstractSampled
- All Implemented Interfaces:
Sampled
- Direct Known Subclasses:
ArraySampled
,AudioFileSampled
,ChannelFilteredSampled
,EmptySampled
,MonoSampled
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
getWindowExtrema
(float firstTime, float endTime) double[]
getWindowExtrema
(int channel, float startTime, float endTime) Get min/max values for specified time rangevoid
getWindowExtrema
(int channel, float startTime, float endTime, double[] extrema) Get min/max values for specified time rangedouble[][]
getWindowExtrema
(int firstSample, int lastSample) double[]
getWindowExtrema
(int channel, int firstSample, int lastSample) Get the miminum and maximum values for the specified sample rangevoid
getWindowExtrema
(int channel, int firstSample, int lastSample, double[] extrema) Get min/max values for specified windowdouble
maximumValue
(int channel, float startTime, float endTime) Get the maximum value for the specified time rangedouble
maximumValue
(int channel, int firstSample, int lastSample) Get the maximum value for the specified sample rangedouble
minimumValue
(int channel, int firstSample, int lastSample) Get the minimum value for the specified sample rangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.phon.audio.Sampled
close, getEndTime, getLength, getNumberOfChannels, getNumberOfSamples, getSampleRate, getStartTime, loadSampleData, sampleForTime, valueForSample, valueForTime
-
Constructor Details
-
AbstractSampled
public AbstractSampled()
-
-
Method Details
-
maximumValue
public double maximumValue(int channel, int firstSample, int lastSample) Description copied from interface:Sampled
Get the maximum value for the specified sample range- Specified by:
maximumValue
in interfaceSampled
- Returns:
- maximum value for specified range
-
maximumValue
public double maximumValue(int channel, float startTime, float endTime) Description copied from interface:Sampled
Get the maximum value for the specified time range- Specified by:
maximumValue
in interfaceSampled
- Returns:
- maximum value for specified range
-
minimumValue
public double minimumValue(int channel, int firstSample, int lastSample) Description copied from interface:Sampled
Get the minimum value for the specified sample range- Specified by:
minimumValue
in interfaceSampled
- Returns:
- minimum value for specified range
-
getWindowExtrema
public double[][] getWindowExtrema(int firstSample, int lastSample) - Specified by:
getWindowExtrema
in interfaceSampled
-
getWindowExtrema
public double[] getWindowExtrema(int channel, int firstSample, int lastSample) Description copied from interface:Sampled
Get the miminum and maximum values for the specified sample range- Specified by:
getWindowExtrema
in interfaceSampled
- Returns:
- min/max values for range
-
getWindowExtrema
public void getWindowExtrema(int channel, int firstSample, int lastSample, double[] extrema) Description copied from interface:Sampled
Get min/max values for specified window- Specified by:
getWindowExtrema
in interfaceSampled
-
getWindowExtrema
public double[][] getWindowExtrema(float firstTime, float endTime) - Specified by:
getWindowExtrema
in interfaceSampled
-
getWindowExtrema
public double[] getWindowExtrema(int channel, float startTime, float endTime) Description copied from interface:Sampled
Get min/max values for specified time range- Specified by:
getWindowExtrema
in interfaceSampled
- Returns:
- min/max values for specified range
-
getWindowExtrema
public void getWindowExtrema(int channel, float startTime, float endTime, double[] extrema) Description copied from interface:Sampled
Get min/max values for specified time range- Specified by:
getWindowExtrema
in interfaceSampled
- Parameters:
extrema
- an array of double[2] where the data will be stored
-