Quellcode durchsuchen

Removed unused dependencies from Instrument

Oliver vor 9 Jahren
Ursprung
Commit
b94281d9ce
2 geänderte Dateien mit 6 neuen und 25 gelöschten Zeilen
  1. 4 4
      src/Common/logging.ts
  2. 2 21
      src/MusicalScore/Instrument.ts

+ 4 - 4
src/Common/logging.ts

@@ -4,10 +4,10 @@
 
 
 export class logging {
-    public static debug(...arguments: any[]) {
-        console.log("[OSMD] DEBUG: ", arguments.join(" "));
+    public static debug(...args: any[]) {
+        console.log("[OSMD] DEBUG: ", args.join(" "));
     }
-    public static log(...arguments: any[]) {
-        console.log("[OSMD] ", arguments.join(" "));
+    public static log(...args: any[]) {
+        console.log("[OSMD] ", args.join(" "));
     }
 }

+ 2 - 21
src/MusicalScore/Instrument.ts

@@ -6,16 +6,10 @@ import { Staff } from "./VoiceData/Staff";
 import { SubInstrument } from "./SubInstrument";
 import { MidiInstrument } from "./VoiceData/Instructions/ClefInstruction";
 
-// FIXME
-type IPhonicScoreInterface = any;
-type InstrumentParameters = any;
-type InstrumentParameterChangedDelegate = any;
 
-
-export class Instrument extends InstrumentalGroup /*implements ISettableInstrument, IInstrument*/ {
-    constructor(id: number, idString: string, phonicScoreInterface: IPhonicScoreInterface, musicSheet: MusicSheet, parent: InstrumentalGroup) {
+export class Instrument extends InstrumentalGroup {
+    constructor(id: number, idString: string, musicSheet: MusicSheet, parent: InstrumentalGroup) {
         super(undefined, musicSheet, parent);
-        this.phonicScoreInterface = phonicScoreInterface;
         this.id = id;
         this.idString = idString;
         this.nameLabel = new Label(idString);
@@ -23,13 +17,10 @@ export class Instrument extends InstrumentalGroup /*implements ISettableInstrume
 
     public Transpose: number = 0;
     public Highlight: boolean;
-    public InstrumentParameterChanged: InstrumentParameterChangedDelegate;
 
-    private phonicScoreInterface: IPhonicScoreInterface;
     private voices: Voice[] = [];
     private staves: Staff[] = [];
     private nameLabel: Label;
-    // private range: ToneRange;
     private idString: string;
     private id: number;
     private hasLyrics: boolean = false;
@@ -71,9 +62,6 @@ export class Instrument extends InstrumentalGroup /*implements ISettableInstrume
     public set Name(value: string) {
         this.nameLabel.Text = value;
     }
-    public set PhonicScoreInterface(value: IPhonicScoreInterface) {
-        this.phonicScoreInterface = value;
-    }
     public get IdString(): string {
         return this.idString;
     }
@@ -250,11 +238,4 @@ export class Instrument extends InstrumentalGroup /*implements ISettableInstrume
             this.staves.push(new Staff(this, i + 1));
         }
     }
-    public SetInstrumentParameter(parameter: InstrumentParameters, value: Object): void {
-        this.phonicScoreInterface.RequestInstrumentParameter(this.Id, parameter, value);
-    }
-
-    public Dispose(): void {
-        this.InstrumentParameterChanged = undefined;
-    }
 }