Skip to content
AutumnSky1010 edited this page Dec 10, 2022 · 3 revisions

Class Tuplet

Definition

Namespace: SoundMaker.Sounds.Score
Assembly: SoundMaker.dll

The tuplet.

public class Tuplet : ISoundComponent

Inheritance

Object -> Tuplet

Implements

Constructors

Tuplet(IReadOnlyList<ISoundComponent>, LengthType, bool)

Declaration

public Tuplet(IReadOnlyList<ISoundComponent> tupletComponents, LengthType length, bool isDotted = false)

Parameters

Type Desctiption
IReadOnlyList<ISoundComponent> Components to be tuplet.
LengthType Length of the additional note/rest. (ex. "quarter" note)
bool Is the additional note/rest dotted.

Properties

Item

Declaration

public ISoundComponent this[int index] { get; }

Parameters

Type Desctiption
int Index of sound components.

Property Value

Type Desctiption
ISoundComponent The component at index.

Length

Declaration

public LengthType Length { get; }

Property Value

Type Desctiption
LengthType Length (ex. "quarter" note)

IsDotted

Declaration

public bool IsDotted { get; }

Property Value

Type Desctiption
bool Is the tuplet dotted.

Count

Declaration

public int Count { get; }

Property Value

Type Desctiption
int Count of tuplet components.

Methods

GenerateWave(SoundFormat, int, int, WaveTypeBase)

Declaration

public ushort[] GenerateWave(SoundFormat format, int tempo, int length, WaveTypeBase waveType);

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Quarter note/rest per minute.
int Length of the array.
WaveTypeBase Type of wave.

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.

GenerateWave(SoundFormat, int, WaveTypeBase)

Declaration

public ushort[] GenerateWave(SoundFormat format, int tempo, WaveTypeBase waveType);

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Quarter note/rest per minute.
WaveTypeBase Type of wave.

Returns

Type Desctiption
ushort[] The array of wave data.

Exceptions

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

GetWaveArrayLength(SoundFormat, int)

Declaration

public int GetWaveArrayLength(SoundFormat format, int tempo)

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Quarter note/rest per minute.

Returns

Type Desctiption
int Length of the sound array.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
Clone this wiki locally