How shreesha41223/drum-kit works
This is a browser-based drum-kit recorder and track player. Users trigger drum sounds from the keyboard, record timed notes and pauses into tracks, select a saved track, then play, pause, resume, or stop it. The main module handles browser interactions and coordinates the store, action generation, and player; the reducer applies state transitions. The excerpts show audio elements being played but do not show how the sound files are wired into the page, so that asset relationship is omitted.
Main entry points: main.ts Input and UI · player.ts Track Player · redux.ts State Store · reducer.ts State Transitions
Components 9
Browser Interaction
- Input and UI
src/main.ts - Browser Audio
Recording State
- Action Generator
src/util.ts - State Store
src/redux.ts - State Transitions
src/reducer.ts - Track Model
src/state.ts
Track Playback
- Track Player
src/player.ts
Other components
- User
- Keyboard
Connections 12
- User → Input and UI: clicks controls
src/main.ts - Keyboard → Input and UI: presses keys
src/main.ts - Input and UI → Action Generator: requests actions
src/main.ts - Input and UI → State Store: dispatches actions
src/main.ts - Input and UI → State Transitions: configures store
src/main.ts - State Store → State Transitions: reduces actions
src/redux.ts - Input and UI → Track Player: creates player
src/main.ts - Input and UI → Browser Audio: plays key sound
src/main.ts - Track Player → Browser Audio: plays track notes
src/player.ts - Track Player → State Store: dispatches stop
src/player.ts - Action Generator → Track Model: uses track types
src/util.ts - State Transitions → Track Model: updates track state
src/reducer.ts