-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
63 lines (58 loc) · 3.81 KB
/
Program.cs
File metadata and controls
63 lines (58 loc) · 3.81 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
63
using System.Collections.Immutable;
using SFML.Graphics;
using SFML.Window;
using Guit.Domain;
using Guit.Domain.Styles;
using Guit.Application.Core;
using Guit.Application.Factories;
using Guit.Application.Rendering.Core;
using static Guit.Application.Helpers.ColorHelper;
using static Guit.Domain.Note;
Font font = new Font("Merriweather.ttf");
WindowSettings windowSettings = new WindowSettings()
{
WindowTitle = "Fretboard Application",
WindowSize = (1200, 800),
Clear = ColorFromHex("#5A5A5A"),
WindowStyle = Styles.Close | Styles.Titlebar,
ContextSettings = new ContextSettings() { AntialiasingLevel = 8 },
};
ImmutableArray<Instrument> instruments =
[
new Instrument("6-String Guitar (Standard E)", Frets: 22, Tune: [E4, B3, G3, D3, A2, E2] ),
new Instrument("6-String Guitar (Drop D)", Frets: 22, Tune: [E4, B3, G3, D3, A2, D2] ),
new Instrument("6-String Guitar (DADGAD)", Frets: 22, Tune: [D4, A3, G3, D3, A2, D2] ),
new Instrument("7-String Guitar (Standard B)", Frets: 24, Tune: [E4, B3, G3, D3, A2, E2, B1] ),
new Instrument("7-String Guitar (Drop A)", Frets: 24, Tune: [E4, B3, G3, D3, A2, E2, A1] ),
new Instrument("8-String Guitar (Standard F#)", Frets: 24, Tune: [E4, B3, G3, D3, A2, E2, B1, F1] ),
new Instrument("4-String Bass Guitar (Standard E)", Frets: 24, Tune: [G3, D3, A2, E2] ),
new Instrument("5-String Bass Guitar (Standard B)", Frets: 24, Tune: [G3, D3, A2, E2, B1] ),
new Instrument("Ukulele (Standard G)", Frets: 21, Tune: [A4, E4, C4, G4] ),
new Instrument("Baritone Ukulele (DGBE)", Frets: 21, Tune: [E4, B3, G3, D3] ),
];
ImmutableArray<Scale> scales =
[
new Scale("Chromatic", Intervals: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] ),
new Scale("Ionian", Intervals: [0, 2, 4, 5, 7, 9, 11] ),
new Scale("Dorian", Intervals: [0, 2, 3, 5, 7, 9, 10] ),
new Scale("Aeolian", Intervals: [0, 2, 3, 5, 7, 8, 10] ),
new Scale("Mixolydian", Intervals: [0, 2, 4, 5, 7, 9, 10] ),
new Scale("Harmonic minor", Intervals: [0, 2, 3, 5, 7, 8, 11] ),
new Scale("Melodic minor", Intervals: [0, 2, 3, 5, 7, 9, 11] ),
new Scale("Lydian", Intervals: [0, 2, 4, 6, 7, 9, 11] ),
new Scale("Phrygian", Intervals: [0, 1, 3, 5, 7, 8, 10] ),
new Scale("Major pentatonic", Intervals: [0, 2, 4, 7, 9] ),
new Scale("Minor pentatonic", Intervals: [0, 3, 5, 7, 10] ),
new Scale("Blues", Intervals: [0, 3, 5, 6, 7, 10] ),
new Scale("Bebop dominant", Intervals: [0, 2, 4, 5, 7, 9, 10, 11] ),
new Scale("Harmonic major", Intervals: [0, 2, 4, 5, 7, 8, 11] ),
new Scale("Lydian augmented", Intervals: [0, 2, 4, 6, 8, 9, 11] ),
new Scale("Hungarian Gypsy", Intervals: [0, 2, 3, 6, 7, 8, 11] ),
new Scale("Double harmonic", Intervals: [0, 1, 4, 5, 7, 8, 11] ),
new Scale("Locrian", Intervals: [0, 1, 3, 5, 6, 8, 10] ),
new Scale("Acoustic", Intervals: [0, 2, 4, 6, 7, 9, 10] ),
];
AppStyle appStyle = AppStyle.GetDefault(font);
AppState appState = new AppState(instruments, scales);
ViewFactory viewFactory = new(appStyle);
new FretboardApplication(windowSettings, viewFactory, appState).OpenRenderWindow();