Andrea Condoluci пре 8 година
родитељ
комит
0d5d661f04

+ 7 - 0
src/MusicalScore/VoiceData/Beam.ts

@@ -1,5 +1,8 @@
 import {Note} from "./Note";
 
+/**
+ * A beam - the bar grouping multiple consecutive [[Note]]s.
+ */
 export class Beam {
     private notes: Note[] = [];
     private extendedNoteList: Note[] = [];
@@ -17,6 +20,10 @@ export class Beam {
         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;

+ 3 - 0
src/MusicalScore/VoiceData/ChordSymbolContainer.ts

@@ -2,6 +2,7 @@ import {Pitch} from "../../Common/DataObjects/Pitch";
 import {KeyInstruction} from "./Instructions/KeyInstruction";
 import {MusicSheetCalculator} from "../Graphical/MusicSheetCalculator";
 import {AccidentalEnum} from "../../Common/DataObjects/Pitch";
+
 export class ChordSymbolContainer {
     private rootPitch: Pitch;
     private chordKind: ChordSymbolEnum;
@@ -192,7 +193,9 @@ export class ChordSymbolContainer {
         }
         return text;
     }
+
 }
+
 export class Degree {
     constructor(value: number, alteration: AccidentalEnum, text: ChordDegreeText) {
         this.value = value;

+ 3 - 0
src/MusicalScore/VoiceData/LinkedVoice.ts

@@ -2,12 +2,15 @@ import {Voice} from "./Voice";
 import {Instrument} from "../Instrument";
 
 export class LinkedVoice extends Voice {
+
     constructor(parent: Instrument, voiceId: number, master: Voice) {
         super(parent, voiceId);
         this.master = master;
     }
+
     private master: Voice;
     public get Master(): Voice {
         return this.master;
     }
+
 }

+ 15 - 0
src/MusicalScore/VoiceData/Note.ts

@@ -9,6 +9,9 @@ import {Staff} from "./Staff";
 import {Slur} from "./Expressions/ContinuousExpressions/Slur";
 import {NoteState} from "../Graphical/DrawingEnums";
 
+/**
+ * Represents a single pitch with a duration (length)
+ */
 export class Note {
 
     constructor(voiceEntry: VoiceEntry, parentStaffEntry: SourceStaffEntry, length: Fraction, pitch: Pitch) {
@@ -23,11 +26,17 @@ export class Note {
         }
     }
 
+    /**
+     * The transposed (!!!) HalfTone of this note.
+     */
     public halfTone: number;
     public state: NoteState;
     private voiceEntry: VoiceEntry;
     private parentStaffEntry: SourceStaffEntry;
     private length: Fraction;
+    /**
+     * The untransposed (!!!) source data.
+     */
     private pitch: Pitch;
     private beam: Beam;
     private tuplet: Tuplet;
@@ -160,6 +169,11 @@ export class Note {
     //    }
     //}
 
+    /**
+     * Return the number of dots needed to represent the given [[Fraction]].
+     * @param fraction
+     * @returns {number}
+     */
     private calculateNumberOfNeededDots(fraction: Fraction = this.length): number {
         // FIXME (Andrea) Test if correct
         if (this.tuplet === undefined) {
@@ -168,6 +182,7 @@ export class Note {
             return 0;
         }
     }
+
 }
 
 export enum Appearance {