Skip to content

TriangleSoundChannel

AutumnSky1010 edited this page Jun 15, 2024 · 5 revisions

Class TriangleSoundChannel

Definition

Namespace: SoundMaker.Sounds.SoundChannels
Assembly: SoundMaker.dll

This generates triangle wave.

public class TriangleSoundChannel : SoundChannelBase

Inheritance

Object -> SoundChannelBase -> TriangleSoundChannel

Implements

Constructors

TriangleSoundChannel(int, SoundFormat, PanType, int)

Declaration

public TriangleSoundChannel(int tempo, SoundFormat format, PanType panType, int capacity)

Parameters

Type Desctiption
int Quarter note/rest per minute.
SoundFormat Format of the sound.
PanType Direction of hearing.
int The total number of sound components the internal data structure can hold without resizing.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
ArgumentOutOfRangeException Index must be non-negative and greater than 0.

TriangleSoundChannel(int, SoundFormat, PanType)

Declaration

public TriangleSoundChannel(int tempo, SoundFormat format, PanType panType)

Parameters

Type Desctiption
int Quarter note/rest per minute.
SoundFormat Format of the sound.
PanType Direction of hearing.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.

Methods

GenerateWave()

Declaration

public override ushort[] GenerateWave()

Returns

Type Desctiption
ushort[] The array of wave data.
Clone this wiki locally