-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
261 lines (233 loc) · 9.26 KB
/
index.html
File metadata and controls
261 lines (233 loc) · 9.26 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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html lang="en">
<head>
<link rel='shortcut icon' type='image/x-icon' href='./favicon.png' />
<!-- CDN for jQuery and select2 -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Midbox</title>
<meta name="application-name" content="Midbox" />
<meta name="apple-mobile-web-app-title" content="Midbox">
<meta name="description" content="Midbox is a mod of BeepBox/JummBox which expands on them greatly." />
<meta name="keywords" content="chiptune, instrumental, music, song, melody, composition, tool, free, square wave, NES, NSF, Midbox, midbox, JummBox, jummbox, BeepBox, beepbox" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="theme-color" content="#444" />
<meta name="msapplication-TileColor" content="#603cba" />
<meta name="msapplication-config" content="/browserconfig.xml" />
<meta name="format-detection" content="telephone=no" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/icon_32.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<link href="https://fonts.googleapis.com/css?family=B612" rel="stylesheet" media="none" onload="if (this.media != 'all') this.media='all';" /> <!-- this is a trick to load CSS asynchronously. -->
<style type="text/css">
html {
background: var(--page-margin, black);
overflow-x: hidden;
font-size: large;
font-family: 'B612', sans-serif;
line-height: 1.3;
color: var(--primary-text, white);
}
body {
margin: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
align-items: center;
align-content: center;
}
#beepboxEditorContainer {
min-height: 645px;
overflow: auto;
background: var(--editor-background, black);
width: 100%;
max-width: 710px;
padding-left: 30px;
padding-right: 30px;
}
#text-content {
overflow: auto;
background: var(--editor-background, black);
width: 100%;
max-width: 710px;
padding-left: 30px;
padding-right: 30px;
}
h1 {
font-size: 1.7rem;
text-align: center;
margin-top: 0.5em;
margin-bottom: 0.5em;
-webkit-text-stroke-width: 0;
color: var(--mod-title, var(--link-accent, rgb(61, 33, 216)));
}
h2 {
font-size: 1.5rem;
text-align: center;
margin-top: 0.5em;
margin-bottom: 0.5em;
-webkit-text-stroke-width: 0;
}
h3 {
font-size: 1.2rem;
text-align: center;
margin-top: 0.35rem;
margin-bottom: 0.5rem;
-webkit-text-stroke-width: 0;
color: var(--secondary-text, var(--link-accent, rgb(255, 255, 255)));
}
h4 {
font-size: 1rem;
text-align: center;
margin-top: 0.1rem;
margin-bottom: 0.1rem;
-webkit-text-stroke-width: 0;
}
.centerDiv {
margin: 0px auto;
}
a {
color: var(--link-accent, rgb(17, 40, 252));
}
.donation form {
display: inline;
}
.donation input[type="submit"] {
-webkit-appearance: none;
background: none;
border: none;
font-family: inherit;
font-size: inherit;
color: var(--link-accent, rgb(61, 33, 216));
text-decoration: underline;
cursor: pointer;
padding: 0;
margin: 0;
}
/* wide screen */
@media (min-width: 711px) {
html {
width: 100%;
}
body {
width: 100%;
}
.column-container {
width: 710px;
display: flex;
gap: 25px;
}
.instructions-column {
min-width: 0;
}
}
/* narrow screen */
@media (max-width: 710px) {
body {
width: 100%;
}
p, .donation {
margin: 1em 0.5em;
}
.column-container {
display: flex;
flex-direction: column;
align-items: center;
}
}
</style>
</head>
<body>
<div id="beepboxEditorContainer">
<noscript>
Sorry, Midbox requires a JavaScript-enabled browser.
</noscript>
</div>
<div id="text-content">
<section>
<h1>
<font color="#131875">Midbox TESTING</font>
<span id="midboxPlant" style="display: inline; color:#0c46e4e5"></span>
</h1>
<p>This is a version of Midbox made for testing and gathering feedback on features planned to be added in the next update. <br> Please keep in mind songs you make here will be lost due time. Only use this for testing features for Midbox's development.</p>
<p id="introduction">
Midbox is currently testing: <br>
- New custom chip prompt QoL and improvements. <br>
- 5 new FM operator waveforms; Clang, Metal, Rounded (UltraBox), Secant, and Double Sine. <br>
- Strum speed, slide speed, "continue through pattern" checkbox, and arpeggio patterns. <br>
</p>
<p>
Fixed from the previous testing version: <br>
- Fixed issue where the testing site wouldn't load correctly on mobile devices. <br>
- Fixed issues where certain custom chip elements weren't interactable on mobile. <br>
- Removed the unison select from instruments that don't actually support it yet. <br>
- Fixed randomly-generated instruments not generating due to missing transition/chord types. <br>
</p>
</section>
</div>
<script type="text/javascript">
// Randomize display of header
// 1-in-10
if (Math.floor(Math.random() * 10) == 0) {
switch (Math.floor(Math.random() * 5)) {
case 0:
document.getElementById("midboxPlant").innerHTML = " 🍂";
break;
case 1:
document.getElementById("midboxPlant").innerHTML = " 🌿";
break;
case 2:
document.getElementById("midboxPlant").innerHTML = " 🌺";
break;
case 3:
document.getElementById("midboxPlant").innerHTML = " 🍃";
break;
case 4:
document.getElementById("midboxPlant").innerHTML = "..?";
break;
}
}
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|android|ipad|playbook|silk/i.test(navigator.userAgent)) {
document.getElementById("introduction").innerHTML = "Midbox is an online tool for sketching and sharing chiptune melodies. Make sure that your volume is turned up, then press the play button!";
}
function browserHasRequiredFeatures() {
"use strict";
if (window.AudioContext == undefined && window.webkitAudioContext == undefined) {
return false;
}
try {
eval("class T {}");
eval("const a = () => 0");
eval("for (const a of []);");
} catch (error) {
return false;
}
return true;
}
if (browserHasRequiredFeatures()) {
// Go ahead and load js beepbox editor interface:
var fileref = document.createElement("script");
fileref.setAttribute("type", "text/javascript");
fileref.setAttribute("src", "beepbox_editor.min.js");
document.head.appendChild(fileref);
} else {
document.getElementById("beepboxEditorContainer").innerHTML = "Sorry, Midbox doesn't support your browser. Try a recent version of Chrome, Firefox, Edge, Safari, or Opera.";
}
// If the page was loaded with an old song version that old versions of BeepBox support,
// update the links to the old versions so that they'll open the song.
if (/^#[1-6]/.test(location.hash)) {
document.getElementById("linkTo2_3").href += location.hash;
}
if (/^#[1-8]/.test(location.hash)) {
document.getElementById("linkTo3_0").href += location.hash;
}
</script>
</body>
</html>