-
Notifications
You must be signed in to change notification settings - Fork 0
Chord
Chanan edited this page Aug 18, 2020
·
1 revision
Chord Class
Namespace: CW.Soloist.CompositionService.MusicTheory
Assembly: CW.Soloist.CompositionService.dll
Represents a single musical chord instance.
Each chord is represented by a chord root, a chord type and a chord duration.
Implements IChord.
public class Chord : IChord
{
// IChord interface properties
NoteName ChordRoot { get; }
ChordType ChordType { get; }
IDuration Duration { get; set; }
// IChord interface methods
IEnumerable<NotePitch> GetArpeggioNotes(int minOctave, int maxOctave) { ... }
IEnumerable<NotePitch> GetArpeggioNotes(NotePitch minPitch, NotePitch maxPitch) { ... }
IEnumerable<NotePitch> GetScaleNotes(int minOctave, int maxOctave) { ... }
IEnumerable<NotePitch> GetScaleNotes(NotePitch minPitch, NotePitch maxPitch) { ... }
// Constructor
public Chord(NoteName root, ChordType type, IDuration duration) { ... }
// ToString method
public override string ToString() => return $"{{Root={ChordRoot}; ChordType={ChordType}; Duration={Duration}}}";
}
Property Name | Type | Description |
---|---|---|
ChordRoot | NoteName | Name of the note which is the root of the chord. |
ChordType | ChordType | The chord's type. |
Duration | IDuration | The chord's duration. |
Method Name | Return Type | Description |
---|---|---|
GetArpeggioNotes | IEnumerable<NotePitch> | Returns notes that correspond to the given chord's structure. |
GetScaleNotes | IEnumerable<NotePitch> | Returns notes that of the scale mapped to the given chord. |
ToString | string | Returns a string representation the given chord's state. |
© 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)