-
Notifications
You must be signed in to change notification settings - Fork 0
Note
Chanan edited this page Aug 18, 2020
·
4 revisions
Note Class
Namespace: CW.Soloist.CompositionService.MusicTheory
Assembly: CW.Soloist.CompositionService.dll
Represents a single musical note instance.
Each note is represented by a note duration
and an absolute pitch,
which also determines it's name.
Implements INote.
internal class Note: INote
{
//internal static constants
private const int NumberOfUniqueChromaticNotes = 12;
private const int MidiMinimumPitchValue = 0;
private const int MidiMaximumPitchValue = 127;
// INote interface properties
public IDuration Duration { get; }
public NoteName? Name { get; }
public NotePitch Pitch { get; }
// Constructors
public Note(NotePitch pitch, IDuration duration) { ... }
public Note(NotePitch pitch, byte nominator, byte denominator) { ... }
public Note(NotePitch pitch) { ... }
// Methods
private static NoteName? GetNoteNameByNotePitch(NotePitch notePitch) { ... }
public override string ToString() { ... }
}
Signature | Description |
---|---|
Note(NotePitch,IDuration | Constructs a note based on the given pitch and duration. |
Note(NotePitch,byte,byte) | Constructs a notes based on the given pitch and duration's numerator and denominator. |
Note(NotePitch) | Constructs a note based on the given pitch and a default duration. |
Property Name | Type | Description |
---|---|---|
Name | NoteName | The note's name (for example "A"). |
Pitch | NotePitch | The note's absolute pitch. |
Duration | IDuration | The note's duration. |
Method Name | Return Type | Description |
---|---|---|
ToString | string | Returns A string representing the note's instance state. |
GetNoteNameByNotePitch | NoteName | Returns the note name which corresponds to the given note pitch. |
© Chanan Welt - Soloist
- Home
- Getting Started
- Design
- Business Logical Layer (CW.Soloist.CompositionService)
- Duration Representation
- IDuration
- Duration
- Duration Representation
- Data Access Layer
- Presentation Layer
- Business Logical Layer (CW.Soloist.CompositionService)