-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
322 lines (309 loc) · 11.6 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
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>wackybox</title>
<meta name="application-name" content="wackybox" />
<meta name="apple-mobile-web-app-title" content="wackybox">
<meta name="description" content="wackybox is an online tool for sketching and sharing instrumental melodies." />
<meta name="keywords" content="chiptune, instrumental, music, song, melody, composition, tool, free, wackybox" />
<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="shortcut icon" type="image/png" sizes="32x32" href="icon_32.png">
<link rel="manifest" href="/manifest.webmanifest" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" 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: 'Oogie Boogie', sans-serif;
line-height: 1.3;
color: var(--primary-text, white);
cursor: url('WOAH.png'), auto;
}
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: 700px;
padding-left: 30px;
padding-right: 30px;
}
#text-content {
overflow: auto;
background: var(--editor-background, black);
width: 100%;
max-width: 700px;
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;
}
h2 {
font-size: 1.5rem;
text-align: center;
margin-top: 0.5em;
margin-bottom: 0.5em;
-webkit-text-stroke-width: 0;
}
a {
color: var(--link-accent, #98f);
cursor: url('tockybox.png'), auto;
}
.donation form {
display: inline;
}
.donation input[type="submit"] {
-webkit-appearance: none;
appearance: none;
background: none;
border: none;
font-family: inherit;
font-size: inherit;
color: var(--link-accent, #98f);
text-decoration: underline;
cursor: pointer;
padding: 0;
margin: 0;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 100%;
}
/* wide screen */
@media (min-width: 701px) {
html {
width: 100%;
}
body {
width: 100%;
}
.column-container {
width: 700px;
display: flex;
justify-content: space-between;
}
.instructions-column {
width: 375px;
}
.twitter-column {
width: 300px;
}
}
/* narrow screen */
@media (max-width: 700px) {
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, BeepBox requires a JavaScript-enabled browser.
</noscript>
</div>
<div id="text-content">
<section>
<h1>
wackybox is the beepbox mod
</h1>
<p id="introduction">
Wackybox
<img id="Hotdog" src="hotdog.png" width="500" height="333" onclick="myFunction()" />
<script>
function myFunction(){
var image = document.getElementById('Hotdog')
image.width = Math.random() * (750 - 20) + 20
image.height = Math.random() * (499 - 20) + 20
}
</script>
</p>
<p>
try out todbox right now instantly (now)
</p>
<p>
<a href="https://todbox.github.io/">Todbox</a>
</p>
All song data is contained in the URL at the top of your browser.
When you make changes to the song, the URL is updated to reflect your changes.
When you are satisfied with your song, just copy and paste the URL to save and share your song!
</p>
<div class="donation">
BeepBox is a passion project, and will always be free to use. If you find it valuable and have the means, any gratuity via
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="QZJTX9GRYEV9N" />
<input type="hidden" name="currency_code" value="USD" />
<input type="submit" name="submit" value="Paypal"/>
</form>
would be appreciated!
</div>
</section>
<div class="column-container">
<main class="instructions-column">
<section>
<h2>
Instructions
</h2>
<p>
You can add or remove notes by clicking on the gray rows at the top.
BeepBox automatically plays the notes out loud for you. Try it!
</p>
<p>
Notes go into patterns, and you can edit one pattern at a time.
Those numbered boxes at the bottom of the editor are the different patterns you can edit.
<span id="bar-editing">
Click the other boxes to move to a different part of the song, or click the arrows on the currently selected box to swap which pattern is played during that part of the song.
</span>
</p>
<p>
BeepBox can play several rows of patterns simultaneously, and each row has its own set of patterns.
Most rows can play melodies or harmonies, but the bottom row is for drums.
</p>
<p>
The purple loop underneath the numbered boxes controls which part of the song is currently repeating.
Move the loop to listen to a different part of the song, or drag the ends to expand the loop to include the whole song.
</p>
<div id="keyboard-instructions">
<p>
When BeepBox has focus (click on its interface above), you can use these keyboard shortcuts: <br/>
</p>
<ul>
<li>Spacebar: play or pause the song</li>
<li>Z: undo</li>
<li>Y or Shift Z: redo</li>
<li>C: copy pattern from selection</li>
<li>V: paste pattern into selection</li>
<li>1-8: assign a pattern number to selection</li>
<li>Arrows: move selection</li>
<li>[ ]: move playhead backward or forward</li>
<li>Check BeepBox's edit menu for more!</li>
</ul>
</div>
<p>
In the note pattern editor, you can click and drag horizontally on a note to adjust its duration.
You can also click above or below an existing note to add more notes to be played simultaneously, which is called a chord.
</p>
<p>
ADVANCED: Drag vertically from an existing note to bend its pitch, or drag vertically from above or below the note to adjust its volume. Drag on the numbered pattern boxes to select multiple patterns to copy and paste parts of your song.
</p>
<p>
BeepBox has many more features.
Try playing with the buttons and menus on the right side to find out what it can do!
You can also click on the label next to each option for a description of what it does.
</p>
<p>
<a href="https://twitter.com/beepboxco">Check out some of these songs that other people have posted on Twitter!</a>
If you find something you like, you should let the creator know!
And if you see any beginners asking for advice, maybe you can help them!
</p>
</section>
<section>
<h2>
About
</h2>
<p>
BeepBox is developed by <a href="http://www.johnnesky.com">John Nesky</a>, also known as <a href="https://twitter.com/shaktool">@shaktool</a>.
</p>
<p>
BeepBox does not claim ownership over songs created with it, so original songs belong to their authors.
</p>
<p>
Neither John Nesky nor BeepBox assume responsibility for any copyrighted material played on BeepBox. No songs are ever received, recorded, or distributed by BeepBox's servers. All song data is contained in the URL after the hash (#) mark, and your song data will not leave your device unless you copy and share the URL.
</p>
<p>
BeepBox does not collect, track, or share any user data.
</p>
<p id="offline-instructions">
You can download <a download="beepbox_offline.html" href="beepbox_offline.html">an offline version of BeepBox</a> to use when you don't have access to the internet. The features are otherwise the same.
</p>
<p>
You can download and use <a href="https://github.com/johnnesky/beepbox">the source code</a> under the MIT license. In particular, you can use the synth code <a href="synth_example.html">as demonstrated here</a> to play BeepBox songs in your own JavaScript projects!
</p>
<p>
Those who yearn for simpler times can find the old version of BeepBox <a href="2_3/" target="_blank">here</a>.
</p>
<section>
</main>
<aside class="twitter-column">
<h2>
Shared on Twitter:
</h2>
<div style="background: black;">
<a class="twitter-timeline" data-width="300" data-height="2000" data-link-color="#9988ff" data-chrome="noheader nofooter transparent" data-dnt="true" data-theme="dark" href="https://twitter.com/beepboxco?ref_src=twsrc%5Etfw">Songs retweeted by @beepboxco</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</aside>
</div>
</div>
<!--
Instead of loading js beepbox editor interface directly, test for browser support.
<script type="text/javascript" src="beepbox_editor.min.js"></script>
-->
<script type="text/javascript">
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|android|ipad|playbook|silk/i.test(navigator.userAgent) ) {
document.getElementById("introduction").innerHTML = "BeepBox is an online tool for sketching and sharing instrumental melodies. Make sure that your volume is turned up, then press the play button!";
document.getElementById("keyboard-instructions").style.display = "none";
document.getElementById("bar-editing").innerHTML = "Tap the other boxes to move to a different part of the song, or tap on the currently selected box to swap which pattern is played during that part of the song.";
document.getElementById("offline-instructions").innerHTML = 'You can use BeepBox when your device is offline if you put a shortcut to BeepBox on your home screen. <ul><li>Chrome: find the "Add to Home Screen" option in the ⋮ menu.</li><li>Firefox: find the "Add Page Shortcut" option in the ⋮ menu.</li><li>Safari: find the "Add to Home Screen" option in the bookmark menu.</li></ul>';
}
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.js");
document.head.appendChild(fileref);
} else {
document.getElementById("beepboxEditorContainer").innerHTML = "Sorry, BeepBox doesn't support your browser. Try a recent version of Chrome, Firefox, Edge, Safari, or Opera.";
}
</script>
</body>
</html>