Build BeatHound sequencer app
This commit is contained in:
1 parent
226ababcf1
commit
e23825cdb1
49 files changed
+6455
-2
No files matched your search
+60
@@ -0,0 +1,60 @@
|
||||
import { IonApp, IonContent, IonPage } from '@ionic/react';
|
||||
import { BeatLoopPanel } from './components/BeatLoopPanel';
|
||||
import { BeatTemplateSelector } from './components/BeatTemplateSelector';
|
||||
import { TransportBar } from './components/TransportBar';
|
||||
import { useBeatStudio } from './hooks/useBeatStudio';
|
||||
|
||||
function App() {
|
||||
const studio = useBeatStudio();
|
||||
|
||||
return (
|
||||
<IonApp>
|
||||
<IonPage>
|
||||
<IonContent fullscreen className="app-content">
|
||||
<div className="app-shell">
|
||||
<header className="app-header">
|
||||
<a className="brand" href="#studio" aria-label="BeatHound home">
|
||||
<img
|
||||
className="brand-logo"
|
||||
src="/logo/logo-horizontal-dark-notagline.svg"
|
||||
alt=""
|
||||
/>
|
||||
</a>
|
||||
<span className="header-tag">Sharpen your sense of rhythm</span>
|
||||
</header>
|
||||
|
||||
<main id="studio" className="studio">
|
||||
<div className="studio-heading">
|
||||
<h1>Build a beat.</h1>
|
||||
<p className="template-prompt">Choose a dance template</p>
|
||||
<BeatTemplateSelector onSelectTemplate={studio.applyTemplate} />
|
||||
<p
|
||||
className={`intro-copy${studio.sequencer.beats.length > 0 ? ' is-hidden' : ''}`}
|
||||
aria-hidden={studio.sequencer.beats.length > 0}
|
||||
>
|
||||
Add a sound, then move it around the loop.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<BeatLoopPanel sequencer={studio.sequencer} soundPalette={studio.soundPalette} />
|
||||
|
||||
{studio.sequencer.audioError && (
|
||||
<p className="audio-error" role="alert">{studio.sequencer.audioError}</p>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
</IonContent>
|
||||
|
||||
<TransportBar
|
||||
isPlaying={studio.sequencer.isPlaying}
|
||||
isStarting={studio.sequencer.isStarting}
|
||||
hasBeats={studio.sequencer.beats.length > 0}
|
||||
onTogglePlayback={studio.sequencer.togglePlayback}
|
||||
onAddSound={studio.addSound}
|
||||
/>
|
||||
</IonPage>
|
||||
</IonApp>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in new issue
Block a user