C# 클래스 Accord.Audio.Signal

Represents a PCM sound discrete signal (measured in time). A real discrete-time signal is defined as any real-valued function of the integers.

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave (a continuous-time signal) to a sequence of samples (a discrete-time signal).

A sample refers to a value or set of values at a point in time and/or space.

상속: IDisposable
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
CopyTo ( Array array ) : void

Copies this signal to a given array.

CopyTo ( double array ) : void

Copies this signal to a given array.

CopyTo ( float array ) : void

Copies this signal to a given array.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DurationOfSamples ( int samples, int samplingRate ) : int

Gets the duration of each sample in a signal with the given number of samples and sampling rate.

FromArray ( Array signal, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal

Creates a new Signal from a float array.

FromArray ( Array signal, int channels, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal

Creates a new Signal from a float array.

FromArray ( Array signal, int size, int channels, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal

Creates a new Signal from a float array.

GetEnergy ( ) : double

Computes the signal energy.

GetSample ( int channel, int position ) : float

Gets the value of the specified sample in the Signal.

GetSampleSize ( SampleFormat format ) : int

Gets the size (in bits) of a sample format.

NumberOfSamples ( int duration, int samplingRate ) : int

Gets the number of samples contained in a signal of given duration and sampling rate.

SetSample ( int channel, int position, float value ) : void

Sets the value of the specified sample in the Signal.

Signal ( byte data, int channels, int length, int sampleRate, SampleFormat format ) : System

Constructs a new signal.

Signal ( int channels, int length, int sampleRate, SampleFormat format ) : System

Constructs a new Signal.

ToComplex ( ) : ComplexSignal

Converts this signal to a ComplexSignal object.

ToDouble ( ) : double[]

Converts this signal into a array of floating-point samples.

ToFloat ( ) : float[]

Converts this signal into a array of floating-point samples.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

비공개 메소드들

메소드 설명
init ( byte data, int channels, int length, int sampleRate, SampleFormat format ) : void

메소드 상세

CopyTo() 공개 메소드

Copies this signal to a given array.
public CopyTo ( Array array ) : void
array System.Array
리턴 void

CopyTo() 공개 메소드

Copies this signal to a given array.
public CopyTo ( double array ) : void
array double
리턴 void

CopyTo() 공개 메소드

Copies this signal to a given array.
public CopyTo ( float array ) : void
array float
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed /// and unmanaged resources; false to release only unmanaged /// resources.
리턴 void

DurationOfSamples() 공개 정적인 메소드

Gets the duration of each sample in a signal with the given number of samples and sampling rate.
public static DurationOfSamples ( int samples, int samplingRate ) : int
samples int
samplingRate int
리턴 int

FromArray() 공개 정적인 메소드

Creates a new Signal from a float array.
public static FromArray ( Array signal, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal
signal System.Array
sampleRate int
format SampleFormat
리턴 Signal

FromArray() 공개 정적인 메소드

Creates a new Signal from a float array.
public static FromArray ( Array signal, int channels, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal
signal System.Array
channels int
sampleRate int
format SampleFormat
리턴 Signal

FromArray() 공개 정적인 메소드

Creates a new Signal from a float array.
public static FromArray ( Array signal, int size, int channels, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat ) : Signal
signal System.Array
size int
channels int
sampleRate int
format SampleFormat
리턴 Signal

GetEnergy() 공개 메소드

Computes the signal energy.
public GetEnergy ( ) : double
리턴 double

GetSample() 공개 메소드

Gets the value of the specified sample in the Signal.
public GetSample ( int channel, int position ) : float
channel int The channel's index of the sample to set.
position int The position of the sample to set.
리턴 float

GetSampleSize() 공개 정적인 메소드

Gets the size (in bits) of a sample format.
public static GetSampleSize ( SampleFormat format ) : int
format SampleFormat
리턴 int

NumberOfSamples() 공개 정적인 메소드

Gets the number of samples contained in a signal of given duration and sampling rate.
public static NumberOfSamples ( int duration, int samplingRate ) : int
duration int
samplingRate int
리턴 int

SetSample() 공개 메소드

Sets the value of the specified sample in the Signal.
public SetSample ( int channel, int position, float value ) : void
channel int The channel's index of the sample to set.
position int The position of the sample to set.
value float A floating-point value ranging from -1 to 1 /// specifying the value to set. Conversion will be done automatically /// to the underlying signal sample format if supported.
리턴 void

Signal() 공개 메소드

Constructs a new signal.
public Signal ( byte data, int channels, int length, int sampleRate, SampleFormat format ) : System
data byte The raw data for the signal.
channels int The number of channels for the signal.
length int The length of the signal.
sampleRate int The sample date of the signal.
format SampleFormat The sample format for the signal.
리턴 System

Signal() 공개 메소드

Constructs a new Signal.
public Signal ( int channels, int length, int sampleRate, SampleFormat format ) : System
channels int The number of channels for the signal.
length int The length of the signal.
sampleRate int The sample date of the signal.
format SampleFormat The sample format for the signal.
리턴 System

ToComplex() 공개 메소드

Converts this signal to a ComplexSignal object.
public ToComplex ( ) : ComplexSignal
리턴 ComplexSignal

ToDouble() 공개 메소드

Converts this signal into a array of floating-point samples.
public ToDouble ( ) : double[]
리턴 double[]

ToFloat() 공개 메소드

Converts this signal into a array of floating-point samples.
public ToFloat ( ) : float[]
리턴 float[]