SonicStudio is a browser-native composition studio built with React and Tone.js. It is aimed at fast song sketching, sound design, arrangement editing, and practical workflow exits inside the browser.
The current build supports an actual writing flow:
- build phrases in the sequencer or piano roll
- arrange clips in song view
- shape lanes with synth and sample sources
- print references as WAV
- move work in and out through MIDI
- recover safely with checkpoints and snapshots
- Sequencer, piano roll, mixer, arranger, and sound desk tied to one serializable project state
- Synth lanes and sample lanes with slice-aware triggering
- Song markers, loop ranges, clip editing, pattern transforms, and section duplication
- MIDI import and scoped MIDI export
- WAV bounce with scope selection, print targets, analysis, and bounce history
- Master presets, master snapshots, track sound recall, and recovery checkpoints
- Starter scenes for quick starts and first use
The codebase is now split around a few real boundaries:
src/context/AudioContext.tsxThin integration shell for the audio provider. It now wires controllers, reducer state, persistence, keyboard shortcuts, and the public context surface instead of owning the reducer internals directly.src/context/editor/projectMutations.tsPure arranger clip and track mutation helpers used by the reducer.src/context/editor/editorDispatchers.tsDispatch-bound action methods used by the provider so action wiring is no longer handwritten inline.src/context/editor/keyboardShortcuts.tsRuntime keyboard shortcut bridge for undo, redo, save, transport, metronome, and pattern focus.src/context/editor/reducer/*Domain reducer ownership split across UI, project, track source, note-event editing, note-pattern editing, clip-pattern step editing, clip-pattern event editing, automation, transforms, track structure, arranger, and history action maps, plus reducer utilities and editor state types.src/context/editor/transportController.tsPlayback, recording, preview, and transport reset orchestration for the provider layer.src/context/editor/renderController.tsProvider-facing mix, stem, MIDI, and bounce-history orchestration.src/context/editor/sessionController.tsProvider-facing session import, export, restore, checkpoint, and template-load orchestration.src/app/routeController.tsExplicit launch and deep-link state resolution so first run, persisted sessions, and query-driven entry all follow one path.src/services/renderWorkflow.tsRender and bounce orchestration.src/services/sessionWorkflow.tsPersistence, checkpoint, and import orchestration.src/components/settings/*Workspace, track, and output controls broken into smaller panels.src/components/arranger/*Arranger selector logic, interaction utilities, clip drag and paint hooks, viewport and shortcut hooks, inspector panels, and hero-surface view modules.
The main remaining refactor targets are now:
- reducer ownership still concentrated in
src/context/editor/reducer/trackNotePatternActions.tsandsrc/context/editor/reducer/trackClipPatternStepActions.ts - deeper controller and reducer integration correctness coverage around transport, restore, export scope replay, and route-driven session entry
- device-rack source ownership still concentrated in the slice and source-window authoring path
- Start the dev server or open the hosted build
- Use the launch surface to open a real scene, start blank, or import MIDI
- Load
Beat Labfor rhythm work orNight Transitfor a fuller song sketch - Open
Songview to inspect clips and structure - Open
Notesto inspect tighter pitch and gate editing - Try
Export MIDIor a WAV bounce from the Output tab
Prerequisite: Node.js 20+
npm install
npm run devVite serves the studio at http://localhost:3000/SonicStudio/.
npm run lint
npm test
npm run buildCurrent test coverage includes reducer invariants, arranger selector and interaction logic, clip mutation helpers, note edit hydration, MIDI round trips, transport-controller behavior, render workflow behavior, session workflow behavior, explicit route resolution, and controller-level render and restore seams.
The strongest next milestones are:
- keep shrinking reducer concentration in note-pattern and clip-pattern step ownership
- expand correctness coverage around reducer action-map behavior, checkpoint restore, transport state, render-scope replay, and route-driven entry
- keep the device rack moving toward true source, shape, space, slicing, and recall ownership boundaries, with the slice and source-window path next
- keep the arranger focused on composition fluency instead of growing every side feature equally
- keep the launch surface and route entry logic explicit instead of drifting back into layered shell clutter