Initial commit of a toy analogue audio generator
Key components: - no_std core so it can be used bare metal on embedded systems - default implementation for RPi 2350, with midi input and I2s output using PIO - Visualiser for the web to play with on a dev system
This commit is contained in:
109
www/index.html
Normal file
109
www/index.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Synth Visualiser</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0d0d0d;
|
||||
--panel: #1a1a1a;
|
||||
--accent: #00e5ff;
|
||||
--text: #e0e0e0;
|
||||
}
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: "JetBrains Mono", "Fira Code", monospace;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
header {
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-bottom: 1px solid #333;
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 0.15em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
}
|
||||
main {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 180px;
|
||||
gap: 1px;
|
||||
background: #333;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel {
|
||||
background: var(--panel);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel__label {
|
||||
padding: 0.4rem 0.75rem;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #2a2a2a;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.panel canvas { flex: 1; width: 100%; height: 100%; display: block; }
|
||||
.panel--patchbay { grid-column: 1 / -1; }
|
||||
footer {
|
||||
padding: 0.5rem 1.5rem;
|
||||
font-size: 0.7rem;
|
||||
color: #444;
|
||||
border-top: 1px solid #222;
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
#status { color: var(--accent); }
|
||||
#loader {
|
||||
position: fixed; inset: 0;
|
||||
background: var(--bg);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 1rem; color: var(--accent);
|
||||
z-index: 100; transition: opacity 0.4s;
|
||||
}
|
||||
#loader.hidden { opacity: 0; pointer-events: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="loader">Loading WASM module…</div>
|
||||
|
||||
<header>Analogue Synth Visualiser</header>
|
||||
|
||||
<main>
|
||||
<section class="panel">
|
||||
<div class="panel__label">Oscilloscope</div>
|
||||
<canvas id="oscilloscope-canvas"></canvas>
|
||||
</section>
|
||||
<section class="panel">
|
||||
<div class="panel__label">Spectrum</div>
|
||||
<canvas id="spectrum-canvas"></canvas>
|
||||
</section>
|
||||
<section class="panel panel--patchbay">
|
||||
<div class="panel__label">Patch Bay</div>
|
||||
<canvas id="patchbay-canvas"></canvas>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<span id="status">Idle</span>
|
||||
<span id="sample-rate"></span>
|
||||
<span id="frame-time"></span>
|
||||
</footer>
|
||||
|
||||
<!--
|
||||
Run first:
|
||||
wasm-pack build crates/synth-visualiser --target web --out-dir ../../www/pkg
|
||||
Then serve:
|
||||
python3 -m http.server --directory www 8080
|
||||
-->
|
||||
<script type="module" src="./bootstrap.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user