Commit Graph
838 Commits
Author SHA1 Message Date
grovebit 6b98c21fed Make the Window menu's shortcuts work
The Window menu's keys never fired: Cmd+1 Transport, Cmd+3 Big Counter,
Cmd+4 Automation, Cmd+5 Memory Locations, Cmd+9 Video, Cmd+Alt+M Narrow
Mix, Cmd+W Close Window, Cmd+Ctrl+W Hide All Floating Windows and
Cmd+Ctrl+= Score Editor. The shortcut handler only looked at engine
commands, and these are window commands. It now falls back to them, and
the menus and the Keyboard Shortcuts window show their keys.

On a Mac, Cmd+Ctrl+= toggled Mix/Edit instead of opening the Score
Editor. The Mix/Edit toggle now needs Cmd+= without Control there.

The two Control chords still have no key on Windows and Linux.
2026-10-10 19:27:16 +01:00
grovebit bd00c3855c Name the step in the Edit menu's Undo and Redo
The Edit menu always read "Can't Undo" and "Can't Redo", the incumbent's
labels for an empty history, even when there was something to undo. The
items now name the step they would take ("Undo Mute", "Redo Mute"), in
the in-window menu bar and the macOS system menu alike, and read "Can't
Undo" / "Can't Redo" only when there is nothing.
2026-10-10 19:27:16 +01:00
grovebit aa4f038f1a Open the Rename Clip dialog from Clip > Rename
Clip > Rename... and Cmd+Alt+Shift+R ran clip.rename without a name, so
they only put "`name` required" in the status line. They now open the
Rename Clip dialog, which only the clip's right-click menu opened so
far, for the selected clip (or the first clip the edit selection
touches).

The dialog's name field, and Rename Track's, now opens with the old
name selected, so typing replaces it instead of adding to it.
2026-10-10 19:27:16 +01:00
natocool2andClaude Opus 5.5 6964c50d00 Web: open, import, save and export files in the browser (fixes #63, fixes #64)
The web build could not reach any file: File > Open Session…, Import > Audio… and Import > MIDI…
showed a text box for a path the browser can't read, and every save or export failed with
«operation not supported on this platform», so work was lost on close.

On the web now:
- Open Session…, Import Audio… and Import MIDI… show the browser's file picker; files dropped on
  the page open (sessions) or import (audio, MIDI) by extension. Files travel as bytes; imports are
  one undo step each, like the import commands.
- A session is saved as ONE file, a bundle `<name>.scraftz`: a zip (stored entries) holding the
  `.scraft` and its `Audio Files/` as 32-bit float WAV — the same layout as a session folder, since
  the browser has no folders. `io::open_session_bytes` opens a bundle or a bare `.scraft` (its audio
  is then reported missing). Bundles are hostile input: entry count and size are capped, and
  declared sizes are never read past.
- Every single-file output (save, Save As Template, bounce, MIDI/score/text export, track presets)
  goes through `io::write_file`: a file natively, a download in the browser via a delivery hook
  (`io::set_deliver`) that only the web app installs.
- In the browser Save As asks for the bundle's name (`<name>.scraftz`) instead of a folder path.
Native builds keep writing files and session folders as before. Folder outputs (stems, clip
exports) are still not available on the web.

Pairs with #157 (Save on a never-saved session opens Save As), which the browser needs too: the
web app always starts on the unsaved demo.

New dependency: `zip` (MIT), default features off (stored entries only).

Checked: engine tests for the bundle round trip (every sample identical), same-named sources,
bare sessions and hostile bundles; `cargo xtask ci`. In Chromium on the packaged web build:
⌘⇧I picks and imports a WAV; WAV, MP3, FLAC, OGG, M4A, AIFF and MIDI import by drop; Save As →
`Midnight Groove.scraftz` downloads with the imported audio inside; that bundle reopens in a fresh
page with all tracks and no missing media, and saves again with the same content.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 19:17:07 +01:00
Brandon ThomasandClaude Opus 5.5 330a698397 Progress docs: target-app parity, gaps, alpha gate, readiness by audience (#155)
* Progress docs to the craftrules standard; full re-measure against Pro Tools 2026.4.1

Stage: alpha. Menu breadth 482/512 (94.1%, measured), feature breadth ~70%,
ready for real work ~40%; ~350-570 agent-hours to beta, ~950-1,450 to full parity,
calibrated on this repo's PR history.

- ROADMAP.md rewritten: stage banner, two numbers, dimension/feature/language tables
- docs/target-app-parity.md: authoritative assessment (area table moved from ROADMAP)
- docs/gaps.md: 22 ranked gaps with evidence and estimates
- docs/roadmap.md: milestones, current focus, beta plan
- docs/ui-, file-format-, hardware-, plugin-, localization-parity.md: new checklists
- docs/parity.md -> docs/parity-checklist.md (generated by cargo xtask parity)
- architecture.md: video, vst3-host, au-host crates; device I/O limits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Stage: pre-alpha under the core-workflow gate

Add the alpha gate to docs/roadmap.md: interface recording at a chosen buffer
size, MIDI recording, and session interchange with Pro Tools fail, so the stage
moves from alpha to pre-alpha (~5 points and ~110-180 agent-hours to alpha).
Mark the alpha blockers in docs/gaps.md; update ROADMAP.md, target-app-parity.md
and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add mainstream-practitioner and essentials-user readiness numbers

Mainstream practitioner ~36% (weekly-area depth 50.6% x 0.90 interaction x 0.92
stability x 0.85 file exchange) and essentials user ~57% (core-feature depth
72.4% x 0.90 launch/stability x 0.90 discoverability x 0.97 files), with written
weights, discounts and GitHub user evidence. Full ready-for-real-work checked
against its written dimension weights (40.6%); unchanged at ~40%, stage unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Readiness by audience: hours to ~95% for full, mainstream and essentials

Full ~40% / 950-1,450 h, mainstream ~36% / 380-600 h, essentials ~57% / 110-200 h,
calibrated on this repo's PR history. The full number is already an additive
weighted sum over the written dimension table; method unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:08:49 -04:00
grovebit 718bb5c7fb Open Save As when saving a session that has never been saved
Cmd+S and File > Save Session on an untitled session only left "no path
yet: pass `path` (Save As)" in the status line. From a menu, the command
palette or the keyboard, Save now opens the Save Session As prompt until
the session has a file. Calls from the control channel, MCP and the CLI
still need a `path`.

The prompt suggests ~/<name>/<name>.scraft, but saving a session without
audio there failed with "No such file or directory", because only
writing audio created the session folder. Saving now creates the folder.
2026-10-10 14:20:55 +01:00
grovebit 4aa837e933 Make Cmd+H heal and Cmd+Alt+H copy to send on macOS
On macOS, Heal Separation (Cmd+H) and Copy to Send (Cmd+Alt+H) never
ran (#140). The system menu bar used muda's predefined Hide and Hide
Others items, which carry those keys, and macOS offers a key press to
the menu bar's key equivalents before the window, so egui never saw
them: Cmd+H hid SoundCraft and Cmd+Alt+H hid the other apps.

Pro Tools uses the same keys for Heal Separation and Copy Automation to
Send, so the keys stay and Hide loses its shortcut instead. Hide
SoundCraft and Hide Others are now plain menu items that call
NSApplication's hide: and hideOtherApplications:. These are safe
objc2-app-kit calls, and both crates were already in the build through
muda. Show All keeps muda's item, which has no shortcut. Windows and
Linux have no such menu, so nothing changes there.
2026-10-10 13:38:23 +01:00
grovebit 840939faf7 Cmd+= only switches Mix/Edit; the scale slider drags smoothly
Fixes #144. Unless Options::zoom_with_keyboard is off, egui zooms the
whole interface on Cmd+= (or Cmd+Plus), Cmd+- and Cmd+0. It checks for
those keys at the end of every frame, after SoundCraft's shortcuts have
read them without consuming them. So every Cmd+= that switched between
the Mix and Edit windows also zoomed in by another 10 %, and Cmd+0
(Quantize to Grid) reset the interface scale. Ctrl did the same on
Windows and Linux.

Turn egui's keyboard zoom off. The Interface scale slider in Setup >
Appearance is now the only thing that sizes the interface, so it always
shows the real scale. Before, keyboard zoom changed the scale without
moving the slider, and could go past its 75-150 % range.

Dragging that slider rescaled the whole interface on every frame of the
drag. Each rescale moved the slider relative to the pointer, which
stays put on screen, so the next frame read another value under the
pointer. The scale jumped back and forth (105, 110, 105 ... 145, 120,
150, 90 % in one drag) and the slider would not stay where it was
dragged. Apply the scale once the mouse button is released. It is now
applied after the window has drawn, too, so a click, Reset or an arrow
key takes effect in the same frame instead of waiting for the next
input.
2026-10-10 13:37:19 +01:00
Mawen Salignat-Moandal 15fea1ed5d MCP batch: set isError when any call fails, even with keep_going.
Agents that only check isError were treating partial failures as success. Also reject a non-array calls value instead of silently running nothing. Fixes #145.
2026-10-10 14:23:08 +02:00
grovebit 9ed4bdd4b1 Shift+Cmd+K exports clips as files
Export Clips as Files had no shortcut and no menu entry, so Shift+Cmd+K,
its key in Pro Tools, did nothing (#7). It now opens the command's
folder prompt, and OK exports the selected clips there.

Trying it showed three more gaps:
- Browse… in a folder prompt opened an audio-file picker, so no folder
  could be chosen. Folder prompts (Export Clips, Bounce Stems) now use a
  folder picker, a new `pick_folder` host service; the web build has
  none and keeps the text field.
- A successful export said nothing. The status bar now reads "Exported
  N clip(s) to <folder>", and the command returns the folder.
- With nothing selected the export succeeded and wrote no files. It now
  fails with "no clips selected".

The shortcut lookup moves into `command_for` so a test can check what a
key resolves to.
2026-10-10 11:45:22 +01:00
Brandon Thomas 3bc2d92b4e Merge pull request #122 from vbasky/fix/90-clip-export-names
Give same-named clip exports their own files.
2026-10-10 04:03:53 -04:00
Brandon Thomas e5b5f9907f Merge remote-tracking branch 'origin/main' into HEAD 2026-10-10 04:01:49 -04:00
Brandon Thomas 0d3228ef9c Merge pull request #121 from vbasky/fix/94-cut-all-automation
Put Cut All Automation on the clipboard.
2026-10-10 04:01:35 -04:00
Brandon ThomasandClaude Opus 5.5 f9d0d26e5b Merge origin/main into fix/94-cut-all-automation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:59:53 -04:00
Brandon Thomas f68f737b3d Merge pull request #120 from vbasky/fix/93-snap-neighbours
Snap selected clips to their neighbours instead of past them.
2026-10-10 03:59:24 -04:00
Brandon Thomas dba0bea03d Merge remote-tracking branch 'origin/main' into HEAD 2026-10-10 03:56:37 -04:00
Brandon Thomas e77503a815 Merge pull request #119 from vbasky/fix/97-menu-dialogs
Open New Tracks and Bounce only from the menu.
2026-10-10 03:56:32 -04:00
Brandon ThomasandClaude Opus 5.5 3a4f18647f Merge origin/main into fix/97-menu-dialogs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:53:21 -04:00
Brandon Thomas af0174942a Merge pull request #118 from vbasky/fix/102-mix-view-aliases
Allocate Mix Window View menu paths once.
2026-10-10 03:53:03 -04:00
Brandon Thomas dc2ffda4d6 Merge remote-tracking branch 'origin/main' into HEAD 2026-10-10 03:52:01 -04:00
Brandon Thomas 9001c76b56 Merge pull request #117 from vbasky/fix/99-tempo-stretch
Send Tempo Operations stretch as a factor.
2026-10-10 03:51:57 -04:00
Brandon Thomas 3364f7ca30 Merge remote-tracking branch 'origin/main' into HEAD 2026-10-10 03:50:45 -04:00
Brandon Thomas f6deacbf9a Merge pull request #116 from vbasky/fix/100-io-setup
Point I/O Setup rename and delete at setup.io.
2026-10-10 03:50:39 -04:00
Brandon Thomas d034c8a17b Merge remote-tracking branch 'origin/main' into HEAD 2026-10-10 03:47:29 -04:00
Brandon Thomas d03eba8648 Merge pull request #85 from coygeek/fix/live-system-theme-69
fix(ui): follow live system appearance changes
2026-10-10 03:17:29 -04:00
Brandon Thomas 1fa02e5499 Merge pull request #110 from reoniazx/fix/new-session-stops-playback
Stop playback when replacing the session
2026-10-10 03:17:22 -04:00
Brandon Thomas 5033eb8408 Merge pull request #113 from reoniazx/fix/midi-editor-panel-height
Keep the MIDI editor dock at its resized height
2026-10-10 03:17:15 -04:00
Brandon Thomas c4c48d8527 Merge pull request #105 from grovebit/clip-gain-nudge-windows-linux
Nudge clip gain with Ctrl+Shift+Up/Down on Windows and Linux too
2026-10-10 03:17:09 -04:00
Vikram Bhaskaran 9ef16e1e6c Put Cut All Automation on the clipboard.
The command cleared every automation lane in the selection and left the clipboard empty, so the cut could not be pasted. It now uses the same copy-and-clear path as Cut Pan Automation.
2026-10-10 17:40:09 +11:00
Vikram Bhaskaran 30347ee42f Open New Tracks and Bounce only from the menu.
engine.execute and app.run of ui.new_tracks_dialog and ui.bounce_dialog were opening modal dialogs, so a script could not create tracks or bounce without a window. Those ids now return an error unless the menu invokes them.
2026-10-10 17:39:46 +11:00
Vikram Bhaskaran 7b25efd8cd Credit Vikram Bhaskaran by real name and display name.
The About window can show either name when the viewer picks that label. The GitHub profile name stays unused.
2026-10-10 17:38:55 +11:00
Vikram Bhaskaran 59721f7c87 Compensate for an aux insert's latency on the same block that measures it.
The bounce probe read aux latency before the aux had processed, so a lookahead compressor shifted the export and dropped audio at the end of the range.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran fe4f59a856 Bake varispeed into rendered clip gain, then stop stretching it again.
Clip gain and clip effects renders wrote the clip as it already sounded and left the old ratio in place, so the new file was stretched a second time and its tail went silent.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran abcec3938b Render a named bus when bouncing, and reject an unknown one.
file.bounce_mix advertised a source but always wrote the main mix, so an empty bus and a missing bus both succeeded with the whole mix.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran ec33d4011b Keep clip gain when AudioSuite inverts or duplicates.
Both processes rendered a unity-gain file and then cleared the clip's gain and envelope, so the result was quieter than the clip the user heard. Invert and Duplicate now leave that gain on the new clip. Processes that bake a new level still write a unity-gain clip.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran 35a6fbccc0 Restore full playback speed when transport stops.
Half-Speed Playback stored 0.5 on the player, and a manual Stop left that rate in place, so the next ordinary Play stayed at half speed. Stopping now resets the player to 1.0. Half-speed itself still plays at 0.5, and a pass that ends on its own still returns to full speed.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran 1aad99ff4c Convert only the selected volume automation into clip gain.
The command wrote the lane onto the whole clip and cleared points only inside the selection, so the old curve still played and the clip got quieter on both sides. The selection now holds the fader, with anchors so the surrounding curve stays put. Volume and clip-gain windows take their end value from the last sample inside the window, so a breakpoint on the next sample does not ramp the audio before it.
2026-10-10 17:38:54 +11:00
Vikram Bhaskaran 734c8e18bc Treat dotted command ids as engine.execute in the CLI app shorthand.
app used to leave every ui., engine., session., and app. method untouched, so engine.history, ui.theme, and session.new were sent as unknown control methods. Only the real control-channel methods stay methods. Every other dotted id is engine.execute.
2026-10-10 17:38:53 +11:00
Vikram Bhaskaran c4a88ee64a Keep going when the CLI's stdout is closed.
outln! treated a failed write as success and returned immediately, so run and script stopped before --bounce or --save whenever a pipe reader had gone away. A write error is now ignored and the exit code comes from the work itself.
2026-10-10 17:38:53 +11:00
Vikram Bhaskaran d07624da1f Give same-named clip exports their own files.
Export Clips as Files wrote every clip to {name}.wav, so the second clip replaced the first. A name that is already in the destination now gets a -2, -3, … suffix.
2026-10-10 17:38:53 +11:00
Vikram Bhaskaran 82340cee5c Snap selected clips to their neighbours instead of past them.
Snap to Next and Snap to Previous ignored other selected clips when looking for a destination, so a multi-clip selection piled onto the same later clip or left the gap between the selected clips in place.
2026-10-10 17:38:53 +11:00
Vikram Bhaskaran 3b9d5b9423 Allocate Mix Window View menu paths once.
The menu bar rebuilt and leaked a fresh alias string for every mix-view section on each redraw. Those fifteen paths are now created the first time the menu catalog is asked for them.
2026-10-10 17:38:53 +11:00
Vikram Bhaskaran be859f6cc5 Send Tempo Operations stretch as a factor.
event.tempo_stretch accepts factor or length, and the Apply button was sending end_bpm, which the command ignored. A lower end tempo lengthens the selection, so the factor is the start BPM divided by the end BPM.
2026-10-10 17:38:52 +11:00
Vikram Bhaskaran b92370d32f Point I/O Setup rename and delete at setup.io.
The bus row called mix.bus_rename and mix.bus_delete, which are not commands, so both buttons failed. setup.io already renames and deletes a bus by name.
2026-10-10 17:38:52 +11:00
reoniazx 94e13543ec Keep the MIDI editor dock at its resized height 2026-10-10 13:20:32 +08:00
reoniazx 0734281104 Stop playback when replacing the session 2026-10-10 12:44:01 +08:00
Scott Campbell fa88fbb942 Add a built-in Sampler instrument
A third built-in instrument next to Subtractive Synth and Drum Synth. It plays one
sample across the keyboard: root note, transpose and fine tune, key tracking, key and
velocity ranges, amp ADSR with velocity sensitivity, sample start, forward or ping-pong
loops, gate or one-shot playback, 32 voices with cubic interpolation. The sample's own
rate is converted as it plays.

- dsp: `Plugin::set_sample` and the `SampleSource` trait hand an instrument shared
  audio without copying; the Adsr from the synth is reused.
- model: `Insert::sample` names the session source the sampler plays.
- mix: sync hands the pool audio to the instrument when it changes, and built-in
  instruments now get their parameter values applied (they always ran on defaults).
- engine: `mix.sampler_load {track?, path, params?}` decodes WAV, AIFF, FLAC, MP3, OGG
  (anything file.import_audio reads) into a session source, resampled to the session
  rate and saved in Audio Files with the session; `mix.sampler_clear`; and
  `mix.instrument_param {track?, param, value}` for any built-in instrument.

Tests generate their audio in code; no bundled assets.
2026-10-09 22:55:24 -04:00
grovebit d3348bcbbc Nudge clip gain with Ctrl+Shift+Up/Down on Windows and Linux too
Ctrl+Shift+Up/Down (#76) only worked on macOS. The registry's Ctrl there
is the Mac Control key, which has no key of its own on Windows and Linux
(#20), so the keys did nothing there, while the Shortcuts window and the
command palette still showed Ctrl+Shift+Up.

Pro Tools for Windows puts these on the Start key, but egui does not
report that key off macOS, and Windows and GNOME use Win/Super+Shift+
Up/Down to resize and move windows. So off macOS the nudge is
Ctrl+Shift+Up/Down: the same keys as on the Mac and what the labels
already say. No SoundCraft shortcut uses them there; Ctrl+Up/Down without
Shift still extends the selection.
2026-10-10 02:34:26 +01:00
coygeek 1f5bc965fe fix(ui): follow live system appearance
Resolve System appearance from egui on every frame and fall back to Dark when the integration cannot report a theme. Keep receiving OS changes during manual modes and apply the selected palette to both widget style branches and the current root UI.

Remove the cached detector and its unused dependency. Cover startup, live transitions, manual overrides, saved System preferences, and user colors with an application-frame regression. Add reproducible offscreen system-theme inputs and document the fallback.
2026-10-09 18:28:07 -07:00
grovebit cfe6b42d00 Record takes straight to disk
The input callback appended every block to one growing Vec: it
reallocated on the audio thread as the take grew, kept every input
channel in RAM, and the take existed only in memory until Stop, so a
crash during a take lost it.

- The input callback copies each block into a preallocated lock-free
  ring (atomic slots, no unsafe) and never locks or allocates. Samples
  that don't fit are paid back as silence before the next block, so the
  take keeps its timing; the loss is reported in the status line.
- A writer thread drains the ring every 10 ms into one 32-bit float WAV
  per armed track, holding only that track's input channels. Files go
  to the session's Audio Files folder, or to its autosave folder while
  the session has never been saved, named like the incumbent's takes
  (<track>_<NN>.wav). An existing file is never overwritten.
- The header is rewritten every second, so a file left by a crash plays
  up to the last update. Above 4 GiB it switches to RF64 in place.
- If a take file can't be created, Record doesn't start and says why;
  a write error ends that take where it failed.
- At Stop the files become the takes' sources. Loop recording keeps one
  file per track, one clip per pass (at most 1000) on its own playlist,
  in one undo step.
- Saving uses a file already in the target's Audio Files folder in
  place instead of rewriting it, so neither Save nor autosave copies a
  take. A take recorded at another rate than the session's is saved once
  at the session's rate.

soundcraft-audio-io gains wav_float_header (its length doesn't depend
on the frame count, so it can be rewritten in place); encode shares the
header code. Splitting a loop take into passes moved from the UI into
soundcraft_engine::io::add_recording, where it is tested.
2026-10-10 02:22:18 +01:00