feat: connect drum sequencer to clip model#15
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3.
Connects the 16-step drum sequencer UI to a serializable hybrid clip model and routes the current drum pattern into the existing sample loop scheduler on transport play.
Changes
src/model/drum-clip.tswith hybrid clip, drum lane, drum event, and step-toggle model helpers.DrumSequencerfrom localSetstate to props backed byHybridClip.drumEventsand orderedHybridClip.drumLanes.audioEngine.startSampleLoop().audioEngine.updateSampleLoopEvents().public/samples/drums/.Illegal Invocationduring scheduler startup by wrapping default timer callbacks throughglobalThis.PLANS.md, the drum sequencer feature spec,docs/data-model.md,docs/ui-design.md, anddocs/audio-engine.md.Lane to Sample Mapping
kick->fred-kick-1/FRED KICK 1snare->fred-snare-1/FRED SNARE 1closedHat->fred-closed-hi-hat/FRED CLOSED HI-HATopenHat->fred-open-hi-hat/FRED OPEN HI-HATSample Display Rule
Bundled drum sample labels are derived from
.wavfile names: remove.wav, replace underscores with spaces, and uppercase the result. Example:Fred_Kick_1.wavdisplays asFRED KICK 1.Testing
npm run typechecknpm run lintnpm run testnpm run buildScreenshots
No screenshot attached. UI layout is largely unchanged; step active state now reflects clip model state.
Notes / Limitations
http://127.0.0.1:5174/because 5173 was already occupied locally.aria-hidden.Follow-up