Table of Contents

Struct OrchestrationPartDefinition

Namespace
Celeritas.Core.Orchestration
Assembly
Celeritas.dll

Defines how a part is constrained and labeled: the range its notes are shifted into, and the name and kind it carries into the result.

public readonly record struct OrchestrationPartDefinition : IEquatable<OrchestrationPartDefinition>
Implements
Inherited Members

Remarks

Only Range touches the notes. Which notes a definition receives is decided by the slot it fills in OrchestrationOptions — see Map(NoteEvent[], OrchestrationOptions?) — and Kind and Name come out on the OrchestratedPart exactly as they went in. That was so before it was written down, but nothing said it, and a definition whose kind disagreed with its slot looked as though it should move the notes.

Constructors

OrchestrationPartDefinition(OrchestrationPartKind, string, InstrumentRange)

Defines how a part is constrained and labeled: the range its notes are shifted into, and the name and kind it carries into the result.

public OrchestrationPartDefinition(OrchestrationPartKind Kind, string Name, InstrumentRange Range)

Parameters

Kind OrchestrationPartKind

The role the part reports through Definition. It labels the part; it does not choose the part's notes — the slot in OrchestrationOptions does.

Name string

The part's display name, carried into the result unchanged.

Range InstrumentRange

The pitches the part's notes are shifted into, by octave while an octave of the pitch class fits, and clamped to the nearer bound when none does.

Remarks

Only Range touches the notes. Which notes a definition receives is decided by the slot it fills in OrchestrationOptions — see Map(NoteEvent[], OrchestrationOptions?) — and Kind and Name come out on the OrchestratedPart exactly as they went in. That was so before it was written down, but nothing said it, and a definition whose kind disagreed with its slot looked as though it should move the notes.

Properties

Kind

The role the part reports through Definition. It labels the part; it does not choose the part's notes — the slot in OrchestrationOptions does.

public OrchestrationPartKind Kind { get; init; }

Property Value

OrchestrationPartKind

Name

The part's display name, carried into the result unchanged.

public string Name { get; init; }

Property Value

string

Range

The pitches the part's notes are shifted into, by octave while an octave of the pitch class fits, and clamped to the nearer bound when none does.

public InstrumentRange Range { get; init; }

Property Value

InstrumentRange