Build BeatHound sequencer app

This commit is contained in:
Ninosaurier committed 2026-11-15 10:47:01 +01:00
1 parent 226ababcf1
commit e23825cdb1
49 files changed
+6455 -2

No files matched your search

+968
View File
@@ -0,0 +1,968 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
/* Theme tokens and document defaults */
:root {
font-family: 'DM Sans', sans-serif;
color: var(--ink);
background: var(--base);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
color-scheme: dark;
--ion-color-primary: #edebff;
--ion-color-primary-rgb: 237, 235, 255;
--ion-color-primary-contrast: #111116;
--ion-color-primary-contrast-rgb: 17, 17, 22;
--ion-color-primary-shade: #d1cfe0;
--ion-color-primary-tint: #efedff;
--ion-color-secondary: #ff8a3d;
--ion-color-secondary-rgb: 255, 138, 61;
--ion-color-secondary-contrast: #111116;
--ion-color-secondary-contrast-rgb: 17, 17, 22;
--ion-color-secondary-shade: #e07936;
--ion-color-secondary-tint: #ff9650;
--ion-color-medium: #b8b4e0;
--ion-color-medium-rgb: 184, 180, 224;
--ion-color-medium-contrast: #111116;
--ion-color-medium-contrast-rgb: 17, 17, 22;
--ion-color-medium-shade: #a29ec5;
--ion-color-medium-tint: #c2bfe4;
--ion-background-color: #111116;
--ion-background-color-rgb: 17, 17, 22;
--ion-text-color: #edebff;
--ion-text-color-rgb: 237, 235, 255;
--base: #111116;
--surface: #1a1a21;
--surface-raised: #23232b;
--border: #302f38;
--ink: #f4f1ed;
--muted: #b8b4e0;
--soft: #9e9acb;
--accent: #ff8a3d;
--accent-hover: #ff9b5c;
--accent-pressed: #e07936;
--primary-rgb: 244, 241, 237;
--accent-rgb: 255, 138, 61;
--mono: 'DM Mono', monospace;
--display: 'Space Grotesk', sans-serif;
}
* {
box-sizing: border-box;
}
html,
body,
ion-app,
ion-page {
min-width: 320px;
min-height: 100%;
margin: 0;
background: var(--base);
}
body {
font-family: 'DM Sans', sans-serif;
}
ion-content.app-content {
--background: var(--base);
color: var(--ink);
}
/* Application shell and studio heading */
.app-shell {
min-height: 100%;
padding: 0 24px 32px;
background: var(--base);
}
.app-header {
display: flex;
width: min(100%, 900px);
height: 76px;
align-items: center;
justify-content: space-between;
margin: 0 auto;
border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}
.brand {
display: inline-flex;
align-items: center;
text-decoration: none;
}
.brand-logo {
display: block;
width: 156px;
max-height: 42px;
object-fit: contain;
}
.orbit-card-heading {
font-family: var(--mono);
font-size: 9px;
font-weight: 500;
letter-spacing: 1px;
}
.header-tag {
color: var(--soft);
font-family: 'DM Sans', sans-serif;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.1px;
}
.studio {
width: min(100%, 660px);
margin: 0 auto;
padding-bottom: 24px;
}
.studio-heading {
padding: 37px 0 10px;
text-align: center;
}
.studio-heading h1 {
margin: 0;
color: var(--ink);
font: 500 clamp(34px, 7vw, 44px)/1.1 var(--display);
letter-spacing: -1.8px;
}
.template-prompt {
margin: 18px 0 0;
color: var(--muted);
font-size: 10px;
}
.beat-template-selector {
display: flex;
justify-content: center;
margin-top: 6px;
}
.beat-template-trigger {
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
--background-activated: #3b3944;
--border-radius: 9px;
--border-width: 0;
height: 40px;
margin: 0;
font-size: 11px;
font-weight: 600;
text-transform: none;
}
.beat-template-trigger::part(native) {
padding-inline: 14px;
}
.beat-template-trigger-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
justify-content: center;
gap: 8px;
}
.beat-template-trigger ion-icon {
font-size: 13px;
}
.beat-template-popover {
--width: 230px;
--background: var(--surface);
--backdrop-opacity: 0;
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.beat-template-options {
display: flex;
flex-direction: column;
gap: 3px;
padding: 7px;
}
.beat-template-option {
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
--background-activated: #3b3944;
--border-radius: 8px;
width: 100%;
height: 56px;
flex: 0 0 56px;
margin: 0;
font-size: 11px;
text-transform: none;
}
.beat-template-option::part(native) {
padding-inline: 11px;
}
.beat-template-option-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
flex-direction: column;
justify-content: center;
gap: 2px;
text-align: center;
}
.beat-template-option-copy {
display: flex;
min-width: 0;
flex-direction: column;
align-items: center;
gap: 2px;
text-align: center;
}
.beat-template-option-label {
color: var(--ink);
font-weight: 600;
}
.beat-template-option-description {
color: var(--muted);
font-size: 9px;
font-weight: 400;
}
.beat-template-option-meta {
color: var(--soft);
font-size: 9px;
text-align: center;
white-space: nowrap;
}
.intro-copy {
margin: 7px 0 0;
color: var(--muted);
font-size: 13px;
}
.intro-copy.is-hidden {
visibility: hidden;
}
/* Preset and instrument selectors */
.orbit-card {
overflow: hidden;
padding: 21px 27px 17px;
border: 1px solid var(--border);
border-radius: 18px;
background: var(--base);
}
.orbit-card-heading {
display: flex;
align-items: center;
justify-content: space-between;
color: var(--ink);
}
.sound-ring-selector-trigger {
--color: var(--muted);
--border-radius: 7px;
height: 30px;
margin: 0;
font-family: var(--mono);
font-size: 8px;
font-weight: 500;
letter-spacing: 0.65px;
text-transform: uppercase;
}
.sound-ring-selector-trigger::part(native) {
padding: 0 4px;
}
.sound-ring-trigger-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
justify-content: center;
gap: 8px;
white-space: nowrap;
}
.sound-ring-selector-trigger ion-icon {
font-size: 12px;
}
.ring-selector-swatch {
display: inline-block;
width: 8px;
height: 8px;
flex: 0 0 auto;
border-radius: 50%;
}
.sound-ring-popover {
--width: 160px;
--background: var(--surface);
--backdrop-opacity: 0;
--box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.sound-ring-options {
display: flex;
flex-direction: column;
gap: 3px;
padding: 7px;
}
.sound-ring-option {
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
--background-activated: #3b3944;
--border-radius: 7px;
width: 100%;
height: 36px;
flex: 0 0 36px;
margin: 0;
font-size: 11px;
text-align: left;
text-transform: none;
}
.sound-ring-option::part(native) {
padding-inline: 10px;
}
.sound-ring-option-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
justify-content: center;
gap: 8px;
}
.timeline-wrap {
width: min(100%, 570px);
margin: 0 auto;
}
/* Circular timeline, markers, and playback cursor */
.circular-timeline {
display: block;
width: 100%;
overflow: visible;
touch-action: none;
user-select: none;
}
.timeline-orbit {
fill: none;
stroke: rgba(var(--primary-rgb), 0.22);
stroke-width: 1.5;
transform-box: fill-box;
transform-origin: center;
transition: r 720ms cubic-bezier(0.22, 1.15, 0.36, 1), opacity 360ms ease, stroke-width 360ms ease;
}
.timeline-orbit.is-focused {
animation: orbit-focus-wave 900ms ease-out both;
}
@keyframes orbit-focus-wave {
0% { transform: scale(1); }
24% { transform: scale(1.045); }
46% { transform: scale(0.985); }
68% { transform: scale(1.022); }
86% { transform: scale(0.995); }
100% { transform: scale(1); }
}
.timeline-orbit-hit-area {
cursor: pointer;
transition: r 720ms cubic-bezier(0.22, 1.15, 0.36, 1);
}
.timeline-tick line {
stroke: rgba(var(--primary-rgb), 0.34);
stroke-width: 1;
}
.timeline-tick.is-substep line {
stroke: rgba(var(--primary-rgb), 0.18);
stroke-width: 0.75;
}
.timeline-tick.is-major line {
stroke: #b8b4e0;
stroke-width: 1.5;
}
.timeline-tick text {
fill: var(--muted);
font: 9px var(--mono);
}
.timeline-playhead line {
stroke: #fff;
stroke-width: 1;
}
.timeline-playhead circle {
fill: #fff;
filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.75));
}
.sound-point {
cursor: grab;
outline: none;
}
.sound-point:active {
cursor: grabbing;
}
.sound-point-hit-area {
fill: transparent;
pointer-events: all;
transition: cx 720ms cubic-bezier(0.22, 1.15, 0.36, 1), cy 720ms cubic-bezier(0.22, 1.15, 0.36, 1);
}
.sound-point-face {
fill: currentColor;
stroke: var(--base);
stroke-width: 3;
transition:
cx 720ms cubic-bezier(0.22, 1.15, 0.36, 1),
cy 720ms cubic-bezier(0.22, 1.15, 0.36, 1),
stroke-width 120ms ease,
filter 120ms ease;
}
.sound-point:hover .sound-point-face,
.sound-point.is-selected .sound-point-face,
.sound-point:focus-visible .sound-point-face {
stroke: #fff;
stroke-width: 2.5;
filter: drop-shadow(0 0 5px currentColor);
}
.timeline-hint-row {
display: grid;
height: 44px;
min-height: 44px;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 8px;
}
/* Beat selection status and actions */
.timeline-hint-tempo {
display: flex;
justify-content: flex-start;
}
.timeline-hint {
display: block;
width: 100%;
min-width: 0;
height: 20px;
min-height: 20px;
margin: 0;
padding: 0;
color: var(--muted);
font-size: 11px;
line-height: 20px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.timeline-hint-tempo .tempo-trigger::part(native) {
padding-inline: 8px;
}
.timeline-hint-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 4px;
}
.timeline-delete-button {
width: 44px;
height: 44px;
margin: 0;
--color: #ff5964;
--color-activated: #ff303f;
--background-hover: rgba(255, 89, 100, 0.12);
--border-radius: 9px;
}
.timeline-delete-placeholder {
display: block;
width: 44px;
height: 44px;
flex: 0 0 44px;
}
.timeline-delete-button ion-icon {
font-size: 28px;
}
.hint-swatch,
.legend-swatch {
width: 8px;
height: 8px;
flex: 0 0 auto;
border-radius: 50%;
}
.hint-swatch {
display: inline-block;
margin-right: 7px;
vertical-align: middle;
}
.hint-separator {
display: inline-block;
margin: 0 7px;
color: #7671a7;
}
.sound-legend {
display: flex;
justify-content: center;
gap: 22px;
padding-top: 17px;
}
.legend-sound {
display: inline-flex;
align-items: center;
gap: 7px;
color: var(--muted);
font-size: 11px;
}
.legend-empty {
color: var(--soft);
font-size: 11px;
}
.legend-swatch {
width: 7px;
height: 7px;
}
.audio-error {
margin: 13px auto 0;
color: #ffad8b;
font-size: 12px;
text-align: center;
}
/* Transport and sound-add controls */
.transport-footer {
--background: rgba(17, 17, 22, 0.97);
position: relative;
overflow: visible;
border-top: 1px solid rgba(var(--primary-rgb), 0.12);
backdrop-filter: blur(18px);
}
.transport-toolbar {
--background: transparent;
--border-color: transparent;
--min-height: 84px;
}
.transport-inner {
display: flex;
width: min(100%, 660px);
min-height: 84px;
align-items: center;
justify-content: flex-start;
gap: 17px;
margin: 0 auto;
padding: 12px 86px max(12px, env(safe-area-inset-bottom)) 20px;
}
.transport-play-button {
--background: var(--accent);
--background-hover: var(--accent-hover);
--background-activated: var(--accent-pressed);
--color: var(--ion-color-secondary-contrast);
--border-radius: 11px;
--box-shadow: none;
min-width: 112px;
height: 49px;
margin: 0;
font-size: 13px;
font-weight: 700;
text-transform: none;
}
.transport-play-button ion-icon {
font-size: 17px;
}
.tempo-trigger {
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
--background-activated: #3b3944;
--border-radius: 8px;
--border-width: 0;
--padding-top: 8px;
--padding-bottom: 8px;
height: 42px;
margin: 0;
font-size: 11px;
font-variant-numeric: tabular-nums;
font-weight: 600;
text-transform: none;
}
.meter-trigger {
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
--background-activated: #3b3944;
--border-radius: 8px;
--border-width: 0;
--padding-top: 8px;
--padding-bottom: 8px;
height: 42px;
margin: 0;
font-size: 11px;
font-variant-numeric: tabular-nums;
font-weight: 600;
text-transform: none;
}
.tempo-trigger ion-icon,
.meter-trigger ion-icon {
margin-left: 4px;
font-size: 13px;
}
.tempo-trigger::part(native),
.meter-trigger::part(native) {
padding-inline: 14px;
}
.tempo-trigger-content,
.meter-trigger-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
justify-content: center;
gap: 8px;
white-space: nowrap;
}
.tempo-value {
color: var(--ink);
font-size: 12px;
font-weight: 600;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
/* Popover contents */
.tempo-popover {
--width: 94px;
--height: 226px;
--background: var(--surface);
--backdrop-opacity: 0;
--box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.2);
}
.tempo-popover-content {
display: flex;
width: 100%;
height: 100%;
box-sizing: border-box;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
padding: 10px;
}
.tempo-range-track {
position: relative;
width: 28px;
height: 164px;
flex: 0 0 164px;
}
.tempo-range {
position: absolute;
top: 50%;
left: 50%;
width: 164px;
height: 28px;
margin: 0;
transform: translate(-50%, -50%) rotate(-90deg);
--bar-background: #58537d;
--bar-background-active: var(--accent);
--bar-height: 3px;
--height: 28px;
--knob-background: var(--accent);
--knob-size: 12px;
--padding-top: 2px;
--padding-bottom: 2px;
--padding-start: 2px;
--padding-end: 2px;
}
.meter-popover {
--width: 96px;
--height: 224px;
--background: var(--surface);
--backdrop-opacity: 0;
--box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.2);
}
.meter-popover-content {
display: flex;
width: 100%;
height: 100%;
box-sizing: border-box;
flex-direction: column;
gap: 2px;
padding: 8px;
}
.meter-option {
--color: var(--ink);
--background: var(--surface-raised);
--background-activated: #3b3944;
--background-hover: #33323b;
--border-radius: 7px;
width: 100%;
height: 31px;
flex: 0 0 31px;
margin: 0;
font-size: 11px;
font-weight: 600;
text-transform: none;
}
.meter-option-content {
display: flex;
width: 100%;
justify-content: center;
text-align: center;
}
.meter-option::part(native) {
text-align: center;
}
.transport-fab {
position: absolute;
top: 15px;
right: max(14px, calc((100vw - 660px) / 2 + 20px));
bottom: auto;
left: auto;
z-index: 1001;
display: block;
width: 54px;
height: 54px;
flex: 0 0 54px;
}
.add-sound-fab {
--background: var(--surface-raised);
--background-activated: #33323b;
--color: var(--ink);
--box-shadow: none;
width: 54px;
height: 54px;
margin: 0;
border: 1px solid var(--border);
border-radius: 50%;
font-size: 22px;
}
.sound-fab-list {
right: 0;
left: auto;
z-index: 3;
}
.sound-fab-option {
--background: var(--surface);
--background-activated: var(--surface-raised);
--color: var(--ink);
--box-shadow: 0 5px 16px rgba(var(--primary-rgb), 0.16);
--border-radius: 12px;
width: 112px;
height: 42px;
margin: 5px 0;
font-size: 11px;
font-weight: 600;
white-space: nowrap;
}
.sound-fab-option::part(native) {
padding: 0 10px;
}
.sound-fab-option-content {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
justify-content: center;
gap: 7px;
}
.sound-fab-option-content > span {
text-align: center;
}
.sound-fab-option ion-icon {
font-size: 15px;
}
@media (max-width: 600px) {
/* Compact layout */
.app-shell {
padding: 0 14px 26px;
}
.app-header {
height: 65px;
}
.brand-logo {
width: min(142px, 42vw);
max-height: 38px;
}
.header-tag {
font-size: 9px;
letter-spacing: 0;
}
.studio-heading {
padding: 28px 0 8px;
}
.studio-heading h1 {
font-size: 36px;
}
.template-prompt {
margin-top: 13px;
}
.intro-copy {
font-size: 12px;
}
.orbit-card {
padding: 17px 11px 14px;
border-radius: 14px;
}
.timeline-wrap {
width: min(100%, 490px);
}
.timeline-hint {
font-size: 10px;
}
.timeline-hint-tempo .tempo-trigger::part(native) {
padding-inline: 6px;
}
.transport-inner {
gap: 4px;
padding-right: 80px;
padding-left: 14px;
}
.transport-play-button {
min-width: 98px;
}
.tempo-trigger,
.meter-trigger {
font-size: 10px;
}
.tempo-trigger::part(native),
.meter-trigger::part(native) {
padding-inline: 10px;
}
}
@media (max-width: 360px) {
.header-tag {
max-width: 145px;
font-size: 8px;
text-align: right;
}
.transport-inner {
gap: 3px;
padding-right: 80px;
padding-left: 10px;
}
.transport-play-button {
min-width: 82px;
--padding-start: 10px;
--padding-end: 10px;
font-size: 12px;
}
.tempo-trigger,
.meter-trigger {
font-size: 9px;
}
.tempo-trigger::part(native),
.meter-trigger::part(native) {
padding-inline: 8px;
}
.timeline-hint-tempo .tempo-trigger::part(native) {
padding-inline: 4px;
}
.tempo-trigger ion-icon,
.meter-trigger ion-icon {
margin-left: 1px;
font-size: 11px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}