-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
62 lines (55 loc) · 1.51 KB
/
types.ts
File metadata and controls
62 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
export enum LevelType {
MAJOR = 'MAJOR',
MINOR = 'MINOR',
MIXOLYDIAN = 'MIXOLYDIAN',
MODAL_INTERCHANGE = 'MODAL_INTERCHANGE',
SECONDARY_DOMINANT = 'SECONDARY_DOMINANT',
MINOR_PLAGAL = 'MINOR_PLAGAL',
CHROMATIC = 'CHROMATIC',
TRITONE_SUB = 'TRITONE_SUB',
DORIAN = 'DORIAN',
OUDOU = 'OUDOU',
CITY_POP = 'CITY_POP',
}
export type SynthPreset = 'VANGELIS' | 'JUMP' | 'PIANO';
export type LevelId = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
export interface LevelConfig {
id: LevelId;
type: LevelType;
availableChords: readonly string[]; // e.g. ["I", "ii", "iii", "IV", "V", "vi"]
// Title and Description are now derived from translation keys using 'id'
}
export interface Chord {
roman: string;
notes: string[]; // e.g., ["C4", "E4", "G4"]
displayName: string;
}
export interface Progression {
id: string;
key: string;
chords: readonly Chord[];
}
export interface RealSong {
id: string;
title: string;
artist: string;
youtubeId: string;
startTime: number;
endTime: number;
levelType: LevelType;
key: string;
progression: string[]; // e.g. ["I", "V", "vi", "IV"]
}
export interface GameState {
level: LevelConfig | null;
activeRealSong: RealSong | null; // New field for Real Song mode
isPlaying: boolean;
currentProgression: Progression | null;
userAnswers: string[];
status: 'IDLE' | 'PLAYING' | 'GUESSING' | 'FEEDBACK' | 'THEORY' | 'REAL_SONG';
theoryContent: string;
feedbackContent: string;
score: number;
round: number;
isLoading: boolean;
}