You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,8 @@ The main rule is separation of concerns: UI rendering, persistence, and audio sc
52
52
- Store sample references by stable IDs or metadata, not decoded buffers.
53
53
- Handle browser file import boundaries for user-provided audio files.
54
54
- Keep `File`, `Blob`, object URL, IndexedDB handles, and decoded audio buffers out of model data.
55
-
- Persist the active browser project and imported sample blobs through IndexedDB.
56
-
- Persist a browser-local project collection when multi-project management exists.
55
+
- Persist browser-local project documents and imported sample blobs through IndexedDB.
56
+
- Persist a browser-local project collection for create/select/rename/delete workflows.
57
57
- Store the active project ID separately from the project document.
58
58
- Export rendered arrangement audio as WAV without storing runtime audio objects in project JSON.
59
59
@@ -96,7 +96,11 @@ Imported browser files are also runtime or persistence-layer data. Project JSON
96
96
97
97
IndexedDB may store imported sample blobs or bytes outside the project JSON document. The model should reference those blobs by stable sample IDs so the audio engine can rebuild decoded runtime caches after restore.
98
98
99
-
When multiple local projects exist, each persisted project should have a stable project ID. Imported sample blobs should be scoped to the owning project, for example with a composite key such as `${projectId}:${sampleId}` or an equivalent indexed record shape. Switching projects should stop live playback and preview before replacing app state. Autosave must write to the intended project ID and must not accidentally overwrite another project after a switch.
99
+
Each persisted project has a stable project ID. Imported sample blobs are scoped
100
+
to the owning project with project-aware records and composite blob keys.
101
+
Switching projects should stop live playback and preview before replacing app
102
+
state. Autosave must write to the intended project ID and must not accidentally
103
+
overwrite another project after a switch.
100
104
101
105
Mixer settings such as volume, mute, solo, and master volume are serializable project or app-model data once real mixer routing exists. Mixer runtime data, including `GainNode`, `AnalyserNode`, effect nodes, meter buffers, and active routing graphs, belongs to the audio engine runtime and must not be stored in project JSON.
Copy file name to clipboardExpand all lines: docs/data-model.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,8 @@ The initial transport UI range is 60 to 180 BPM. Implementations should validate
40
40
41
41
## Project Collection
42
42
43
-
The app should support multiple browser-local projects after the multi-project management feature.
43
+
The app supports multiple browser-local projects through IndexedDB project
44
+
documents plus separate collection metadata.
44
45
45
46
`Project` remains the serializable document for one song or sketch. Each project should have a stable ID and contain the musical data already documented in this file: clips, arrangement tracks, clip instances, arrangement length, loop range, sample metadata, tempo, mixer settings, and related project fields.
The current implementation may still have one active project in memory at a time. The multi-project feature should make the active project ID serializable browser-local state so a refresh restores the last selected project.
64
+
The current implementation keeps one active project in memory at a time. The
65
+
active project ID is serializable browser-local state so a refresh restores the
66
+
last selected project.
64
67
65
-
Imported sample blobs are not project JSON. In a multi-project store, imported blob records must be scoped to the owning project so two projects can safely have the same local `sampleId`. A composite key such as `${projectId}:${sampleId}` is acceptable, or the persistence layer may add a `projectId` field and an IndexedDB index if that keeps deletion and migration clearer.
68
+
Imported sample blobs are not project JSON. Imported blob records are scoped to
69
+
the owning project so two projects can safely have the same local `sampleId`.
70
+
The first implementation stores imported blobs in a project-scoped IndexedDB
71
+
store keyed by a composite ID such as `${projectId}::${sampleId}` and also keeps
72
+
the `projectId` on the record for deletion by project.
66
73
67
74
Switching projects should not mutate the outgoing project document except for an intentional save or autosave flush. Runtime UI selection, decoded sample caches, active source nodes, transport state, and audio preview state should be reset or rebuilt for the newly active project.
68
75
@@ -165,7 +172,11 @@ The model should keep these concepts separate:
165
172
166
173
Imported file bytes and decoded sample data are not project JSON. IndexedDB persistence may store imported blobs outside the project document and connect them back through stable sample IDs. Until that persistence feature exists, imported audio clips may be session-only and should be documented in the UI.
167
174
168
-
The first IndexedDB persistence implementation stores the active project document separately from imported sample blobs. The project document may include clips, arrangement tracks, clip instances, loop range, sample metadata, tempo, track mixer state, and master mixer state. Imported sample blobs are stored in a blob store keyed by `sampleId` and are not embedded inside the project document.
175
+
The IndexedDB persistence implementation stores each project document separately
176
+
from imported sample blobs. The project document may include clips, arrangement
0 commit comments