In Review
Allow users to increase or decrease the arrangement length instead of keeping the arrangement fixed at 16 bars.
The current arrangement shell uses a fixed 16-bar timeline. Users need to extend the song as they build a project and reduce the length when the project is shorter.
The arrangement length should be serializable project state and should drive the ruler, grid, horizontal scroll area, loop boundaries, and export duration.
Included:
- Add
arrangement.lengthBarsor an equivalent serializable field to project state. - Default new projects to 16 bars.
- Add arrangement toolbar controls to increment and decrement the arrangement length.
- Derive ruler labels, grid width, loop bounds, and playback bounds from arrangement length.
- Keep a minimum arrangement length of 1 bar.
- Use a practical maximum length for the first implementation, such as 128 bars.
- Prevent or clearly confirm reducing arrangement length when clip instances would extend beyond the new end.
- Clamp or validate arrangement loop ranges so they remain inside the arrangement length.
Excluded:
- Infinite timeline behavior.
- Zoom controls.
- Track count management.
- Clip trimming or time-stretching.
- Export rendering.
- Advanced timeline virtualization unless performance requires it.
- Store arrangement length in musical units and derive ticks from PPQ/bar math.
- Keep the model serializable.
- Avoid coupling timeline rendering to audio scheduling internals.
- Do not delete clip instances outside a shortened range without explicit user confirmation.
- The arrangement can be expanded beyond 16 bars.
- The arrangement can be reduced when safe.
- Ruler labels and grid lines match the selected arrangement length.
- Loop start/end controls cannot move outside the arrangement.
- Playback uses the current arrangement length and loop range.
- The selected arrangement length survives project persistence once persistence exists.
Run:
npm run typecheck --if-presentnpm run lint --if-presentnpm run test --if-presentnpm run build --if-present
Manual check:
- Increase the arrangement length and confirm bars appear past 16.
- Decrease the arrangement length and confirm the ruler/grid update.
- Try reducing length below existing clip instances and confirm the app blocks or confirms the destructive action.
- Confirm loop handles stay within the arrangement bounds.
- Confirm playback still loops over the selected range.
- Summarize the model field used for arrangement length.
- Explain the chosen min/max bar limits.
- Note how shortening is handled when clips exist past the new end.