* Import external-WAV AAF as editable session data
File > Import > Session Data analyzes an AAF and imports the selected audio
tracks as new tracks, one clip per edit. Clips keep their offset into the
complete source, so handles stay available; the import is one undo step and
Save collects the full sources.
crates/interchange (layer 3, no filesystem/process/UI access):
- build_session(Plan): versioned rational-time plan -> Session. Endpoints are
rounded to samples independently, so adjacent edits never drift.
- aaf::read_aaf: reads the AAF object model from structured storage with the
cfb crate (MIT): properties streams, strong reference vectors/sets and
dictionary weak references. Media goes through a MediaResolver trait.
crates/engine: file.preview_aaf (read-only) and file.import_aaf (undoable).
The resolver opens only files named in the chosen media folder, checks
file_access and reads WAV headers without loading samples; import re-probes
and decodes before touching the session.
crates/ui-egui: Session Data window with track selection, media folder,
absolute/relative mapping, sample offset and report.
Supported: SourceClip/Filler sequences resolved through MasterMobs to
WAVEDescriptor SourceMobs with one external locator; mono/stereo PCM WAV;
composition timecode including 24000/1001 and drop-frame. Gain, fades,
transitions, selectors, nested sequences, embedded essence, split channels,
mixed sample rates and non-local locators fail explicitly.
Addresses #40.
* AAF import: resolve each source once, offer composition choice, start folder picker
- file_source returns early for a known source, so each WAV is probed and
each relink is reported once however many edits use it. The per-slot
PhysicalTrackNumber check still runs first.
- When an AAF holds several compositions, the Session Data window lists them
and passes the chosen MobID to file.preview_aaf.
- "Choose media folder..." opens at the current media folder instead of
receiving a label as its start path.
* AAF import: lock the composition selector while analysis runs
A selection change during analysis could leave a plan for the previous
composition in the window and enable Import with it.
* AAF import: drop a running analysis when the file or media folder changes
window.import_aaf (and opening an .aaf) can set a new path while the
previous file is still being analyzed; its late plan could then be shown and
imported for the new path.
* AAF import: forget the chosen composition when the path is edited
* AAF import: keep the media folder with a typed AAF path
A typed path now moves a media folder that was derived from the previous
AAF, so same-named WAVs are not taken from the old folder. A folder the user
chose elsewhere is kept.
* AAF import: bound hostile input, confine locators, report missing media
Review follow-up for the AAF reader (untrusted input):
- Cap the structured-storage directory at MAX_DIRECTORY_ENTRIES on open;
document every bound (sector chains via cfb, 32 MiB streams, MAX_ITEMS
collections, 32-link source chains with cycle detection).
- Locators are data: refuse `..` anywhere (also percent-encoded and inside
absolute paths), NUL bytes, paths that name no file, and relative
locators with a root or drive prefix; relative ones stay under the AAF's
folder.
- A missing media file no longer aborts the import: it is reported with
the number of edits skipped, the other edits keep their positions, and
the import fails only when no referenced file exists.
- Tests: looped directory, mini-FAT and mini-stream chains terminate with
an error; locators patched into the fixture cannot leave the AAF folder;
an absolute locator is only looked up in the chosen media folder;
missing media is reported per file.
- Provenance statement in the module docs and README.
* AAF import: confine the plan's media to the media folder at import too
file.import_aaf takes the plan from its caller (UI, MCP, automation), so
the media-folder rule applied while analysing is checked again before any
source is read: the import requires `media_dir`, and every source must be a
file directly inside it once both paths are canonical (symlinks resolved).
The UI passes the folder it analysed with.
Test: a plan edited to point outside the folder (absolute path, `..`
traversal, symlink) or without `media_dir` is refused without an edit.
* AAF reader: decode UTF-16 with as_chunks for clippy 1.99
clippy::chunks_exact_to_as_chunks (Rust 1.99, used by the gate) rejects
chunks_exact(2) with a constant size. as_chunks is stable since 1.88, below
the workspace minimum.
* AAF reader: state its provenance accurately
The storage layout, class and property identifiers and MobID text form
were learned by reading pyaaf2 (MIT), not from the published AAF
specifications. No pyaaf2, AAF SDK or copyleft code was copied.
* aaf: bound property expansion
Cache parsed objects and share property payloads. Enforce a 128 MiB aggregate property budget and reject duplicate local references before expansion, with a compact AAF regression. Migrate AAF media handling to craft-audio after integrating current main.
* docs: record strict AAF import support
* MIDI input devices: live play-through and MIDI recording
Keyboards and pads could not be used at all: there was no MIDI device
layer (G-02).
- crates/playback/src/midi.rs opens every MIDI input port through midir
(ALSA sequencer, CoreMIDI, WinMM), follows devices that are plugged in or
removed, and passes channel messages to the audio thread over a lock-free
ring, each with the time it arrived.
- The mix engine plays them on the instruments of record-enabled and
input-monitored MIDI and instrument tracks (crates/mix/src/live_midi.rs):
notes at their sample offset, the sustain pedal holding note-offs back.
- While recording, the events are kept with their timeline position and
become MIDI clips on the record-enabled tracks
(crates/engine/src/io/midi_take.rs), with controllers, pitch bend and
aftertouch. A pass can be MIDI only: the audio input is opened for audio
tracks alone.
- A MIDI or instrument track chooses a device and a channel at its input
selector (kept in the track's input route as `MIDI:<channel>:<device>`).
- Setup > Playback Engine lists the input ports with a switch each and, on
request, what arrives from one; Setup > MIDI > MIDI Input Devices opens
it. The switches are app preferences.
Note lifecycle:
- A strip keeps the keys and the sustain pedal of every owner (input port
and channel) apart. A pitch held by two devices or channels sounds until
the last one releases it, and one owner's pedal does not hold another's
notes. A strip follows 16 owners at a time; further ones share the last
place (documented in live_midi.rs).
- A full queue is never silent. An event that does not reach the audio
thread (the 1,024-entry input ring or the 256 events a callback takes)
marks its port; the audio thread then drops what it still has queued from
that port and the engine releases the notes and pedal the port holds. A
port that closes, a replaced feed and events skipped while nothing
listens take the same path.
- A take records where input was dropped: the notes that port held end
there, and the status line says the take is incomplete. Recorded events
the UI thread did not collect in time are counted and reported too.
Recorded notes are told apart by device as well as channel and pitch.
On Linux, live play was checked with a hardware keyboard (Akai MPK mini 3)
and recording with a virtual one (crates/playback/examples/midi_keys.rs),
before the note-lifecycle work; that part is covered by tests only. macOS
and Windows are type-checked only; there is no MIDI input on FreeBSD or
the web.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* midi real device tests
* midi device drop test
* midi device fix pr review comments
* MIDI input: review fixes for note ownership, lost input and takes
Live notes (crates/mix/src/live_midi.rs):
- An owner without a place of its own joins the shared place while it is
in use, even when another place has come free. It could get a second
place before, and the release of its key in the shared place was then
not found: the note stayed on. The same held for the pedal.
- A change of the track's input releases the shared place when the input
no longer takes any one of the owners in it, not only the first.
- The strip remembers which port and channel last set each controller.
When that source loses its input or the track stops listening to it,
the instrument's controllers are set again from the clips and from the
sources that are left, so a bend from an unplugged device does not stay.
- When playback runs out under monitoring, the clips' sustain pedal goes
up with their notes.
Capture (crates/playback):
- A loss carries its time. What a port sends after it is played and comes
after the mark in the take; before, it was dropped and recorded ahead
of the mark.
- The age of an event is counted at the transport speed.
- Loop recording writes a mark where the loop goes round, and a key played
with the playhead at the end of the loop stays inside the loop.
- The end of a record pass is acknowledged by its number, so the late
answer to an earlier pass does not end the wait for a later one.
- A connection the backend closes marks its port, also when a device with
the same name is opened in its place.
Takes (crates/engine/src/io/midi_take.rs, crates/ui-egui):
- A note held into the next round of a loop is split there, also when its
release is later on the timeline than its press.
- A track taken out of record during a pass keeps what it recorded.
- A pass whose end the audio engine did not confirm is reported as
incomplete in the status line.
- An inactive record-enabled audio track no longer turns a MIDI pass into
an audio one that is then refused.
docs/midi-input.md: Windows drivers that allow one program per device, and
the new status text.
* MIDI input: review follow-ups on loss order, controllers and loop takes
- Each port has its own time of loss. One port's later loss no longer
takes along what another port sent after its own: that is played, and
comes after that port's mark in the take.
- A retired connection is closed before its port is marked as lost. Marked
first, a note-on delivered while it closed carried a later time than the
loss and could be played after the release.
- The strip keeps the last controller value of every source, not only the
newest. When one of two sources that set the same controller goes away,
the controller goes back to the value of the one that stays. 64 values
are kept; past that the oldest is forgotten.
- A take can say where the pass stopped (MidiTakeEvent::END), and the UI
says so for loop passes. A key still down then ends at the stop in the
round it is in: held over a round or more it covers the loop, where it
used to end at the loop end of its first round.
- A pass that records MIDI does not start while the audio engine has not
confirmed the end of the previous one. It takes the MIDI since its last
callback with the state of the pass it knows, so a pass started and
stopped meanwhile had its notes written at the old position.
* MIDI input: loss marks in the queue, connection gate, stop position
- A loss from a full queue is also written into the queue, ahead of the
first event that fits again. The audio thread deals with it at that
place. Before, a loss flagged after the callback had read the flags was
seen one callback late and ended a note played after it. The flag for a
loss already met in the queue is not a second loss.
- A connection is shut off under the feed's lock when it is closed
(MidiFeed::close_port), and what its device thread still delivers is
discarded. Dropping a connection joins that thread on ALSA; CoreMIDI
(MIDIPortDispose) and WinMM (midiInStop, midiInReset, midiInClose) do not
promise to, so the order of drop and mark is no longer relied on.
- When the controller table is full and forgets a value, the strip keeps
the port and channel it came from. The controllers are still reset when
that source goes away, where a bend pushed out of the table used to stay.
- A loop pass ends where the audio engine is. The larger of the engine's
and the UI's position was used, and just after the loop went round the
UI's is still near the loop end: a short held note covered the loop.
- The end of a pass waits for the audio engine by what the pass set out to
record, not by the devices connected at Stop. A pass whose last device
was unplugged before Stop left nothing pending, and a new pass could
start before the engine was done with it.
* MIDI input: stop at the loop end, and passes owed by the audio engine
- A key played while the playhead stands at the end of the loop is the
last thing of that round. It was written as the first of the next round,
with a mark that the loop had gone round; a pass stopped right there
never went round, and a note held to the stop grew a second part.
- The feed knows whether an ended pass is still owed by the audio engine
(MidiFeed::pass_owed), and the UI asks it before a pass that records
MIDI starts. The UI kept that itself, where no test could stall the
audio callback against it.
* MIDI input: stop boundary, loop rounds, loss marks and shared owners
- A pass ends at a time on the feed's clock (MidiFeed::end_pass). Only
what arrived up to it is written to the take, however late the audio
thread hears of the Stop, and the callback takes the queue in once more
after the command before it confirms: a note that arrived between its
reading the queue and the Stop was missing from a confirmed take.
- The confirmation carries where the playhead stood (MidiFeed::stopped_at).
A loop pass ends there; the player's position read afterwards could be
a round further on, which the take knows nothing about. Without a
confirmation no stop position is used.
- The take builder is told whether the pass looped (MidiPass). In a pass
that did not, a release stamped before its key press (a late callback)
is one short note, where it was split around the ends of the clip. The
stop position is a parameter, not an entry that the event cap could cut.
- A pass records the tracks that were in record when it started, and only
those: the same list the end of the pass waits by. A track put in record
during the pass got what was played before that, without a wait.
- A short loop goes round several times in a callback: each entry is put
in the round it arrived in, so two entries a round apart have one mark
between them.
- A mark in the queue is stamped with the time of its loss. A port that
overflowed, played on and was then closed keeps a mark for the close
(the new note was held to the end of the take), and a loss told by the
port's flag is not written again when its mark arrives.
- Live events stay in order of arrival when they are played: a release
taken by a shorter callback was due before its note-on.
- A callback reads the transport speed once, for rendering and for the
ages of the next callback's events.
- The shared owner place is left alone by a source that never joined it:
its note-off no longer ends another owner's note there, and its loss no
longer releases the place.
- When a live source goes away, the instrument's controllers are restored
before the block's clip events are sent, so a clip controller at the
start of that block keeps its new value.
- Tests that assert MIDI positions use a clock the test sets.
* MIDI input: pass boundaries, loop punch-in and review follow-ups
- A pass begun while the transport runs has a start time on the feed
(MidiFeed::begin_pass): what is played after Record is written down
also when the audio thread takes it in before it reads the command.
- A pass goes on through a transport stop until the command that ends it.
The UI sends the two one after the other; when they reached two
callbacks, a note played just before the stop was left out of a
confirmed take.
- The end of a pass is asked for every entry, so a Stop that comes while
the queue is being read still cuts off what follows it.
- A mark in the queue carries the time its events were dropped, kept apart
from a later close of the port. An overflow before Stop is in the take
when the port closes after it.
- A pass punched in while a loop plays is a loop take over that loop. In a
line from the punch-in to a stop in the next round nothing fell inside
the range.
- In a loop take with marks, only the marks say that the loop went round:
a release stamped before its press within one round is one short note.
- A key pressed in the last samples of the range starts at the last tick
the clip plays, not at the tick of its end.
- When the clips' controllers are sent again while stopped, their sustain
pedal goes up again: no pedal-up of theirs would follow.
- The render step is taken after the commands, so a session at another
sample rate is rendered at that rate from the callback that installs it.
- The stop position and the incomplete-take warning go by one answer from
the audio engine.
* MIDI input: test that a callback renders at the speed it keeps
A speed change that arrives while a callback runs takes effect from the
next one: the callback renders at the speed it read, and the next callback
counts the ages of its events at that same speed.
* MIDI input: volume and pan go back to MIDI's defaults with their device
The reset sent when a live source goes away is Reset All Controllers,
which leaves the channel volume (CC 7) and the pan (CC 10) alone. A
device that turned the volume down to nothing and was unplugged left the
track silent. When the source that went away had set one of the two, and
neither the clips nor a source that is still there gives it a value, the
instrument is sent the value MIDI names as the default (100, and 64).
The same when the track stops playing live input.
* MIDI input: third round of review follow-ups
- The stop cutoff is one value on the feed, in force from the store that
ends the pass and gone when the audio thread confirms it.
- The start of a pass holds for the whole pass: what was played before
Record stays out also when it is taken in after the start command.
- What is played just before a Stop is put inside the range that ends at
the stop, not on its end.
- A port closed while the queue is read is met through the mark of its
overflow; the flag of that close, a callback later, is not a second
loss (it ended a key the new connection played).
- An overflow and the loss it is have one time. Read apart, they could
differ by a microsecond and count as two losses.
- A volume or pan the full controller table forgot goes back to its
default when its own device goes, not when another does.
- The chase of the clips' controllers uses the track's MIDI delay, as
playing them does.
- Recorded controllers in the last samples of the range stay where the
clip plays; in a take without marks the press as played, not the note's
start, says whether the loop went round; a take cut at the event cap
does not use the stop position.
- The loop the MIDI of a punched-in pass goes to is the loop the audio
engine plays: not a range too short to loop, nor one that Play From
dropped.
- The audio input stops taking in before the wait for the MIDI.
* MIDI input: fourth round of review follow-ups
- A record pass goes on through the natural end of playback until the UI
ends it, up to the time playback ran out: what was played as it reached
the end is in the take, what follows is not.
- Before the end of a pass is confirmed, the device threads are kept out
of the queue while it is read once more, so a message stamped before
the Stop is not put in after the answer. The audio thread does not wait
for a device thread that is in there.
- A later loss of a port is noted as dealt with only at the end of the
callback: with two overflow marks of one port in the queue, the second
was skipped and the key played between them had no end.
- Whether a pass was begun is read before when: a pass seen as begun has
its own start time.
- The volume and the pan go back to their defaults when the source that
set them last goes, also when the controller table forgot its value,
and not when an earlier setter goes.
- A clip's note-off that is held back because a live key holds the pitch
is remembered for the block: the key going up earlier in the block no
longer ends the note before the clip would have.
- In a take without marks, whether the loop went round between a press
and its release is judged by their samples, not their ticks.
- The stop position of a loop pass is not used when recorded entries did
not reach the take: one may be the mark of a round.
- Loop recording over a selection too short to loop is recorded as a
punch, as the transport plays it.
* MIDI input: fifth round of review follow-ups
- Whether a pass was begun is asked for every event: a pass begun while
the callback is reading the queue records from when it began.
- The ages of a pass's last events are counted up to when the transport
stopped. Counted up to the callback that takes them in, the time the
playhead stood still moved them back.
- An overflow the port's flag told of keeps its time when an older mark
in the queue shows a later close: its own mark may never come.
- What becomes of the clips' held back note-offs is settled after the
block's live events. A key that goes down again before the clip's note
would have ended is not ended by it, and with two clip notes of a pitch
in a block the one that sounds when the key goes up lasts to its end.
- When the source that set the volume or the pan last goes and another
one's value is sent again, that one is the last setter from then on.
* MIDI input: sixth round of review follow-ups
- A loss is followed whenever the transport runs, and written to the take
by when it happened, like an event: a port lost in a pass that began
while the queue was being read ends its notes in the take.
- A pass started and ended by the commands of one callback is still that
pass in the last read of the queue: what was played in it is kept.
- When a live key takes a pitch again, the clips' held back note-offs
from since the last key went up are sent where they were, so the
instrument lets go of the clip's note before the new press.
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Docs-only conflicts: the status lines and history rows keep both main's Linux/X11 plugin editor and Command-click entries and this branch's Frequency Shifter entries.
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
- Edit window: the Delete and Backspace keys clear the selection (#404)
- Docs: update the progress docs for this change
- Docs: put the new sentence in the Status column
- fix: Delete/Backspace follow the drawn Edit window and a valid MIDI target
Conflicts in the doc headers and change logs of ROADMAP.md, docs/gaps.md, docs/roadmap.md and
docs/target-app-parity.md: kept main's pt-BR entries and this branch's Frequency Shifter
entries, newest first.
Add a pt-BR catalog and persisted language selection, covering UI labels, menus, dialogs, tooltips, accessibility text, and engine menu labels, and update the localization parity docs.
craft-audio replaced audio-io (#1506): take files are decoded and probed
with craft_audio, and the take header comes from one helper, take_header,
since craft_audio::wav_float_header takes the rate before the channels.
A line that was not JSON got a "bad JSON" error reply and the server kept
reading the same connection. A JSON value that was not an object, or had no
string `method`, was forwarded to the UI as a request with an empty method.
Now a line that is not a JSON object with a string `method` gets one error
reply and the connection is closed, as in the other Craft apps' control
servers. Control clients send one request object per line, so a peer that
sends anything else is not one, and nothing it sends after that line is run.
Valid requests and blank lines are handled as before.
The protocol doc says so next to the error format.
* Strip Silence: the sliders move a tenth as far while Ctrl or Command is held
While Ctrl (Command on a Mac) is held, a drag on one of the four Strip
Silence sliders moves the value a tenth as far as the same drag
without the key, on the slider and on its value box. Pressing or
releasing the key during a drag leaves the value where it is, and the
drag goes on from there. Releasing the mouse button leaves the value
too. A drag without the key works as before.
The new widgets::fine_slider uses the modifier test and the tenth of
widgets::fader. Threshold and Clip Start Pad show one decimal place,
and a drag on the slider during which the key was held rounds the
value to the places the box shows.
* Plugins: parameter sliders move a tenth as far while Ctrl or Command is held
While Ctrl (Command on a Mac) is held, a drag on a parameter slider in
the plugin window, the Clip Effects window or an AudioSuite plugin's
window moves the value a tenth as far as the same drag without the key,
as the Strip Silence sliders do. A logarithmic slider moves a tenth as
far along the slider, and a whole-number slider, such as the Sampler's
Root Note, stays on whole numbers. A drag without the key works as
before.
widgets::FineSlider is a new builder with the slider options these
windows use (no value box, logarithmic, whole numbers, a salt for
unlabeled sliders); widgets::fine_slider keeps its signature and calls
it.
* Plugins: Alt-click returns a parameter to its default value
An Alt-click (Option-click on a Mac) on a parameter in the plugin window,
the Clip Effects window or an AudioSuite plugin's window sets the
parameter's default value, as an Alt-click sets a fader to 0 dB. It works
on a slider, on a slider's value box and on a choice list. The click on a
value box does not open it for typing, and the click on a choice list does
not open the list. In the plugin window and the Clip Effects window the
reset runs the same command as a drag, so it is one undo step. While Alt
is held, a drag on one of these sliders leaves the value where it is.
widgets::FineSlider has a new default_value option for this.
* Plugins: FineSlider::default_value describes what a held Alt does
While Alt is held, a drag leaves the value where it is, and an Alt-click
on the value box does not open it for typing. An Alt-click on the rail
sets the default.
* Dialogs: Enter on a focused Cancel or Don't Save no longer runs OK
Enter on a focused button clicks it and also presses the dialog's OK.
In Strip Silence, Enter on Cancel closed the dialog and still stripped
the selected clips. Cancel and Escape now drop the command and the save
that OK asked for, in every dialog. In Unsaved Changes, Enter on a
focused Don't Save closes without saving instead of opening Save.
* Read send destinations only while the menu is open
* Tests: pressing Ctrl during a value-box drag keeps the value
The rest of the drag on the Threshold value box moves as far as a drag
with Ctrl held from the start.
* Bounce Mix: Cancel starts no bounce; fine adjust on more AudioSuite sliders
Enter on a focused Cancel also pressed Bounce, which started the bounce
before the Cancel check ran. The bounce now starts after that check.
The Normalize, Time Shift and Pitch Shift sliders in the AudioSuite
window move a tenth as far while Ctrl or Command is held.
* Tests: give the Enter-on-Cancel bounce test its own scratch folder
It shared bounce-cancel with cancel_or_escape_stops_a_bounce_and_leaves_no_file,
so the two tests removed each other's folder when run in parallel.
* Clip Effects: log-taper parameter sliders use a logarithmic rail
The EQ and Dynamics sliders in the Clip Effects window now follow the
parameter's taper, as the plug-in window does, so a frequency, Q, ratio,
attack or release slider moves along a logarithmic rail.
* Dialogs: leave Enter on a focused Cancel or Don't Save to its own pull request
The dialog changes for Enter on a focused Cancel or Don't Save, the
Bounce Mix change that started the bounce after the Cancel check, and
their tests in save_changes.rs, strip_silence_dialog.rs and bounce.rs
are removed from this branch. The fine adjustment on the sliders stays.
* Plugins: tests cover Alt reset and Ctrl fine adjustment on more slider kinds
Tests now cover Ctrl without Command, Alt pressed during a drag, one
undo step for a choice-list reset, whole-number and logarithmic sliders,
Alt-click and Ctrl-drag on the AudioSuite and Clip Effects value boxes,
and Alt on a Strip Silence slider, which behaves like a plain click or
drag.
The ROADMAP entry limits the choice-list reset to the plugin window, and
the docs/ui-parity.md fine-adjustment row names the Clip Effects and
AudioSuite sliders.
* Plugins: a short Ctrl-drag at the low end of a log slider with a value box moves the value
A fine drag rounded to at most three decimal places, so a one-point
drag near the bottom of a range such as Attack at 0.01 ms rounded back
to where it started. The rounding now allows up to six places.
* Strip Silence: the fine slider's response reports each change of a drag
The value moved by a drag that the key has touched is set before the
slider reads it, so the Response's changed() stayed false on those
passes. fine_slider now marks the response when the value changed.
Tests: a Control-only drag, and changed() on every pass of a Ctrl-drag.
The value box test releases the button once and checks the value after.
* Tests: plugin sliders with Control alone and with Ctrl toggled during a drag
The plugin window's logarithmic and whole-number sliders keep their value
when Ctrl is pressed or released during a drag, and a drag with Control
alone is fine. The tenth-as-far test names the parameters it drags and
checks the others do not change, and the low-end test checks the value
after the release.
* Review fixes after the craft-audio switch; pin craft-audio at craft-libs main
Follow-up to #1506, for its review comments:
- convert: a decode that concealed damaged packets is reported as a warning,
and --in-place refuses to replace the source with it.
- convert: the decoded speaker layout goes to the encoder, so 5.1 with side
surrounds stays side surrounds in WAV and FLAC.
- FileFormat::of names an MP4 or QuickTime file by its codec: AAC or HE-AAC
is Aac, ALAC is Alac, anything else (Opus, AC-3, PCM) is Other.
- Bounce keeps a picked extension that already names the format (Mix.aifc,
Mix.AIFF), so the file written is the one the save dialog confirmed.
- rust-version is 1.95: craft-audio, craft-media and craft-ui declare it, so
1.90 was not a version the workspace builds with.
craft-audio and craft-media move to craft-libs main 7db4645d.
* MIDI: take Standard MIDI Files and the sequence model from craft-midi
craft-midi in craft-libs was moved from this crate (storytold/craft-libs#884):
smf.rs, sequence.rs, the error type and their tests. soundcraft-midi now
re-exports them, so every caller keeps its imports, and keeps what is
SoundCraft's own: the editing operations, the display names and XorShift.
The SMF and Sequence tests are deleted here; they run in craft-midi, which
also adds one for the track limit. The serde names do not change (the same
derives behind craft-midi's serde feature), so sessions read as before.
craft-audio in craft-libs was built from audio-io and FilmCraft's codecs, so
each format has one implementation that every Craft app shares. Call sites use
its API directly: EncodeOptions::new(format).with_*(), EncodeFormat,
DECODE_EXTENSIONS, ENCODE_EXTENSIONS, encode_format_for, AudioInfo's container,
codec and layout.
soundcraft_model::FileFormat stays as the kind of file a session records for
each source: its variant names are part of the session format. It maps from
craft-audio's AudioInfo.
craft-audio and craft-media are pinned to the craft-libs branch of
storytold/craft-libs#824, which adds the extension tables SoundCraft had in
FileFormat and fixes the quadratic WAV chunk scan (#893).
Behaviour that changes: AAC, ALAC, Opus, AC-3/E-AC-3 and MP2 decode with
craft-audio's own decoders; MP4 and Matroska tracks import at their
presentation length; .opus, .ac3, .eac3, .ec3, .mov, .mka and .mpa are
importable names; .aifc is a writable name; FLAC files come from craft-audio's
encoder.
* Read volume automation at every sample, not once per block
Track and master faders read the dB curve at a block's first and last
sample and ramped linearly in gain between them, so a breakpoint acted up
to a block early or late and a short crossfade came out differently
depending on where the block edges fell. Both now take the gain at each
sample: the curve is read at its breakpoints and interpolated in dB in
between, as the lane defines it. Blocks with no change keep one gain.
Fixes#1354.
* docs: volume breakpoints no longer depend on the render block (G-04)
* Step fader ramps by a ratio and scale channels in contiguous runs
Reading the fader at every sample converted dB to gain per sample on
every ramp, and applied it sample by sample across channels, even when
nothing moved. A stretch that is linear in dB is geometric in gain, so
each stretch now converts its two ends exactly and steps the samples in
between by one ratio (in f64, so it does not drift), with the -144 dB
floor and the cap checked per sample. Each channel is scaled over the
whole stretch at once, and a stretch with no change is a plain multiply.
Tests: stepped ramps against db_to_gain sample by sample (floor, cap,
NaN, one or two samples, a 16384-sample ramp), and summed volume, trim
and VCA lanes with a muted track, read from renders that start inside a
ramp or on block edges.
* fix(mix): recover extreme automation ramps from silence
* fix(mix): preserve extreme ramp endpoints and silence NaNs
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Placing a take of several files decoded and resampled every file before
working out what each pass keeps, holding all of them at once, so a
punch keeping a short span still decoded the whole take. Without a loop
or a punch every file is placed and is decoded once, as before. With
one, each file's length is parsed from its header first (the file is
read, not decoded), and a file is decoded once the take is laid out and
it holds a kept span, one file at a time; one that can't be decoded
ends the take there, as an unreadable file does.
soundcraft_dsp::offline::resampled_len is the length resample gives, so
a take laid out from headers matches its decoded files.
Tests: each clip plays its own file (files of different lengths and
contents, with and without a punch), a take ends at a file that can't be
read (also with a punch), a punch decodes only the files it keeps, a
pass runs on across three files, recovery stops a take at an empty or
non-take part, and write_takes returns the full first file and the
problem when the next file can't be made.
Docs: TakeFiles fields, take_part and take_file_samples edge cases, the
order and truncation rule of add_recording; the Windows column of the
record-to-disk row is not yet verified; ROADMAP's level is minor, as in
the other docs that drop an alpha-blocker item.
The README plugin list, the ROADMAP progress log and the plugin parity
doc's Modulation row name the Frequency Shifter, and the parity doc no
longer lists frequency shift as missing. docs/plugin-parity.md,
docs/gaps.md (G-08) and docs/target-app-parity.md count 28 processors +
3 instruments. Readiness percentages are unchanged.
Display labels only; command ids, catalog paths, session tokens and processor ids are unchanged.
- Avid-listed names and bundled plug-in products get our own names (Beat Analysis, Punch Recording, Room Reverb, Compressor/Limiter, Saturator, Bit Crusher, Rendered (High Quality), ...).
- Features we don't have stay in the menu as disabled placeholders with "Not available yet." (Tempo Sync, No ARA plug-ins, Analog Saturation).
- AudioSuite, Elastic Audio, TrackPunch, Pitch Shift Legacy and Time Compression Expansion keep their names until RFC-0029 settles.
- parity_floor and catalog dispatch unchanged; docs/feature-naming.md has the crosswalk.
About > Contributors still showed an old snapshot, because nothing
regenerated contributors/contributors.json before a release. Opt in to
the shared refresh from craft-common-actions: a read-only credits job
regenerates the snapshot for the release commit, and the shared release
workflow installs it before every source build. The snapshot is not
committed back.
soundcraft-cli commands printed only a text table, so a program that wanted
the parameters had to call describe once per command. With --json it prints a
JSON array of each command's details, the same object describe prints, as
PhotoCraft and FilmCraft do; --compact puts it on one line. The filter
applies, and no match prints []. As in describe, enabled and disabled_reason
are worked out against an empty session; docs/cli.md says so, and the README
mentions the flag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI installed no logger, so every log::warn! and log::error! was
dropped: a plugin that failed to load just vanished from
engine.clap_plugins with no reason. A small logger now writes warnings
and errors to standard error as `warning: <message>` and
`error: <message>`, like the CLI's own errors. The level is fixed:
RUST_LOG stays a desktop app variable.
Fixes#1304.
Bounces passed no bwf to the encoder, so mix and stem WAVs had no bext
chunk and post tools placed them at zero. Bounce::new now stamps them
with TimeReference = the session's timecode start plus the bounce start,
in samples since midnight, as other DAWs do. A caller's own bwf wins;
AIFF and FLAC have no bext and are unchanged.
Fixes#1296.
The tracking row and M13 in docs/roadmap.md, the pre-alpha reasons and
first alpha blocker in ROADMAP.md, the tracking list in
target-app-parity.md and the device I/O paragraph in architecture.md.
Estimates unchanged: G-06's hours were the streaming-sources work.
docs/gaps.md G-06, docs/roadmap.md M6, docs/hardware-parity.md and the
Performance row of docs/target-app-parity.md still said takes are
recorded into RAM, though #84 records them straight to disk. With long
takes now continuing in a new file (#888), recording to disk is done:
G-06 keeps only streaming sources from disk, M6 no longer lists record
to disk as missing, and the hardware row shows it per platform. Status
lines and revision history updated.
plugin-parity: VST3 editors are hosted on every desktop platform, and
embedded CLAP editors on Windows and Linux/X11. gaps: G-05 shrinks to
the macOS work (AU views, embedded CLAP, the entitlement), 10-15 h.
roadmap and ROADMAP: the same estimate, the mix row's VST3 windows, and
a progress log entry.
setup.playback_engine and setup.hardware stored device and buffer_size on the session and reported 1024 when nothing was set. Playback never read those values, so the open device stayed at its old buffer. In the app the commands now reopen the device through ui.audio_device and return the name, buffer and sample rate actually in use, while delay compensation still goes through the engine command. Headless keeps the stored request, returns applied: false, and leaves buffer_size null until one is set. A buffer is any integer from 16 to 8192 and is not rounded to a power of two; values outside that range error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): pin today's argument handling
Run the real binary and record how the hand-written parser behaves for every
subcommand: help and version spellings, no arguments, unknown subcommands and
flags, value flags in both spellings, missing and repeated values, positional
order, exit codes and which stream carries each message.
No behaviour change. Later parser changes update these assertions on purpose.
* refactor(cli): split main.rs into modules
Move only: args, error, output, convert, info, session, catalog, app and
mcp each get their functions and unit tests; main.rs keeps the usage doc,
help_text and the dispatch. Moved items become pub(crate) where other
modules call them. No behaviour change.
* refactor(cli): typed errors and run(args, out, err)
soundcraft-cli is now a library plus a thin binary. `soundcraft_cli::run(args,
out, err) -> i32` is the whole program; main.rs only passes the real streams
and shuts the plugin hosts down afterwards (process teardown, not part of run,
which tests call repeatedly in one process). Subcommands write to the given
writers, return `Result<(), CliError>`, and `fail` is gone. CliError wraps
engine, audio-io, io (with the path), serde_json and the control channel
errors; UsageError, ConvertError and RootFlagError cover the subcommands' own
failures. No Result<_, String> is left except where a dependency reports a
string (control-channel call, AutomationRoots::new), wrapped in a variant.
The tests that need no files, working directory, environment or stdin now call
`run` in-process (tests/it/run.rs); the rest still run the binary.
Behaviour changes:
- Error messages start with `error: ` instead of `soundcraft-cli: `.
- A script line that stops the run now prints `error: FILE:N: ID: ...` (it had
no prefix). With --keep-going the line stays bare.
- A convert encode or write failure now names the output path.
- An empty or help-less call still prints the one-line usage to stderr without
a prefix and exits 1; `files confined:` keeps its `soundcraft-cli:` prefix
(it is a note, not an error).
* refactor(cli): parse arguments with clap
Replace the hand parser (arg_value, check_options, ENGINE_OPTIONS, the
lib.rs dispatch, the per-subcommand positional handling and the root
flags' consume) with clap derive types in args.rs: a Parser, a
Subcommand enum and one Args struct per subcommand, with the run/script
engine flags flattened. main passes args_os(); run takes OsString-like
arguments and renders clap's help, version and usage errors (help and
version on stdout, exit 0; usage errors on stderr, exit 2). Add
command() returning the clap definition. The usage block in the module
doc and help_text are gone: the doc comments are the help.
Behaviour changes:
- Usage errors exit 2 with clap's message and the --help hint on
stderr, instead of exit 1 with hand-written text: unknown subcommand,
unknown flag, missing value, missing or extra positional, a value on
a boolean flag (--demo=1, --normalize=1).
- No arguments prints the help to stderr, exit 2 (was a one-line usage,
exit 1).
- --help, -h and help print clap's generated help, and every subcommand
has its own (SUB --help, SUB -h, help SUB). Before, info and script
read --help as a file name, describe as an id, commands as a filter,
run rejected --help and ignored -h, convert and app printed their
usage error, mcp, parity and plugins ignored it, and app --port P -h
called the method -h.
- --help or -h before -- shows the subcommand's help even after a
mistake on the same line (run --bounce --help).
- --version, -V and version print "soundcraft-cli X.Y.Z" (was
"SoundCraft CLI X.Y.Z").
- Unknown flags on info, commands, describe, app, mcp, parity and
plugins are usage errors; they were ignored or read as a positional.
mcp --automation-bogus exits 2 (was exit 1).
- Extra positionals are usage errors on every subcommand (were ignored).
- A single-dash word (-x) is a flag, so an unknown one is a usage
error; a value starting with - is written --flag=-value.
- Flags may come before or between the positionals: convert IN --rate
44100 OUT, convert --rate 44100 IN OUT and script --keep-going FILE
parse (the flag word was taken as a file name).
- A repeated single-value flag keeps its last value (was the first):
--rate, --bit-depth, --save, --port and the others.
- parity --write without a value is a usage error (printed the report).
- mcp --connect without a value, or followed by a flag, is a usage
error (was exit 1, or took the flag as the port).
- mcp --demo=1 is a usage error (was ignored, without the demo).
- A root flag without a folder, with an empty one, or followed by a
flag is a usage error with clap's message (was exit 1).
- A non-Unicode argument is a usage error where text is expected and
accepted as a root folder (std::env::args panicked).
- The help lists --sample as --demo's alias.
Unchanged: --dither with --no-dither, bad --rate and --bit-depth values,
the roots with --connect and the SOUNDCRAFT_CONTROL_PORT fallback are
still checked after parsing (exit 1).
* refactor(cli): reject repeated flags, clap --version (photocraft#7071 decisions)
Behaviour changes:
- A flag given twice is a usage error (exit 2), in either spelling, including
an alias pair such as --demo and --sample. Before, the last one won. Only
run's --cmd and mcp's --automation-read-root / --automation-write-root
repeat; they accumulate in order.
- --version and -V print the long version, "soundcraft-cli 0.13.1 (linux
x86_64)": the version and the platform the binary was built for.
- The hidden `version` subcommand is gone; `soundcraft-cli version` is an
unrecognized-subcommand usage error.
- --start and --end accept a negative number (`--start -1`, as the engine
counts positions before 0); any other value starting with `-` needs `=`
and otherwise is an unexpected-argument usage error. No flag has
allow_hyphen_values.
- `help <subcommand>` is unchanged (tested).
* refactor(cli): typed values and flag relations
Handlers receive typed values: convert --bit-depth is a ValueEnum, --rate a
NonZeroU32, file arguments PathBuf, --start/--end a TimeArg, --cmd a parsed
(id, JSON) spec, app's JSON a serde_json::Value, app --port and mcp --connect
a validated port or host:port. Relations (--dither/--no-dither, --in/--demo,
--start/--end needing --bounce) are declared on the flags. describe ID,
commands FILTER and app METHOD refuse an empty string. parse_rate,
parse_bit_depth, parse_dither, parse_cmd_spec, time_arg and the Rate,
BitDepth, DitherConflict and CmdJson errors are gone.
Behaviour changes:
- --dither with --no-dither is a usage error (exit 2) instead of exit 1.
- --rate 0 / non-numeric and an unknown --bit-depth are usage errors (exit 2)
with clap's wording, naming the flag. --bit-depth help lists the values.
- --in with --demo (or --sample) is a usage error; --in used to win silently.
- --start/--end without --bounce are a usage error; they used to be ignored.
- Malformed JSON in --cmd ID=JSON and in app's JSON argument is a usage error
(exit 2) at parse time. Before, run opened the engine and executed every
earlier --cmd (printing their results) before the bad one failed with exit 1.
- An empty --start/--end, an empty command id (--cmd =1), and an empty
describe ID, commands FILTER or app METHOD are usage errors. An empty
commands FILTER used to list everything.
- app --port and mcp --connect accept only a port (0-65535) or host:port;
junk used to be accepted and failed at connect time (exit 1).
- Non-Unicode file names are accepted wherever the callee takes a Path (info
audio files, convert, script, parity --write). Session and bounce/save paths
go to the engine as text, so a non-Unicode one fails with exit 1, "the path
is not valid Unicode", after any earlier --cmd ran.
* refactor(cli): shared launch flags and SOUNDCRAFT_CONTROL_PORT as clap env
soundcraft_automation::args holds the launch flags as clap Args structs:
ControlClientArgs (`app --port`, env SOUNDCRAFT_CONTROL_PORT, default
7979), ControlServerArgs (the desktop `--control`, same variable, wired
in a later step; its ControlPort value is a port, also from a loopback
host:port, or another host's host:port, which the app decides on, so one
export serves both), AutomationArgs (the two root flags, repeatable, flags
only), the ControlTarget value parser, and the blank_env_is_unset,
name_env_vars and conflict helpers. The module and its clap/thiserror
dependencies are left out of the wasm build. `app` and `mcp` flatten
them; the hand fallback to the variable in `app` is gone.
Behaviour changes:
- An empty or blank SOUNDCRAFT_CONTROL_PORT counts as unset, so `app`
uses 7979; before, it tried to connect to `127.0.0.1:` (exit 1).
- A bad SOUNDCRAFT_CONTROL_PORT is a usage error naming the variable
(exit 2); before, the connection failed (exit 1).
- Spaces around the `app --port` or `mcp --connect` value, or the
variable's, are ignored; before, the connection failed (exit 1).
- An IPv6 host in `app --port`, `mcp --connect` or the variable goes in
brackets (`[::1]:7979`); `::1:7979` is a usage error (exit 2), as the
host and port can't be told apart; before, the connection failed
(exit 1).
- `app --help` shows `[env: SOUNDCRAFT_CONTROL_PORT=]` and
`[default: 7979]` instead of the hand-written default note.
- `mcp` with a root flag and --connect is clap's conflict error (exit 2,
"the argument '...' cannot be used with '...'"), reported before any
root folder is opened; before, a custom message with exit 1, after the
roots were opened.
* refactor(app): move launch flag parsing into launch_args
The parsing moves out of main unchanged, into a LaunchArgs struct and a
parse function that takes SOUNDCRAFT_CONTROL_PORT as a parameter. Tests pin
the flags, the file list, ignored unknown flags and the fallback of a bad
--control to the variable. No behaviour change.
* refactor(app): parse launch flags with clap
soundcraft --help now comes from the LaunchArgs doc comments and ends with the
environment variables the app reads, and the shared ControlServerArgs supplies
--control and SOUNDCRAFT_CONTROL_PORT. Process tests cover the variable (bad
value, blank value, loopback host:port, another host).
Behaviour changes:
- An unknown flag (--bogus, -x) is a usage error on stderr, exit 2. It was
ignored, and a single-dash word was opened as a file; after `--` it is a file.
- A bad --control (out of range, not a number, missing value) is a usage error,
exit 2. It was ignored and the variable used instead.
- A bad SOUNDCRAFT_CONTROL_PORT is a usage error naming the variable, exit 2.
It was ignored. An empty or blank variable still counts as unset.
- A loopback host:port (127.0.0.1, localhost or [::1]) in --control or
SOUNDCRAFT_CONTROL_PORT gives its port, so the value `soundcraft-cli app`
takes from the variable works for both. The control server listens on
127.0.0.1 only, so another host in --control is a usage error. In the
variable, which may point `soundcraft-cli app` at another machine, it is
ignored with a log warning and the app opens without a control server.
Both were ignored before.
- A repeated flag is a usage error (--demo twice, --control twice).
- --control=PORT and a port with surrounding spaces are accepted; a value that
starts with `-` is not taken as the value, except a negative number, which is
a bad port (`--control -1`).
- --help ends with an Environment section listing SOUNDCRAFT_CONTROL_PORT,
SOUNDCRAFT_CONFIG_DIR, SOUNDCRAFT_NO_PREFS, SOUNDCRAFT_NO_SYSTEM_FONTS,
SOUNDCRAFT_WAYLAND (Linux) and RUST_LOG.
- --help and -h print the help, exit 0. They were ignored.
- --version and -V print `soundcraft 0.13.1 (linux x86_64)`, as soundcraft-cli
does. It printed `SoundCraft 0.13.1`.
- -V and --version are read in order with the other arguments: an earlier
error comes first.
- macOS -psn_… process serial numbers are dropped, as before they were
opened as files.
- A file whose name is not valid Unicode is skipped with a log warning. It
used to panic in std::env::args.
* feat(cli): shell completions and man pages
An example, `cargo run -p soundcraft-cli --example man-and-completions -- <out-dir>`,
writes bash, zsh, fish, elvish and PowerShell completions and soundcraft-cli.1 plus a
page per subcommand, using clap_complete and clap_mangen (dev-dependencies of
soundcraft-cli only, not in the binary).
The Linux package (deb, rpm, tar.gz, AppImage) installs the pages in
/usr/share/man/man1 and the bash, zsh and fish completions in their standard
directories; the deb also links the zsh completion into Debian's
vendor-completions. A cross build runs the example through $EMULATOR and
leaves the files out without one. The FreeBSD tarball carries them in the
ports layout; a cross build builds the example for the host as well.
No change to the CLI's behaviour. A test pins the files the example writes.
* ci(cli): check the command-line code with ast-grep rules
Adds lint/ast-grep (rules for clap errors built from strings, String as an
error type, and std::env::args) and a workflow that runs the rule tests and a
scan over the CLI code through the shared craft-common-actions workflow. No
behaviour change; the scan has no hits.
* docs(cli): document soundcraft-cli and RFC-0012
Add docs/cli.md: the subcommands, exit codes, environment variables, the
desktop app's launch flags, man pages and completions, and the RFC-0012 rules
not followed yet (convert can overwrite its input; no --compact/--json).
Link it from the README and the MCP and control-protocol guides. No code change.
* feat(cli): refuse an output that replaces an input
An output that is one of the subcommand's inputs is a usage error (exit 2,
`error: …` on stderr, clap's usage line), reported while parsing, before
the engine loads or any --cmd runs. Paths are compared by file identity
(device and inode, through same-file), or, when neither exists yet, by
where they would be created, so `a.wav`, `./a.wav`, an absolute path and a
symbolic or hard link all count as the same file.
Inputs and outputs per subcommand:
- convert: input IN, output OUT. --in-place lets OUT replace IN.
- run: input --in, outputs --bounce and --save. --in-place lets --save
replace the --in session; it requires --in. A --bounce naming the --in
session is always refused.
- script: inputs FILE and --in, outputs --bounce and --save. --in-place
lets --save replace the --in session; a --bounce naming it is always
refused, and neither may ever replace FILE.
- run and script: --bounce and --save naming one file is refused with or
without --in-place (the save would replace the bounce).
- info, commands, describe, app, mcp, plugins write no file; parity
--write has no input. Paths inside --cmd parameters are not checked.
With --in-place, an output that is a symbolic link to the input is written
to the file the link names, so convert and --save both replace the input
and leave the link in place (a save renames a new file over its path,
which would otherwise replace the link and leave the input unchanged).
Behaviour changes:
- `convert a.wav a.wav`, `run --in s.scraft --save s.scraft`,
`run --in s.scraft --bounce s.scraft` and the other cases above exit 2
instead of replacing the input.
- New flag --in-place on convert, run and script.
- An existing file that is not an input is still replaced without asking.
* feat(cli): --compact for JSON output
RFC-0012 rule 1.3: JSON is pretty-printed by default and --compact prints
one line. Every pretty-printed JSON output now goes through
output::print_json.
Changed outputs:
- info <audio file>, describe, app: new --compact flag.
- run and script: new --compact flag, which requires --inspect and applies
to the --inspect JSON only.
Unchanged on purpose:
- The `ID: JSON` result lines of run and script and the --bounce and --save
results stay one line each. The prefix makes them text records, and the
RFC lets a command document its own layout; scripts that parse them keep
working.
- commands, plugins, parity and the .scraft summary of info are text and get
no --json flag (an open question in the RFC); mcp speaks JSON-RPC lines.
Pretty output is byte-identical to before.
* fix(app): one Switch parser for boolean environment switches
SOUNDCRAFT_NO_PREFS, SOUNDCRAFT_NO_SYSTEM_FONTS and SOUNDCRAFT_WAYLAND each
counted any value, including 0, as on. They now share
soundcraft_ui_egui::switch::Switch: 1/on/true/yes is On, 0/off/false/no is
Off (case- and space-insensitive), unset or blank is Default, and any other
value is Default and logged with the variable name. The ENVIRONMENT help
text, docs/cli.md and the README say the same.
Behaviour changes (old -> new):
- SOUNDCRAFT_NO_PREFS=0 disabled preferences (any value did); now only On
does.
- SOUNDCRAFT_NO_SYSTEM_FONTS=0 disabled system fonts (any value did); now
only On does.
- SOUNDCRAFT_WAYLAND=0 kept native Wayland (any value did); now only On does.
- An empty value of any of the three counted as set; it now means the
default (off).
- An unknown value of any of the three is logged.
* refactor(app): read the environment once into Env
The desktop app reads SOUNDCRAFT_CONFIG_DIR, SOUNDCRAFT_NO_PREFS,
SOUNDCRAFT_NO_SYSTEM_FONTS and SOUNDCRAFT_WAYLAND once at startup into
env::Env (typed fields, Switch for the on/off ones), after the logger is
installed so malformed switches are logged. The --help Environment
section is generated from the same VARS table, with a test that it lists
every name.
ui-egui no longer reads the app's variables: fonts::install and
definitions take system_fonts, set through SoundApp::set_system_fonts
(default on, so the web app is unchanged). The XWayland and prefs
decisions are methods on Env, tested on literals. logging::install takes
the RUST_LOG value, which stays outside Env because the logger needs it
before anything can log.
No behaviour change beyond help column spacing.
* refactor(cli): one long_version for both binaries
* refactor(audio-io): one FileFormat table for extensions
FileFormat gains the extension table every caller matches on:
from_extension / from_path (ASCII case-insensitive) over extensions,
from_write_extension over write_extensions, default_extension, name,
mime_type, the READ and WRITE lists, and readable_extensions /
writable_extensions for dialog filters, help and messages. Reading
takes every extension the decoder knows; writing takes only the names
whose readers expect what the encoder writes (no rf64 or aifc, whose
files would get plain RIFF and AIFF headers).
detect_format, bounce (mix and stems), convert, the bounce dialog, the
desktop and web file pickers, the workspace browser, the Sampler, web
downloads and the MCP bounce schema all use it; ENCODE_EXTENSIONS and
encode_format_for are gone. convert's IN/OUT and info's FILE help name
the extensions from the read and write lists.
Behaviour changes, where the lists disagreed:
- The bounce dialog's Browse result, the bounce save filter and the MCP
bounce enum take wav, wave, bwf, aif, aiff and flac: wave and bwf are
new to all three, and aif is new to the MCP enum. convert and
file.bounce_mix already took these. The "supported:" list in the
cannot-write errors is "wav, wave, bwf, aif, aiff, flac".
- file.bounce_stems reads its format name case-insensitively: `AIFF`
or `FLAC` meant WAV before. Unknown names still mean WAV.
- The bounce dialog sends the format as its file extension (aif for
AIFF); the engine accepts both spellings.
- File pickers, the workspace browser and the Sampler's drop and Load
Sample filter list every extension the decoder reads: the workspace
browser gains wave, bwf, rf64, aifc, mp1, mp2, oga, aac, mp4, adts,
mkv and webm; the Sampler gains rf64, mp1, mp2, m4b, adts, mkv and
webm; the desktop and web open filters gain rf64, mp1, mp2 and adts.
- Web downloads get a media type for every audio format, not only WAV,
AIFF and FLAC.
* refactor(app): resolve the settings folder once in Env
* fix(app): keep paths as paths until the engine needs text
A path is text only where an engine command takes `"path": string`; a
name that is not valid Unicode is reported there instead of being opened
under a lossy rendering (another file, or a confusing "can't read").
- ui-egui: dialogs::unicode() and NotUnicode ("<path:?> is not valid
Unicode"); dialogs::open_path(app, &Path), moved from the desktop app,
is the one open-by-extension path for dropped, command-line and
Workspace files.
- Services: the file dialogs return PathBuf (pick_save and pick_folder
start from a &Path); callers convert where the text field or command
takes the path.
- Sampler drops and Load Sample pass the path to mix.sampler_load
through unicode(); the audio test checks the Path.
- Workspace panel keeps entry paths; names are shown lossily only as
labels. workspace_dir stays a String (serialized preferences).
- soundcraft-cli: utf8() is unicode(), CliError::NonUnicodePath is
NotUnicode; it is called only for info's session, --in, --bounce and
--save. convert's output format test no longer treats a non-Unicode
extension as "no extension".
- docs/cli.md: sessions and bounces the engine opens or writes must be
valid Unicode.
Behaviour changes:
- A dropped, command-line, picked or Workspace file whose name is not
valid Unicode is not opened: the status line (and log) says
"<path:?> is not valid Unicode", with the bytes escaped. Dropped files
used to be opened under a U+FFFD rendering.
- A file dialog result that is not valid Unicode leaves the path field
unchanged and shows the same warning.
- Double-clicking a Workspace file opens it like a dropped file:
.MID/.MIDI/.SCRAFT in any case open as MIDI/session (they used to
import as audio), and a failed open is logged.
- convert OUT with an extension that is not valid Unicode is refused as
an unsupported format instead of being written as WAV.
* fix(app): read Env after the launch flags; tidy Switch and Env
* fix(audio-io): decode every extension the format table lists
* fix(cli): write convert output atomically; tighten --connect and loopback
- convert writes every output to a new file in the output's folder, flushes it and renames it
over the target, removing the new file on failure. A failed write (disk full, unwritable
folder) no longer truncates the input under --in-place (RFC-0012 rule 1.6). A link output
still writes the linked file.
- --save in place already goes through the engine's replace_file (tmp + rename), and
file.bounce_mix renders to <name>.part and renames it when complete, so both are atomic.
- The desktop's --control / SOUNDCRAFT_CONTROL_PORT no longer treat [::1] as loopback: the
control server binds 127.0.0.1 only. [::1]:P is a usage error from the flag and is ignored
with a warning from the variable. The CLI's --connect / app --port still accept [::1]:P.
Error tip and docs/cli.md updated.
- mcp --connect conflicts with --demo (exit 2): the demo session belongs to the in-process
server. Help and docs/cli.md say so.
* test(audio-io): list the decode fixtures in ATTRIBUTION.md
cargo xtask assets needs a row for every committed audio file; one
directory row covers crates/audio-io/tests/fixtures/.
* fix(cli): refuse non-finite --start and --end values
* refactor(cli): parse the control target once; open sessions by path; keep error sources
- A1: ControlTarget { host, port } is parsed once by args::control_target; is_loopback() replaces
control_port/ControlPort, and Remote::new takes &ControlTarget.
- A2: engine::io::open_session takes impl AsRef<Path>; the CLI no longer requires a Unicode path
to open a session, only for the --bounce and --save paths that go into JSON.
- A3: ValueError::Json keeps the serde_json::Error; Remote::request returns RemoteError and
AutomationRoots::new returns RootError, both carried by CliError.
* test(engine): pass session paths to open_session without a borrow
* test(cli): info opens a session at a non-Unicode path
* refactor(app): log the shared long version; info: session extension in any case; Switch beside Env
* ui: keep SoundCraft's beside-the-session-view place for panels craft-ui has no record of
* ui: Tracks and Groups and Clips in full-height dock columns
The Edit window docks Tracks and Groups (168 pt) at its start edge and Clips
(230 pt) at its end edge, with the MIDI editor under the session view between
them; Mix docks Tracks and Groups at its start edge. Panels dragged to an
empty window edge make a dock there.
Saved preferences and window configurations carry docking_version. Split-frame
layouts saved without it load as the new defaults, keeping every other
setting. A list with no recorded place reopens in its dock group, making the
dock again at its side and width when it is gone.
Pins craft-ui, craft-docpath and craft-media to craft-libs#312.
* Pin craft-libs at d24e4bc for the Mac round 3
* ui: test that a floating list reopens floating while its dock is shown; ui-parity revision
Cancel Zoom Toggle (view.zoom_toggle_cancel, Alt+Shift+E, Option+Shift+E
on a Mac) turns Zoom Toggle off without going back to the view it
stored: the zoom, the horizontal and vertical scroll and the track
heights stay as they are. An Alt-click (Option-click) on the Zoom Toggle
button runs the same command. The next Zoom Toggle zooms in from the
current view and goes back to it.
When the command runs, from a key, the button or the control channel,
the Edit window clears the vertical scroll position that Zoom Toggle
would restore.
* Auto Pan: balance the left and right channels at constant power instead of panning their mono sum
* Strip Silence rectangles: on the web, rescan when a slider drag ends instead of on every frame of it
* Paste: keep the clipboard's remapped Auto Rename keys only when the paste succeeds
* Subharmonic: test that Q 5 filters after the saturator keep the output finite
* AudioSuite window: drop the constant-speed varispeed controls no menu item opens
* docs: gaps: Clip Looping has no loop crossfade and caps Number of Loops at 512