public class RealAudioMatrix extends Object implements AudioMatrix
AudioMatrix
representing exclusively real values.Constructor and Description |
---|
RealAudioMatrix(int frameNumber,
Matrix realData,
AudioFormat audioFormat) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates an exact copy of this buffer.
|
AudioBuffer |
derive(float[] real,
float[] imaginary)
Creates a copy of this buffer, but replaces its values with the given real and imaginary data.
|
AudioMatrix |
derive(Matrix real,
Matrix imaginary)
Derives a new matrix from this matrix using the same audio format etc, but
different data.
|
boolean |
equals(Object o) |
AudioFormat |
getAudioFormat()
Describes the audio data contained in this buffer.
|
float[] |
getData()
Access to the first row.
|
float |
getData(int row,
int column)
Access to a value given its row and column.
|
int |
getFrameNumber()
Number of the first frame at the beginning of this buffer.
|
float[] |
getImaginaryData()
Imaginary part of the data contained in this buffer.
|
float[] |
getMagnitudes()
Magnitudes (square root of the powers).
|
int |
getNumberOfColumns()
Number of columns.
|
int |
getNumberOfRows()
Number of rows.
|
int |
getNumberOfSamples()
Returns the number of samples this buffer was built from.
|
float[] |
getPowers()
Powers (sum of the squares of the real and imaginary part).
|
float[] |
getRealData()
Access to the first row.
|
float |
getRealData(int row,
int column)
Access to a value given its row and column.
|
long |
getTimestamp()
Time from the beginning of the track to the beginning of this buffer in ms.
|
long |
getTimestamp(TimeUnit timeUnit)
Time from the beginning of the track to the beginning of this buffer in the requested unit.
|
int |
hashCode() |
String |
toString() |
public RealAudioMatrix(int frameNumber, Matrix realData, AudioFormat audioFormat)
public float getData(int row, int column)
AudioMatrix
getData
in interface AudioMatrix
row
- rowcolumn
- columnpublic float getRealData(int row, int column)
AudioMatrix
getRealData
in interface AudioMatrix
row
- rowcolumn
- columnpublic long getTimestamp()
AudioBuffer
AudioBuffer.getTimestamp(java.util.concurrent.TimeUnit)
with a
finer unit.
If we didn't start reading at the beginning of the file (i.e. timestamp == 0),
the offset may not be 100% precise.getTimestamp
in interface AudioBuffer
AudioBuffer.getFrameNumber()
,
AudioBuffer.getTimestamp(java.util.concurrent.TimeUnit)
public long getTimestamp(TimeUnit timeUnit)
AudioBuffer
getTimestamp
in interface AudioBuffer
timeUnit
- time unitAudioBuffer.getTimestamp()
public int getFrameNumber()
AudioBuffer
AudioBuffer.getTimestamp()
, this method may not be the most accurate, if you didn't
start reading at the beginning of the file.getFrameNumber
in interface AudioBuffer
AudioBuffer.getTimestamp()
,
AudioFormat
public AudioFormat getAudioFormat()
AudioBuffer
getAudioFormat
in interface AudioBuffer
public float[] getData()
AudioMatrix
getData
in interface AudioBuffer
getData
in interface AudioMatrix
AbstractAudioSpectrum.getData()
public float[] getRealData()
AudioMatrix
getRealData
in interface AudioBuffer
getRealData
in interface AudioMatrix
public float[] getImaginaryData()
AudioBuffer
getImaginaryData
in interface AudioBuffer
public float[] getPowers()
AudioBuffer
getPowers
in interface AudioBuffer
AudioBuffer.getMagnitudes()
public float[] getMagnitudes()
AudioBuffer
getMagnitudes
in interface AudioBuffer
AudioBuffer.getPowers()
public int getNumberOfSamples()
AudioBuffer
getNumberOfSamples
in interface AudioBuffer
public int getNumberOfColumns()
AudioMatrix
getNumberOfColumns
in interface AudioMatrix
public int getNumberOfRows()
AudioMatrix
getNumberOfRows
in interface AudioMatrix
public AudioBuffer derive(float[] real, float[] imaginary)
AudioBuffer
derive
in interface AudioBuffer
real
- real dataimaginary
- imaginary datapublic AudioMatrix derive(Matrix real, Matrix imaginary)
AudioMatrix
derive
in interface AudioMatrix
real
- real dataimaginary
- imaginary datapublic Object clone() throws CloneNotSupportedException
AudioBuffer
clone
in interface AudioBuffer
clone
in class Object
CloneNotSupportedException
Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.