Skip to content

TriangleWave

AutumnSky1010 edited this page Dec 15, 2022 · 5 revisions

Class TriangleWave

Definition

Namespace: SoundMaker.Sounds.WaveTypes
Assembly: SoundMaker.dll

The triangle wave.

public class TriangleWave : WaveTypeBase

Inheritance

Object -> WaveTypeBase -> TriangleWave

Methods

GenerateWave(SoundFormat, int, int, double)

Declaration

public ushort[] GenerateWave(SoundFormat format, int length, int volume, double hertz)

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Returns

Type Desctiption
ushort[] The array of wave data.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.

[Obsolete]GenerateWave(SoundFormat, int, int, int, double)

Attention
GenerateWave(SoundFormat, int, int, int, double)' will be deleted because int tempo` is unnecessary argument.
Declaration

[Obsolete]
public ushort[] GenerateWave(SoundFormat format, int tempo, int length, int volume, double hertz)

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Quarter note/rest per minute.
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Returns

Type Desctiption
ushort[] The array of wave data.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.
Clone this wiki locally