Skip to content

webmaster442.windowsterminal.musicstringbuilder

webmaster442 edited this page Jun 9, 2025 · 2 revisions

< Back


MusicStringBuilder

Namespace: Webmaster442.WindowsTerminal

DECPS music note builder

public sealed class MusicStringBuilder

Inheritance Object → MusicStringBuilder
Attributes NullableContextAttribute, NullableAttribute

Properties

RemainingNotes

Number of remaining notes. DECPS supports up to 16 notes

public int RemainingNotes { get; private set; }

Property Value

Int32

Constructors

MusicStringBuilder()

Creates a new music string builder

public MusicStringBuilder()

Methods

New()

Resets the internal state of the music string builder

public MusicStringBuilder New()

Returns

MusicStringBuilder
A MusicStringBuilder to chain formatting

AddNote(Int32, TimeSpan, Note)

Add a note to the music string

public MusicStringBuilder AddNote(int volume, TimeSpan duration, Note note)

Parameters

volume Int32
Note volume. Must be between 0 and 7. 0 - Silent, 7 - Lodest

duration TimeSpan
Note duration. Rounded to the nearest 1/32 seconds

note Note
Muiscal note to play

Returns

MusicStringBuilder
A MusicStringBuilder to chain formatting

Exceptions

InvalidOperationException
When there are no more remaining notes

ToString()

public string ToString()

Returns

String


< Back

Documentation

Clone this wiki locally