|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.ObjectjAudioFeatureExtractor.jAudioTools.DSPMethods
public class DSPMethods
A holder class for general static methods relating to processing signals in the form of samples stored as arrays of doubles.
コンストラクタの概要 | |
---|---|
DSPMethods()
|
メソッドの概要 | |
---|---|
static double[][] |
applyGain(double[][] samples,
double gain)
Applies a gain to the given samples. |
static double |
convertSampleToTime(int sample,
float sampling_rate)
Returns the time corresponding to the given sample indice with the given sampling rate. |
static int |
convertTimeToSample(double time,
float sampling_rate)
Returns the sample corresponding to the given time with the given sampling rate. |
static double[] |
getAutoCorrelation(double[] signal,
int min_lag,
int max_lag)
Calculates the auto-correlation of the given signal. |
static double[] |
getAutoCorrelationLabels(double sampling_rate,
int min_lag,
int max_lag)
Returns the bin labels for each bin of an auto-correlation calculation that involved the given paremeters (most likely using the getAutoCorrelation method). |
static double[][] |
getCopyOfSamples(double[][] original_samples)
Returns a copy of the given array of samples. |
static double[] |
getSamplesMixedDownIntoOneChannel(double[][] audio_samples)
Returns the given set of samples as a set of samples mixed down into one channel. |
static double[] |
normalizeSamples(double[] samples_to_normalize)
Normalizes the given samples so that the absolute value of the highest sample amplitude is 1. |
static double[][] |
normalizeSamples(double[][] samples_to_normalize)
Normalizes the given samples dependantly so that the absolute value of the highest sample amplitude is 1. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public DSPMethods()
メソッドの詳細 |
---|
public static double[][] applyGain(double[][] samples, double gain)
samples
- Audio samles to modify, usually with a minimum value
of -1 and a maximum value of +1. The first indice
corresponds to the channel and the second indice
corresponds to the sample number.gain
- The gain to apply.
public static double[] getSamplesMixedDownIntoOneChannel(double[][] audio_samples)
audio_samples
- Audio samles to modify, with a minimum value of
-1 and a maximum value of +1. The first indice
corresponds to the channel and the second indice
corresponds to the sample number.
public static double[] normalizeSamples(double[] samples_to_normalize)
samples_to_normalize
- The samples to normalize.
public static double[][] normalizeSamples(double[][] samples_to_normalize)
samples_to_normalize
- The samples to normalize. The first indice
denotes channel and the second denotes sample
number.
public static double[][] getCopyOfSamples(double[][] original_samples)
original_samples
- Audio samles to modify, usually with a minimum value of
value of- 1 and a maximum value of +1. The first indice
corresponds to the channel and the second indice
corresponds to the sample number.
public static int convertTimeToSample(double time, float sampling_rate)
time
- The time in seconds to convert to a sample indice.sampling_rate
- The sampling rate of the audio in question.
public static double convertSampleToTime(int sample, float sampling_rate)
sample
- The sample indice to convert to time.sampling_rate
- The sampling rate of the audio in question.
public static double[] getAutoCorrelation(double[] signal, int min_lag, int max_lag)
The getAutoCorrelationLabels method can be called to find the labels in Hz for each of the returned bins.
signal
- The digital signal to auto-correlate.min_lag
- The minimum lag in samples to look for in the auto-correlation.max_lag
- The maximum lag in samples to look for in the auto-correaltion.
public static double[] getAutoCorrelationLabels(double sampling_rate, int min_lag, int max_lag)
sampling_rate
- The sampling rate that was used to encode
the signal that was auto-correlated.min_lag
- The minimum lag in samples that was used in the
auto-correlation.max_lag
- The maximum lag in samples that was used in the
auto-correlation.
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |