-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
199 lines (197 loc) · 7.12 KB
/
index.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="dist/style.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Libre+Barcode+39+Extended+Text&display=swap"
rel="stylesheet"
/>
<title>Synth Punk</title>
</head>
<body>
<div class="grid h-screen place-items-center">
<div><h1 class="text-2xl font-black">シンセパンク</h1></div>
<div
id="synth"
class="grid grid-cols-3 grid-rows-1 gap-0 border-2 border-black divide-x-2 divide-black bg-primary-500 border-box"
>
<div id="oscGroup" class="grid grid-flow-col grid-rows-3">
<!-- OSC 1 -->
<div
id="oscOne"
class="grid grid-flow-col grid-rows-4 gap-0 place-content-evenly"
>
<h2 class="self-center font-bold text-center underline uppercase">
osc - 1
</h2>
<!-- Waveform Display -->
<div
class="self-center h-12 mx-2 text-center border-2 border-black w-52 justify-self-center bg-secondary-500"
>
<canvas
id="waveDisplay"
class="self-center h-12 w-52 justify-self-center"
></canvas>
</div>
<!-- Waveform Select -->
<div class="flex items-center justify-evenly waveType">
<button
data-osc="osc1"
data-waveform="sine"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SINE
</button>
<button
data-osc="osc1"
data-waveform="square"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SQR
</button>
<button
data-osc="osc1"
data-waveform="triangle"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
TRI
</button>
<button
data-osc="osc1"
data-waveform="sawtooth"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SAW
</button>
</div>
<!-- Knobs -->
<div class="flex row-start-4 justify-evenly knobsRow">
<input
id="osc1Gain"
value="25"
data-param="osc1Gain.gain.value"
data-min="0.00001"
data-max="1"
data-osc="osc1"
data-setting="volume"
type="range" min="1" max="100" value="50"
class="flex items-center justify-center w-10 h-10 text-center text-white border-2 border-black rounded-full bg-secondary-500"
></input>
<div
class="flex items-center justify-center w-10 h-10 text-center text-white border-2 border-black rounded-full bg-secondary-500"
>
OCT
</div>
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
SEMI
</div>
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
FINE
</div>
</div>
</div>
<!-- OSC 2 -->
<div
id="oscTwo"
class="grid grid-flow-col grid-rows-4 row-start-2 gap-0 place-content-evenly"
>
<h2 class="self-center font-bold text-center underline uppercase">
osc - 2
</h2>
<!-- Waveform Display -->
<div
class="self-center h-12 mx-2 text-center border-2 border-black w-52 justify-self-center bg-secondary-500"
>
<canvas
id="waveDisplay"
class="self-center h-12 w-52 justify-self-center"
></canvas>
</div>
<!-- Waveform Select -->
<div class="flex items-center justify-evenly waveType">
<button
data-osc="osc2"
data-waveform="sine"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SINE
</button>
<button
data-osc="osc2"
data-waveform="square"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SQR
</button>
<button
data-osc="osc2"
data-waveform="triangle"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
TRI
</button>
<button
data-osc="osc2"
data-waveform="sawtooth"
class="uppercase bg-white border-2 border-black cursor-pointer w-11"
>
SAW
</button>
</div>
<!-- Knobs -->
<div class="flex row-start-4 justify-evenly knobs">
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
LVL
</div>
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
OCT
</div>
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
SEMI
</div>
<div
class="flex items-center justify-center w-10 h-10 border-2 border-black rounded-full bg-secondary-500"
>
FINE
</div>
</div>
</div>
<!-- Play-Stop Button -->
<div
id="playStop"
class="w-32 h-10 row-start-3 border-2 border-black rounded-full cursor-pointer select-none place-self-center bg-secondary-500 active:bg-secondary-200"
>
<h2 id="playStatus" class="text-center text-white pt-1.5 font-bold">
PLAY
</h2>
</div>
</div>
<div class="grid grid-flow-col grid-rows-3 gap-2">
<h2 class="self-center font-bold text-center underline uppercase">
amp-env
</h2>
</div>
<div class="grid grid-flow-col grid-rows-3 gap-2">
<h2 class="self-center font-bold text-center underline uppercase">
efx
</h2>
</div>
</div>
</div>
<script src="audioTone.ts"></script>
<script scr="src/pureknob.js" type="module"></script>
</body>
</html>