- index.html: add <audio id=player> (hidden), beat-indicator dot in header - index.html: animation selector panel with Beat Pulse/Strobe/Color Wave/Rainbow options - index.html: remove seek slider + time display (browser audio element has native controls) - index.html: upload button + file selector remain in transport bar - app.js: wire <audio> element — play/pause/seeked/timeupdate events send WS ticks - app.js: 10Hz setInterval tick loop (supplements native timeupdate ~4Hz) - app.js: WS beat message -> flashBeatIndicator() animation - app.js: loadWaveformAndBeats() draws waveform peaks + beat marker lines on canvas - app.js: loadSelectedFile() sets audio.src=/shows/filename, fetches beats+waveform - app.js: upload response caches beat data returned from server immediately - style.css: .beat-indicator with .beat-flash (yellow glow animation) - style.css: .animation-select-input for the animations panel dropdown
372 lines
7.5 KiB
CSS
372 lines
7.5 KiB
CSS
:root {
|
|
--bg-primary: #0a0a0a;
|
|
--bg-panel: #0f0f0f;
|
|
--bg-panel-dark: #080808;
|
|
--border-dim: #1a4a4a;
|
|
--accent: #00ffff;
|
|
--border-bright: var(--accent);
|
|
--text-primary: #cccccc;
|
|
--text-dim: #555555;
|
|
--text-accent: var(--accent);
|
|
--text-warning: #ff6600;
|
|
--font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
|
--font-size: 13px;
|
|
--panel-gap: 1px;
|
|
}
|
|
|
|
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--font-size);
|
|
line-height: 1.4;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* DAW layout — header / (sidebar + main) / transport */
|
|
.app-shell {
|
|
display: grid;
|
|
grid-template-rows: 40px 1fr 48px;
|
|
grid-template-columns: 280px 1fr;
|
|
grid-template-areas:
|
|
"header header"
|
|
"sidebar main"
|
|
"transport transport";
|
|
height: 100vh;
|
|
gap: var(--panel-gap);
|
|
}
|
|
|
|
.header {
|
|
grid-area: header;
|
|
background: var(--bg-panel-dark);
|
|
border-bottom: 1px solid var(--border-dim);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
gap: 16px;
|
|
}
|
|
|
|
.header-title {
|
|
color: var(--text-accent);
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.15em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.sidebar {
|
|
grid-area: sidebar;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-right: 1px solid var(--border-dim);
|
|
overflow: hidden;
|
|
gap: var(--panel-gap);
|
|
}
|
|
|
|
.panel {
|
|
border: 1px solid var(--border-dim);
|
|
background: var(--bg-panel);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.panel-header {
|
|
background: var(--bg-panel-dark);
|
|
border-bottom: 1px solid var(--border-dim);
|
|
padding: 6px 12px;
|
|
font-size: 11px;
|
|
letter-spacing: 0.12em;
|
|
color: var(--text-accent);
|
|
text-transform: uppercase;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
/* Device manage section — collapsible via <details> */
|
|
.device-manage-section {
|
|
border-top: 1px solid var(--border-dim);
|
|
}
|
|
|
|
.device-manage-section > summary {
|
|
padding: 5px 12px;
|
|
font-size: 10px;
|
|
letter-spacing: 0.1em;
|
|
text-transform: uppercase;
|
|
color: var(--text-dim);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
list-style: none;
|
|
}
|
|
|
|
.device-manage-section > summary::-webkit-details-marker { display: none; }
|
|
|
|
.device-manage-section > summary::before {
|
|
content: "▶ ";
|
|
font-size: 8px;
|
|
}
|
|
|
|
.device-manage-section[open] > summary {
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.device-manage-section[open] > summary::before {
|
|
content: "▼ ";
|
|
}
|
|
|
|
.device-manage-section > summary:hover {
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.panel-content {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
overflow-y: auto;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* Scrollbar — terminal feel */
|
|
::-webkit-scrollbar { width: 4px; }
|
|
::-webkit-scrollbar-track { background: var(--bg-primary); }
|
|
::-webkit-scrollbar-thumb { background: var(--border-dim); }
|
|
|
|
.main-area {
|
|
grid-area: main;
|
|
background: var(--bg-panel-dark);
|
|
border: 1px solid var(--border-dim);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-dim);
|
|
font-size: 14px;
|
|
letter-spacing: 0.1em;
|
|
}
|
|
|
|
.transport-bar {
|
|
grid-area: transport;
|
|
background: var(--bg-panel-dark);
|
|
border-top: 1px solid var(--border-dim);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
color: var(--text-dim);
|
|
font-size: 12px;
|
|
letter-spacing: 0.08em;
|
|
}
|
|
|
|
/* Status dot */
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--text-dim);
|
|
flex-shrink: 0;
|
|
}
|
|
.status-dot.connected { background: #00ff88; }
|
|
.status-dot.error { background: #ff3333; }
|
|
|
|
/* Text helpers */
|
|
.text-dim { color: var(--text-dim); }
|
|
.text-accent { color: var(--text-accent); }
|
|
|
|
/* Device list rows */
|
|
.device-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 0;
|
|
border-bottom: 1px solid var(--bg-panel-dark);
|
|
gap: 8px;
|
|
}
|
|
.device-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.device-row-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Form elements */
|
|
input, select, button {
|
|
background: var(--bg-panel);
|
|
border: 1px solid var(--border-dim);
|
|
color: var(--text-primary);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--font-size);
|
|
padding: 4px 8px;
|
|
outline: none;
|
|
}
|
|
|
|
button:hover {
|
|
border-color: var(--border-bright);
|
|
color: var(--text-accent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Device form */
|
|
.device-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 8px 12px;
|
|
border-top: 1px solid var(--border-dim);
|
|
}
|
|
|
|
.device-form button[type="submit"] {
|
|
margin-top: 4px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
}
|
|
|
|
/* Device remove button */
|
|
.device-remove {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-dim);
|
|
font-family: var(--font-mono);
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.device-remove:hover {
|
|
color: #ff3333;
|
|
border: none;
|
|
}
|
|
|
|
/* Transport controls */
|
|
.transport-controls {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.transport-btn {
|
|
background: var(--bg-panel);
|
|
color: var(--accent);
|
|
border: 1px solid var(--border-dim);
|
|
padding: 4px 10px;
|
|
font-family: var(--font-mono);
|
|
font-size: 0.85rem;
|
|
cursor: pointer;
|
|
min-width: 36px;
|
|
text-align: center;
|
|
}
|
|
|
|
.transport-btn:hover {
|
|
background: var(--accent);
|
|
color: var(--bg-primary);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.transport-time {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.85rem;
|
|
white-space: nowrap;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.transport-seek {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.seek-slider {
|
|
width: 100%;
|
|
accent-color: var(--accent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.transport-file {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.audio-path-input {
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-dim);
|
|
padding: 4px 8px;
|
|
font-family: var(--font-mono);
|
|
font-size: 0.8rem;
|
|
width: 200px;
|
|
}
|
|
|
|
.audio-path-input:focus {
|
|
border-color: var(--accent);
|
|
outline: none;
|
|
}
|
|
|
|
/* Transport bar layout override */
|
|
.transport-bar {
|
|
gap: 12px;
|
|
padding: 6px 12px;
|
|
}
|
|
|
|
/* Waveform */
|
|
.waveform-container {
|
|
background: var(--bg-primary);
|
|
border: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.playback-cursor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 2px;
|
|
height: 100%;
|
|
background: var(--accent);
|
|
pointer-events: none;
|
|
transition: left 0.1s linear;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* Beat indicator in header */
|
|
.beat-indicator {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--text-dim);
|
|
flex-shrink: 0;
|
|
transition: background 0.05s ease;
|
|
}
|
|
|
|
.beat-indicator.beat-flash {
|
|
background: #ffcc00;
|
|
box-shadow: 0 0 8px #ffcc00;
|
|
}
|
|
|
|
/* Animation selector */
|
|
.animation-select-input {
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-dim);
|
|
padding: 4px 8px;
|
|
font-family: var(--font-mono);
|
|
font-size: var(--font-size);
|
|
width: 100%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.animation-select-input:focus {
|
|
border-color: var(--border-bright);
|
|
outline: none;
|
|
}
|