-
Notifications
You must be signed in to change notification settings - Fork 0
/
tonnetz-grid_game-mode.html
125 lines (106 loc) · 5.67 KB
/
tonnetz-grid_game-mode.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="en" dir="ltr">
<!--------------------------------->
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<meta charset="utf-8">
<link rel="stylesheet" href="./style/grid.css">
<title>toneZ - Game Mode</title>
</head>
<!--------------------------------->
<body>
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="./index.html">toneZ</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span >Options</span>
</button>
<div class="collapse navbar-collapse text-right" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li>
<label class="navbar-text" for="oscillators">Oscillator type: </label>
<select name="oscillators" id="oscillators" onchange="triggerOscillatorChange(this);">
<option value="triangle">Triangle</option>
<option value="sine">Sine</option>
<option value="sawtooth">Sawtooth</option>
<option value="square">Square</option>
</select>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><label for="attack">Attack: </label></a>
<input type="range" id="attack" name="attack" min="0.005" max="1" step="0.001" value="0.005" onchange="setAttack(this.value)">
</li>
<li class="nav-item">
<a class="nav-link" href="#"><label for="decay">Decay: </label></a>
<input type="range" id="decay" name="decay" min="0" max="1" step="0.001" value="0" onchange="setDecay(this.value)">
</li>
<li class="nav-item">
<a class="nav-link" href="#"><label for="sustain">Sustain: </label></a>
<input type="range" id="sustain" name="sustain" min="0" max="10" step="0.001" value="5" onchange="setSustain(this.value)">
</li>
<li class="nav-item">
<a class="nav-link" href="#"><label for="release">Release: </label></a>
<input type="range" id="release" name="release" min="0" max="10" step="0.001" value="1" onchange="setRelease(this.value)">
</li>
</ul>
</div>
</nav>
<div class="row justify-content-between" id="info-bar">
<div class="col-2 pt-3">
<h1 class="display-4" id="score-value"> </h1>
</div>
<div class="col-3">
<div class="row justify-content-center">
<h1 class="display-2 col-2 life" id="life1">♥</h1>
<h1 class="display-2 col-2 life" id="life2">♥</h1>
<h1 class="display-2 col-2 life" id="life3">♥</h1>
<h1 class="display-2 col-2 life" id="life4">♥</h1>
<h1 class="display-2 col-2 life" id="life5">♥</h1>
<h1 class="display-2 col-2 life" id="life6">♥</h1>
</div>
</div>
</div>
<div class="modal fade" id="instruction-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Game Mode</h5>
</div>
<div class="modal-body">
Play the chords shown in yellow on your MIDI keyboard, learn the tonnetz grid system!
<br><br>
BE CAREFUL: every wrong note makes you lose one life! But every correct chord makes you gain one.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="iterateGame()">Begin!</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="game-over-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle2">Game Over!</h5>
</div>
<div class="modal-body">
Keep it up! Next time it will be better ;)
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="returnToMainMenu()">Return to Main Menu</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<script src="https://unpkg.com/tone@latest/build/Tone.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript" src="./script/p5.js"></script>
<script type="text/javascript" src="./script/classes.js"></script>
<script type="text/javascript" src="./script/global.js"></script>
<script type="text/javascript" src="./script/main.js"></script>
<script type="text/javascript" src="./script/game.js"></script>
</body>
<!--------------------------------->
</html>