feat: added mode list dropdown

This commit is contained in:
Xiaohan-Tian
2025-12-08 22:59:09 -08:00
parent 02a7a61b1d
commit 98ed8a60ce
6 changed files with 125 additions and 7 deletions
+10
View File
@@ -8,10 +8,12 @@ export class KGPianoRollState {
public static SNAP_OPTIONS: string[] = ['NO SNAP', '1/3', '1/4', '1/6', '1/8', '1/12', '1/16', '1/24', '1/32'];
public static QUANT_POS_OPTIONS: string[] = ['1/3', '1/4', '1/6', '1/8', '1/12', '1/16', '1/24', '1/32'];
public static QUANT_LEN_OPTIONS: string[] = ['1/1', '1/2', '1/3', '1/4', '1/6', '1/8', '1/12', '1/16', '1/24', '1/32'];
public static MODE_OPTIONS: string[] = []; // Will be populated from mode_list.json
private activeTool: string = "pointer";
private currentSnap: string = "NO SNAP";
private lastEditedNoteLength: number = 1; // Default to 1 beat
private currentMode: string = "ionian"; // Default mode
private constructor() {
console.log("KGPianoRollState initialized");
@@ -48,4 +50,12 @@ export class KGPianoRollState {
public setLastEditedNoteLength(length: number): void {
this.lastEditedNoteLength = length;
}
public getCurrentMode(): string {
return this.currentMode;
}
public setCurrentMode(mode: string): void {
this.currentMode = mode;
}
}