| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import {Note} from "./Note";
- /**
- * A [[Beam]] - the bar grouping multiple consecutive [[Note]]s.
- */
- export class Beam {
- private notes: Note[] = [];
- private extendedNoteList: Note[] = [];
- public get Notes(): Note[] {
- return this.notes;
- }
- public set Notes(value: Note[]) {
- this.notes = value;
- }
- public get ExtendedNoteList(): Note[] {
- return this.extendedNoteList;
- }
- public set ExtendedNoteList(value: Note[]) {
- this.extendedNoteList = value;
- }
- /**
- * Perform all the appropriate actions for adding a singleNote to the Beam.
- * @param note
- */
- public addNoteToBeam(note: Note): void {
- if (note !== undefined) {
- note.NoteBeam = this;
- this.notes.push(note);
- this.extendedNoteList.push(note);
- }
- }
- }
- export enum BeamEnum {
- BeamNone = -1,
- BeamBegin = 0,
- BeamContinue = 1,
- BeamEnd = 2,
- BeamForward = 3,
- BeamBackward = 4,
- }
|