Skip to content
Chanan edited this page Aug 19, 2020 · 2 revisions

IBar Interface

Namespace: CW.Soloist.CompositionService.MusicTheory
Assembly: CW.Soloist.CompositionService.dll


Summary

Represents a single musical bar in a musical piece.

Each bar contains the following properties:

  • time signature which represents the number of beats in the bar and the duration of each beat.
  • List of chords which represent the harmony in the current bar.
  • List of notes which represent the melody notes in the current bar.

Defintion

public interface IBar
{
    // properties 
    IDuration TimeSignature { get; }
    IList<IChord> Chords { get; }
    IList<INote> Notes { get; set; }
    
    // methods 
    IList<IChord> GetOverlappingChordsForNote(int noteIndex);
    IList<INote> GetOverlappingNotesForChord(IChord chord, out IList<int> chordNotesIndices);
    IList<INote> GetOverlappingNotesForChord(int chordIndex, out IList<int> chordNotesIndices);
}

Properties

Property Name Type Description
TimeSignature IDuration Contains the bar's duration, for example: 4/4 for standard western music and 3/4 for a valse.
Chords IList<IChord> The chords which represent the harmony in the bar.
Notes IList<INote> The notes which represent the melody in the bar.

Methods

Method Name Return Type Description
GetOverlappingChordsForNote IList<IChord> Returns the chords that are played in parallel to given note.
GetOverlappingNotesForChord IList<INote> Returns the notes that are played in parallel to given chord.
  • Home
  • Getting Started
  • Design
    • Business Logical Layer (CW.Soloist.CompositionService)
    • Data Access Layer
    • Presentation Layer
Clone this wiki locally