Commit Graph
262 Commits
Author SHA1 Message Date
Marco Arnulfo fe919e5d57 fix(clip): Elastic Properties stretches the clip by the requested ratio (#227) 2026-10-12 14:46:05 +02:00
Marco Arnulfo 35e9d63bee fix(markers): markers.edit applies the documented name (#236) 2026-10-12 14:30:57 +02:00
Marco Arnulfo 30372886cf fix(track): vca: null clears a VCA assignment, as documented (#237) 2026-10-12 11:03:28 +02:00
Jafz2001 87b348fecc Complete routing folder management 2026-10-11 23:50:06 -03:00
Fabio LussiandClaude Opus 5.5 092b3cc890 Consolidate covers the whole edit selection
Consolidate clamped its range to the track's last clip end plus one
second, so on an empty track a 0-5 s selection made a 1 s clip and a
2-7 s selection made nothing. It now renders, clears and places exactly
the selection, and refuses a selection too long to render instead of
placing a shorter clip. Prepare DPE keeps the old per-track bound.

Fixes #164

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 03:02:56 +02:00
Brandon Thomas b9dec547df Merge remote-tracking branch 'origin/main' into sampler 2026-10-11 21:02:27 -04:00
Brandon Thomas 525f00b719 Merge pull request #157 from grovebit/unsaved-changes
Ask before discarding unsaved changes; Save opens Save As for new sessions
2026-10-11 20:59:57 -04:00
Brandon Thomas 7f2a6977b5 Merge pull request #56 from grovebit/trackpad-scrolling
Trackpad-friendly Edit window: smooth panning, pinch and Cmd+scroll zoom
2026-10-11 20:59:45 -04:00
Brandon Thomas c5a8fd2f52 Merge pull request #49 from grovebit/drag-selection
Fix drag selection and the insertion point in the Edit window
2026-10-11 20:59:41 -04:00
Brandon Thomas 7c7e8deaaa Merge pull request #158 from natocool2/fix/web-files
Web: open, import, save and export files in the browser (fixes #63, fixes #64)
2026-10-11 20:59:37 -04:00
Brandon ThomasandClaude Opus 5.5 c5efedd740 Merge drag-selection (#49) into trackpad
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:57:06 -04:00
Brandon ThomasandClaude Opus 5.5 ef0ce90b66 Merge origin/main into drag-selection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:56:43 -04:00
Brandon ThomasandClaude Opus 5.5 7a1035a3d5 Merge origin/main into sampler-instrument
#181 already pushes instrument params each block, so drop the duplicate
apply_instrument_params. Import Session Data now brings a Sampler's sample
along and remaps its source id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:45:12 -04:00
Brandon ThomasandClaude Opus 5.5 b01abf6dd7 rustfmt the mix.send spec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:43:27 -04:00
Brandon ThomasandClaude Opus 5.5 d37386721a Merge origin/main into unsaved-changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:42:42 -04:00
Brandon ThomasandClaude Opus 5.5 e7e4a19cfa Merge origin/main into fix/web-files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:42:26 -04:00
Brandon Thomas 5a34f4118c Merge pull request #200 from Jafz2001/fix/mixer-routing-qol
Improve mixer routing menus and numeric controls
2026-10-11 20:41:06 -04:00
Brandon Thomas 4e846b8f02 Merge pull request #75 from grovebit/clip-list-delete
Clear clips and audio files from the Clip List (#4)
2026-10-11 20:40:53 -04:00
Brandon Thomas 3e97e49bfb Merge pull request #70 from grovebit/export-clips-shortcut
Shift+Cmd+K exports clips as files
2026-10-11 20:40:48 -04:00
Brandon Thomas ef04444f69 Merge pull request #84 from grovebit/record-to-disk
Record takes straight to disk
2026-10-11 20:40:44 -04:00
Brandon ThomasandClaude Opus 5.5 b25a49ee5a Merge origin/main into fix/mixer-routing-qol
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:34:16 -04:00
grovebit 157e2a9547 Fix drag selection and the insertion point in the Edit window
Fixes #166: dragging a selection up from the last track deselected it and
selected every track above instead. Fixed, along with related Edit-window drag
problems:

- Drag selection spans exactly the tracks between the press and the pointer,
  in either direction, and the whole window updates in the same frame.
- Shift+click in another track adds it to the selection with the same range,
  as in Pro Tools, so the selected tracks no longer have to be adjacent. A
  click outside the range extends it.
- Track names follow Pro Tools' rules in the Edit window, the Mix window and
  the Tracks list: Shift+click selects every track between the nearest
  selected one and the clicked one, and Cmd+click (Ctrl+click on Windows and
  Linux) adds or removes one. A click on a name used to replace the selection;
  only the Edit header's background added, and it treated Shift like Cmd.
- Dropping a track's name plate lower down no longer sends the track to the end.
- Drags act where you pressed: a quick drag from a clip edge now trims instead
  of moving the clip.
- Dragging past the edge of the track area scrolls, and a flick past the last
  track selects down to it.
- The insertion point moves on press, shows immediately, and only on the
  selected tracks.
- edit.select no longer makes a new document revision when nothing changed
  (each one is resent to the audio engine).
- Fixes a panic when a fade drag's clip shrinks to zero length.
2026-10-12 01:32:39 +01:00
grovebit e26a5f5f42 Zoom Toggle: E zooms in on the edit selection, E again zooms back out
In Pro Tools, E (with Commands Keyboard Focus on) zooms the Edit window
to the edit selection and fits the selected tracks to the window, and
pressing it again brings back the view from before. SoundCraft had no
Zoom Toggle.

view.zoom_toggle, in its own command module, stores the zoom, the
scroll and the selected tracks' heights in the session's new
edit.zoom_toggle, so the view to go back to is saved with the session.
It then zooms so the selection fills the timeline and gives the
selected tracks equal shares of the track area: Pro Tools' Fit To
Window height. Hidden tracks are left alone. Run again, it puts all of
that back. With only an insertion point the zoom stays and its tracks
are fitted. The UI passes the track area's size; agents can pass
width_px and height_px.

TrackHeight::Fit, which nothing could reach and which drew 88 points
tall, now carries its height in points, so every place that sizes a
track row reads it unchanged.

The Edit window scrolls the first fitted track to the top when Zoom
Toggle turns on, and back to where it was when it turns off, whichever
way it was toggled (key, button, control channel, undo).

As in Pro Tools, E works in the Edit window while Commands Keyboard
Focus (the a-z button) is on, on every OS. A Zoom Toggle button left of
the Zoomer lights while it is on and toggles it too.

This follows Pro Tools' Zoom Toggle settings for audio editing:
Selection for both zooms, Fit To Window, no track view change. Its
other preferences, Ctrl+E (Pro Tools' key with the focus off),
Alt+Shift+E (cancel) and following the edit selection are left out.

Tests cover the zoom, the fitted heights, going back, insertion points,
hostile sizes and stored views, and E and the toolbar button on macOS,
Windows and Linux.
2026-10-12 01:22:08 +01:00
Brandon Thomas 7c26ea4f44 Merge remote-tracking branch 'origin/main' into clear-clips 2026-10-11 20:21:45 -04:00
Brandon ThomasandClaude Opus 5.5 3b947b94bd Deselect All also clears the Clip List's file selection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:21:45 -04:00
Brandon ThomasandClaude Opus 5.5 7b2f1ac200 Merge origin/main into export-clips-shortcut
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:20:34 -04:00
Brandon Thomas 69f76ca0a5 Merge remote-tracking branch 'origin/main' into rec-disk 2026-10-11 20:19:50 -04:00
Brandon ThomasandClaude Opus 5.5 6a35fcd3a9 Re-targeting a send keeps its level, pan, mute and pre/post
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:19:19 -04:00
Brandon ThomasandClaude Opus 5.5 8f432ee0c1 Merge origin/main into fix/web-files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:16:27 -04:00
Brandon ThomasandClaude Opus 5.5 69570e5b54 Cap session bundles at 1 GiB: 4 GiB is all of wasm32's address space
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:16:15 -04:00
Brandon ThomasandClaude Opus 5.5 8d294c08f8 Merge origin/main into save-safety
Keep the never-overwrite writer, and also give sources that share a path
their own files (#123). Save Copy In checks replace, then uses
save_session_copy (#124).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:15:56 -04:00
Brandon Thomas 3731299851 Merge pull request #134 from vbasky/fix/104-volume-to-clip-gain
Convert only the selected volume automation into clip gain.
2026-10-11 19:50:56 -04:00
Brandon Thomas f1ff34f533 Merge pull request #132 from vbasky/fix/92-clip-gain-stretch
Bake varispeed into rendered clip gain, then stop stretching it again.
2026-10-11 19:50:49 -04:00
Brandon Thomas 0f32d4d4cc Merge pull request #131 from vbasky/fix/59-bounce-bus
Render a named bus when bouncing, and reject an unknown one.
2026-10-11 19:50:45 -04:00
Brandon Thomas c716584e19 Merge pull request #130 from vbasky/fix/88-audiosuite-gain
Keep clip gain when AudioSuite inverts or duplicates.
2026-10-11 19:50:42 -04:00
Brandon Thomas 776b771f59 Merge pull request #128 from vbasky/fix/89-surround-import
Import multichannel audio onto a track of the same width.
2026-10-11 19:49:37 -04:00
Brandon Thomas b76161b698 Merge pull request #125 from vbasky/fix/87-midi-export
Export MIDI controllers and honour the tracks filter.
2026-10-11 19:49:34 -04:00
Brandon ThomasandClaude Opus 5.5 adb14703e4 Merge origin/main into fix/89-surround-import
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:49:11 -04:00
Brandon ThomasandClaude Opus 5.5 cb655d9ec4 Merge origin/main into fix/87-midi-export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:49:07 -04:00
Brandon ThomasandClaude Opus 5.5 6a12573e4f Merge origin/main into fix/91-save-copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:49:02 -04:00
Brandon ThomasandClaude Opus 5.5 e7c31321f3 Volume to clip gain: keep the level outside the selection; keep clip gain points; ramps reach their end
- When every lane point lay inside the selection the lane was cleared,
  so the held level outside fell back to the fader (6 dB louder in the
  repro). Clear only when all clips lie inside the selection.
- The clip's own gain points inside the selection are kept, offset by
  the lane, instead of being dropped.
- Volume/clip-gain ramps now end on the block's last sample, so
  interpolate over n-1 steps and actually reach the end value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:44:08 -04:00
Brandon ThomasandClaude Opus 5.5 55dfcc95d1 Close the export-clips test the rebase left open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:43:41 -04:00
Brandon ThomasandClaude Opus 5.5 75430d2472 Close the export-clips test the rebase left open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:43:41 -04:00
Brandon ThomasandClaude Opus 5.5 113292cc1a Close the export-clips test the rebase left open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:43:40 -04:00
grovebit 18a2558104 Ask to save changes before closing a modified session
Close Session, New, Open, Revert, Quit, the window's close button,
dropping a session file on the window and opening one from the Workspace
window all replaced or closed the session without asking, so unsaved
edits were lost (#136). They now ask first: Save, Don't Save or Cancel.
Save on a session that has never been saved goes through Save As, then
carries on. Revert asks for confirmation instead, and Revert to Saved is
unavailable until the session has a file. A take being recorded is
stopped first, so it counts as a change. The web build has nowhere to
save, so it offers only Don't Save and Cancel. Calls from the control
channel, MCP and the CLI never ask.

Selecting, locating, zooming and scrolling no longer mark the session
modified, so the question only comes after real edits. Undoing back to
the saved state makes the session clean again. The engine compares the
document with the one last opened or saved, ignoring the selection, the
playhead and the zoom, once per revision.

Fixes #136
2026-10-11 20:13:48 +01:00
grovebit 153381e03b Flush saves to disk and keep backups of the session file
Nothing a save wrote was synced to disk, so a power cut or crash of the
system soon after Cmd+S could leave an empty or truncated session file
(the rename can reach the disk before the data), or audio files that
the session points at but that never reached the disk. No earlier
version of the session file was kept either.

New audio files, the Audio Files folder and the session's temporary
file are now synced before the session file is renamed into place, and
the session folder after the rename; templates are written the same
way. A failed write or rename removes its temporary file instead of
leaving it on a full disk. Before a save replaces the session file with
different contents, the previous version is copied to
Backups/<name> backup <n>.scraft beside it, and the newest ten are
kept. Autosaves make no backups.
2026-10-11 20:03:47 +01:00
grovebit 62a0b683e5 Ask before Save As replaces another session
Save As, Save Copy In, Save As Template and Export Selected Tracks as
New Session wrote over any existing file without asking. The Save As
prompt proposes ~/<name>/<name>.scraft, so every new session suggests
~/Untitled/Untitled.scraft, and saving a second new session with the
suggested path replaced the first one.

These commands now refuse to write over an existing file unless
`replace` is true; Save, Save As and Save Copy In may still write the
open session's own file. Scripts, MCP agents and the control channel
can't replace a session by accident. While the path in the prompt names
an existing file, the prompt asks whether to replace it and its OK
button becomes Replace; Enter alone doesn't replace. Saving also
creates the session's folder, so a new session without audio can be
saved to the suggested path. The CLI's --save names its output
explicitly and keeps replacing it, like --bounce.
2026-10-11 20:03:47 +01:00
grovebit 86824b592a Never overwrite audio files when saving
Audio that exists only in memory (takes, consolidations, AudioSuite
renders, commits) gets the default path `Audio Files/<name>.wav`, and
Save treated an existing file at that path as the source's own and
rewrote it. Names repeat easily: two sessions in one folder both call
their first take on Audio 1 "Audio 1_02", and consolidating twice on
Kick makes two "Kick_consolidated" sources. Saving silently replaced
the earlier audio, so the other session or the earlier clip played the
wrong audio once reopened.

Save As also trusted a same-named file in the target folder for audio
saved elsewhere, so saving into another session's folder could point
the new session at that session's audio.

New audio now goes to the first free name (`<name>.wav`,
`<name>_01.wav`, ...), created with create_new so no existing file is
ever truncated, or to a file that already holds exactly the same bytes,
such as a take saved again after undoing past a save. Saved audio is
reused only when saving into the folder it was saved in, which the
session now remembers, so undoing past a Save As or saving after Save
Copy In can't pick up another session's files either. Audio that
failed to load keeps pointing at its old folder when the session is
saved elsewhere.
2026-10-11 19:59:43 +01:00
grovebit 992f60c79c Trackpad-friendly Edit window: smooth panning, pinch and Cmd+scroll zoom
- Pinch and Cmd+scroll zoom the timeline around the pointer. egui 0.36 turns
  both into zoom_delta, so the old Cmd+scroll branch never ran; Shift+wheel
  pans sideways again for the same reason.
- Two-finger panning keeps the sub-sample remainder, so slow motion still
  moves at the closest zoom; the scrollbar drag pans the same way (its range
  now takes in the view, so the thumb stays in the bar), and the rulers pan
  too. Panning stays open-ended to the right, as before.
- A swipe keeps to the axis it starts along, so panning doesn't drift between
  tracks and scrolling doesn't drift in time. The larger share of its first
  6 points decides until egui reports the scroll over: the fingers lift, or
  150 ms pass without wheel events.
- The MIDI editor scrolls by the point instead of rounding each frame's delta
  to whole rows (slow swipes did nothing), and its range fits the panel
  (pitch 0 could not be reached; a taller panel showed blank rows).
- Zoom and scroll write through `Engine::zoom_mut` (`view` commands): no
  playback resync (a session copy sent to the audio thread every frame), no
  copy of the whole session per frame, no journal entry per frame, and no
  end to an undo gesture (scrolling during an automation pass made each
  write its own undo step). New `view.zoom_by {factor, x?}`;
  `view.scroll` saturates; Fill Window and Zoom to Selection stay within the
  zoom range (zooming out after them on a long session zoomed in).
- Control channel: `ui.scroll` (trackpad swipe or wheel notches) and
  `ui.zoom` (pinch); `session.inspect` reports zoom.
2026-10-11 15:21:46 +01:00
Vikram Bhaskaran 849cc79675 Keep each consolidation in its own audio file.
A second consolidate of the same track reused Audio Files/{name}.wav, and saving then skipped the rename because that path already belonged to the earlier source. New sources now take a free name, and a save splits sources that already share a path instead of overwriting one file.
2026-10-11 08:49:20 +11:00