C# Класс LitDev.LDWaveForm

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
bLoop bool

Открытые методы

Метод Описание
PlayDX7 ( Primitive channels ) : Primitive

Play DX7.

PlayHarmonics ( Primitive frequency, Primitive duration, Primitive harmonics ) : Primitive

Play a user defined wave form as a sum of harmonics.

PlaySineWave ( Primitive frequency, Primitive duration ) : Primitive

Play a Sine wave form.

PlaySquareWave ( Primitive frequency, Primitive duration ) : Primitive

Play a square wave form.

PlayWavFile ( Primitive fileName, Primitive duration ) : Primitive

Play a wav file.

PlayWave ( Primitive frequency, Primitive duration, Primitive waveform ) : Primitive

Play a user defined wave form.

Stop ( Primitive waveName ) : void

Stop a playing sound.

Приватные методы

Метод Описание
DoPlay ( Object obj ) : void
Initialise ( ) : void
NextName ( ) : string
_Play ( double frequency, double duration, int iType ) : string
_PlayDX7 ( Primitive channels ) : string
_PlayHarmonics ( double frequency, double duration, Primitive harmonics ) : string
_PlayWavFile ( string fileName, double duration ) : string
_PlayWave ( double frequency, double duration, Primitive waveform ) : string

Описание методов

PlayDX7() публичный статический Метод

Play DX7.
public static PlayDX7 ( Primitive channels ) : Primitive
channels Primitive An array of values for each channel (values between 0 and 1, usually 8 channels).
Результат Primitive

PlayHarmonics() публичный статический Метод

Play a user defined wave form as a sum of harmonics.
public static PlayHarmonics ( Primitive frequency, Primitive duration, Primitive harmonics ) : Primitive
frequency Primitive Frequency (HZ).
duration Primitive Duration (ms). If this is negative then the waveform is repeated (-duration) times.
harmonics Primitive Harmonic amplitudes. /// This is an array, where the index is a harmonic multiple of the base frequency (2, 3, etc) and the value is the relative amplitude of the harmonic. /// A square wave can be formed by (https://en.wikipedia.org/wiki/Square_wave): /// For i = 3 To 21 Step 2 /// harmonics[i] = 1/i /// EndFor /// squareWave = LDWaveForm.PlayHarmonics(256,1000,harmonics)
Результат Primitive

PlaySineWave() публичный статический Метод

Play a Sine wave form.
public static PlaySineWave ( Primitive frequency, Primitive duration ) : Primitive
frequency Primitive Frequency (HZ).
duration Primitive Duration (ms). If this is negative then the waveform is repeated (-duration) times.
Результат Primitive

PlaySquareWave() публичный статический Метод

Play a square wave form.
public static PlaySquareWave ( Primitive frequency, Primitive duration ) : Primitive
frequency Primitive Frequency (HZ).
duration Primitive Duration (ms). If this is negative then the waveform is repeated (-duration) times.
Результат Primitive

PlayWavFile() публичный статический Метод

Play a wav file.
public static PlayWavFile ( Primitive fileName, Primitive duration ) : Primitive
fileName Primitive The *.wav file.
duration Primitive Duration (ms). If this is negative then the waveform is repeated (-duration) times.
Результат Primitive

PlayWave() публичный статический Метод

Play a user defined wave form.
public static PlayWave ( Primitive frequency, Primitive duration, Primitive waveform ) : Primitive
frequency Primitive Frequency (HZ).
duration Primitive Duration (ms). If this is negative then the waveform is repeated (-duration) times.
waveform Primitive Form for the repeating wave. /// This is an array, where the index is an increasing relative time (the actual value is normalised to the frequency) and the value is an amplitude (-1 to 1). /// Example of a triangular wave would be "0=-1;1=1;2=-1;"
Результат Primitive

Stop() публичный статический Метод

Stop a playing sound.
public static Stop ( Primitive waveName ) : void
waveName Primitive The sound wave name.
Результат void

Описание свойств

bLoop публичное статическое свойство

public static bool bLoop
Результат bool