Compare commits

..
Author SHA1 Message Date
a67a063280 docs: bring ROADMAP.md current through 2026-11-15 (#1574)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-12-01 11:39:13 +01:00
a3e10d89d7 Send menu: a new bus asks mono or stereo (#1547)
* Send menu: new bus asks mono or stereo (#1388)

Co-Authored-By: Patrick Istefanidis <smallroomproductionsfl@gmail.com>

* send menu: complete new-bus labels

---------

Co-authored-by: Patrick Istefanidis <smallroomproductionsfl@gmail.com>
Co-authored-by: Stefan Pantic <stefpantic@gmail.com>
2026-12-01 11:15:09 +01:00
8 changed files with 55 additions and 59 deletions
+2
View File
@@ -125,6 +125,7 @@ mutated and truncated movies. Field reports from the first public week are track
## Progress log
- **2026-11-18 (MIDI input):** MIDI input devices: keyboards play record-enabled and input-monitored MIDI and instrument tracks live and are recorded into MIDI clips, with a device and channel choice per track. The device switches are in the MIDI inputs section of Setup › Playback Engine (Setup › MIDI › MIDI Input Devices opens the same window) and are kept in the app preferences, per computer, not in the session. Controllers, pitch bend and aftertouch reach the instrument live; a pitch held on two devices or channels sounds until both release it; a full input queue releases the notes of its device and marks the take incomplete. On Linux, live play was checked with a hardware keyboard (Akai MPK mini 3) and recording with a virtual one; macOS and Windows are type-checked only, and there is no MIDI input on FreeBSD or the web. Guide: `docs/midi-input.md`. No readiness percentage change until that is measured.
- **2026-11-15 (27 October–15 November recap):** Releases v0.14.0 through v0.20.1; clips draw as a small name pill with shared cut seams, alternate playlist lanes draw on screen and rating stars follow their own switch; the Edit window's I/O column sets volume and pan; edit modes, playback and record colours; Grid and Nudge time scales; a new-tracks workflow; Smart Tool/Pencil shortcuts, held zoom keys, track-colour Color Palette, Sub-counter format menu, searchable I/O menus, scrolling menus, distinct link icons and Insertion Follows Playback; folder-track indentation, stereo input pairs, sends that open their Send window, Alt-click marker deletion and selection-aware Clip menus; the playback engine applies the chosen device and buffer (#1077) and volume automation is read at every sample (#1355); a 256 MiB session cap with a tree-free parser (#892), overflow and bounds hardening across H.264, FLAC, WAV, CAF, tempo, grid, automation and timecode, MIDI tempo/track-flood limits (#890), bounded command journal and score output (#995, #993), clip-FX gain and send-level clamps (#884), clip-group path-traversal rejection and VST3 multi-out instruments with up to 64 buses; MIDI export keeps only the notes a trimmed clip plays, key signatures follow Insert/Cut Time, score export keeps short-bar notes and strips XML-forbidden characters, and WAV bounces carry BWF timecode; Enter presses the default button only without button focus (#1243), the 1/4t quantize grid (#1453), VST3 scan paths (#1450) and portable.txt (#1341) are fixed, CLAP resets keep note-offs (#1464, #1470) and hosted plugins learn when they render offline; the #1144 demo benchmark recorded about a 20 % faster mix bounce on its stated setup; shared craft-update with Flatpak self-update and Linux signing fixes, and a nightly release dry run (#1508); session format and H.264/ProRes codecs move to craft-libs, and audio formats to craft-audio; commands --json (#744), malformed control requests close the connection and Import Audio Browse selects several files (#1089). This is a historical summary, not a new measurement of readiness.
- **2026-11-14:** AAF import supports a strict CompositionMob SourceClip/Filler subset with external mono/stereo PCM WAV media, editable clips and handles, relink and absolute or relative timecode mapping. The reader shares cached object properties, caps retained property data at 128 MiB and rejects duplicate local references before expansion. AAF export, OMF and `.ptx` remain missing. No readiness percentage change.
- **2026-11-09:** A built-in Frequency Shifter (`freq_shifter`) moves every frequency in the signal by the same number of hertz, from 0.01 Hz to 5 kHz: up, down, both ways at once, or down on the left and up on the right of a stereo track. The unwanted sideband stays at least 100 dB down from 20 Hz to 20 Hz below Nyquist at 44.1 to 96 kHz. Feedback sends the output round again for a trail of further shifts, Mix blends in the dry signal, and every change glides without a click. No readiness percentage change.
- **2026-11-08:** Command-click near an existing automation breakpoint keeps that point as the click target with every active tool, and existing fade and clip-gain controls retain their normal priority. Empty automation space shows a crosshair and an insertion hint while Command is held. The active tool's drag gestures stay unchanged. No readiness percentage change.
@@ -192,6 +193,7 @@ mutated and truncated movies. Field reports from the first public week are track
| 2026-11-27 | trivial | Languages table: Spanish catalog complete with native-speaker review. Estimates unchanged |
| 2026-11-24 | trivial | Languages table: French and Spanish catalogs, partial (≈ 62 %), PR #143. Estimates unchanged |
| 2026-11-22 | minor | Languages table: Simplified Chinese (zh-Hans) covers the fixed UI strings through the `locales/zh-Hans` catalog, with a Han system-font fallback and an OFL web subset; needs native review. Localization estimate 70–110 → 55–90 h |
| 2026-11-15 | minor | Historical 27 October–15 November progress recap through v0.20.1; menu breadth, readiness and effort were not re-measured |
| 2026-11-14 | minor | Strict external-WAV AAF import with bounded property caching; remaining interchange work and readiness estimates unchanged |
| 2026-11-09 | trivial | Progress log: Frequency Shifter plugin; readiness estimates unchanged |
| 2026-11-08 | trivial | Command-click breakpoint/control priority and insertion affordance; active-tool drags retained; readiness estimates unchanged |
+2
View File
@@ -154,6 +154,8 @@ pub(super) fn translate(source: &str) -> Option<&'static str> {
"new" => "novo",
"New Bus" => "Novo bus",
"new bus..." => "novo bus...",
"new mono bus" => "novo bus mono",
"new stereo bus" => "novo bus estéreo",
"New Configuration…" => "Nova configuração…",
"New Group…" => "Novo grupo…",
"New..." => "Novo...",
+2
View File
@@ -1285,6 +1285,8 @@ pub(super) fn translate(source: &str) -> Option<&'static str> {
"mute" => "静音",
"new" => "个新",
"new bus..." => "新建总线...",
"new mono bus" => "新建单声道总线",
"new stereo bus" => "新建立体声总线",
"no audio engine" => "无音频引擎",
"no audio input device" => "没有音频输入设备",
"no audio track is record-enabled" => "没有已启用录音的音频轨道",
+2
View File
@@ -865,6 +865,8 @@ automation trim 微调
bpm BPM
no insert 无插入
new bus... 新建总线...
new mono bus 新建单声道总线
new stereo bus 新建立体声总线
OK 确定
Replace 替换
Revert “{name}” to its last saved version? Your changes will be lost. 将“{name}”恢复到上次保存的版本?你的更改将丢失。
Can't render this file because it contains an unexpected character in line 796 and column 11.
+34 -11
View File
@@ -394,12 +394,13 @@ fn header_footer_menu<H, R, F>(
/// What the send menu's footer was used for.
enum SendFooter {
NewBus,
/// A new bus in this format (`mono` or `stereo`), with the send going to it.
NewBus(&'static str),
RemoveSend,
}
/// The send's destination menu: a title and the bus search on top, the matching buses in a list
/// that scrolls, "new bus..." (and "Remove send" for an existing send) fixed under it.
/// that scrolls, "new mono bus" / "new stereo bus" (and "Remove send" for an existing send) fixed under it.
/// `current` is the send's destination and its name, if the slot has a send.
fn send_route_menu(app: &mut SoundApp, ui: &Ui, field: &egui::Response, id: TrackId, slot: usize, current: Option<(Route, String)>) {
let which = (b'A' + slot as u8) as char;
@@ -445,9 +446,11 @@ fn send_route_menu(app: &mut SoundApp, ui: &Ui, field: &egui::Response, id: Trac
})
},
|ui| {
if ui.button(crate::localization::text("new bus...")).clicked() {
ui.close();
return Some(SendFooter::NewBus);
for (label, format) in [(crate::localization::text("new mono bus"), "mono"), (crate::localization::text("new stereo bus"), "stereo")] {
if ui.button(label).clicked() {
ui.close();
return Some(SendFooter::NewBus(format));
}
}
if has_send && ui.button(crate::localization::text("Remove send")).clicked() {
ui.close();
@@ -478,7 +481,7 @@ fn send_route_menu(app: &mut SoundApp, ui: &Ui, field: &egui::Response, id: Trac
show_new_send(app);
}
match footer {
Some(SendFooter::NewBus) => {
Some(SendFooter::NewBus(format)) => {
let busses = &app.engine.session().busses;
let mut n = busses.len() + 1;
while busses.iter().any(|bus| bus.name.eq_ignore_ascii_case(&format!("Bus {n}")))
@@ -486,7 +489,7 @@ fn send_route_menu(app: &mut SoundApp, ui: &Ui, field: &egui::Response, id: Trac
{
n += 1;
}
if app.run("mix.new_bus", json!({"name": format!("Bus {n}")})).is_ok()
if app.run("mix.new_bus", json!({"name": format!("Bus {n}"), "format": format})).is_ok()
&& app.run("mix.send", send_params(app, &format!("Bus {n}"))).is_ok()
{
show_new_send(app);
@@ -505,6 +508,7 @@ mod tests {
use crate::Services;
use crate::preferences::SendsDefault;
use egui_kittest::{Harness, kittest::Queryable};
use soundcraft_model::ChannelFormat;
/// Filtering the destination list to nothing shrinks the menu; clearing the filter grows it
/// back, with the search field in the same place and the footer under the list.
@@ -538,7 +542,7 @@ mod tests {
let field = |h: &Harness<'_, (SoundApp, TrackId)>| h.get_by_role(egui::accesskit::Role::TextInput).rect();
let footer = |h: &Harness<'_, (SoundApp, TrackId)>| h.get_by_label("Remove send").rect();
let (search, full) = (field(&h), footer(&h));
assert!(h.query_by_label("new bus...").is_some(), "the footer lists new bus...");
assert!(h.query_by_label("new stereo bus").is_some(), "the footer offers a new stereo bus");
assert!(full.top() > search.bottom() + 150.0, "the list sits between the search and the footer: {search:?} {full:?}");
h.get_by_role(egui::accesskit::Role::TextInput).type_text("zzzz");
@@ -599,7 +603,7 @@ mod tests {
assert_eq!(app.ui.send_window, Some((kick, 0)), "the new send's window is open");
}
/// So does a send made with "new bus...".
/// So does a send made with "new stereo bus".
#[test]
fn a_send_to_a_new_bus_opens_its_send_window() {
let _palette = crate::theme::lock_test_palette();
@@ -607,13 +611,32 @@ mod tests {
h.run();
h.get_by_label("Send A for Kick").click();
h.run();
h.get_by_label("new bus...").click();
h.get_by_label("new stereo bus").click();
h.run();
let (app, _) = h.state();
assert!(app.engine.session().track(kick).and_then(|t| t.mixer.sends.first().cloned().flatten()).is_some(), "the send was created");
assert_eq!(app.ui.send_window, Some((kick, 0)), "the new send's window is open");
}
/// #1388: the send menu asks for mono or stereo, and the new bus has the format picked.
#[test]
fn a_new_bus_from_the_send_menu_is_mono_or_stereo_as_picked() {
let _palette = crate::theme::lock_test_palette();
for (label, format) in [("new mono bus", ChannelFormat::Mono), ("new stereo bus", ChannelFormat::Stereo)] {
let (mut h, kick) = kick_send_harness(false);
h.run();
h.get_by_label("Send A for Kick").click();
h.run();
h.get_by_label(label).click();
h.run();
let (app, _) = h.state();
let s = app.engine.session();
let send = s.track(kick).and_then(|t| t.mixer.sends.first().cloned().flatten()).unwrap();
let bus = s.busses.iter().find(|b| Route::Bus(b.id) == send.target).unwrap();
assert_eq!(bus.format, format, "{label} makes a bus in that format");
}
}
/// Moving an existing send to another bus keeps the Send window as it was.
#[test]
fn changing_a_sends_destination_leaves_the_send_window_alone() {
@@ -653,7 +676,7 @@ mod tests {
let _palette = crate::theme::lock_test_palette();
assert_eq!(level_after_picking(false, SendsDefault::NegativeInfinity, "Aux"), Some(-144.0));
assert_eq!(level_after_picking(false, SendsDefault::Unity, "Aux"), Some(0.0));
assert_eq!(level_after_picking(false, SendsDefault::Unity, "new bus..."), Some(0.0));
assert_eq!(level_after_picking(false, SendsDefault::Unity, "new stereo bus"), Some(0.0));
}
/// Moving an existing send to another bus keeps its level, whatever the preference says.
+2 -30
View File
@@ -146,9 +146,6 @@ pub struct Movie {
thumbs: Lru<(usize, u32)>,
/// Decoded frames since open (statistics for tests and the UI).
pub decoded: u64,
/// Unit tests can shrink the workload without bypassing the request guard.
#[cfg(test)]
pub(crate) request_bytes_override: Option<usize>,
}
impl std::fmt::Debug for Movie {
@@ -273,22 +270,7 @@ impl Movie {
has_audio,
quicktime: mp4.is_quicktime,
};
Ok(Movie {
src,
mp4,
track,
info,
codec,
order,
rank,
times,
h264: None,
cache: Lru::new(12),
thumbs: Lru::new(256),
decoded: 0,
#[cfg(test)]
request_bytes_override: None,
})
Ok(Movie { src, mp4, track, info, codec, order, rank, times, h264: None, cache: Lru::new(12), thumbs: Lru::new(256), decoded: 0 })
}
pub fn info(&self) -> &MovieInfo {
@@ -488,15 +470,6 @@ impl Movie {
/// at most 16, so a stream that produces nothing for this long will produce nothing.
const MAX_SAMPLES_WITHOUT_PICTURE: usize = 256;
/// The request budget: [`Self::MAX_REQUEST_BYTES`], or a smaller one a unit test sets.
pub(crate) fn max_request_bytes(&self) -> usize {
#[cfg(test)]
if let Some(bytes) = self.request_bytes_override {
return bytes;
}
Self::MAX_REQUEST_BYTES
}
fn decode_h264(&mut self, index: usize) -> Result<Arc<Frame>> {
let Codec::H264 { avcc } = &self.codec else { return Err(VideoError::Unsupported("not H.264".into())) };
let target = self.order.get(index).copied().ok_or(VideoError::OutOfRange)?;
@@ -512,7 +485,6 @@ impl Movie {
}
let total = self.order.len();
let mut last_err: Option<String> = None;
let max_request_bytes = self.max_request_bytes();
let (mut fed, mut without_picture) = (0usize, 0usize);
// Bounded: each iteration feeds one sample, or flushes once at the end.
for _ in 0..=total.saturating_add(1) {
@@ -530,7 +502,7 @@ impl Movie {
let pts = self.rank.get(s).copied().unwrap_or(0) as i64;
// The declared size is checked before the read allocates it. An error leaves no decoder
// behind that has stepped past this sample: the next request starts from its keyframe.
if fed.saturating_add(self.declared_size(s)) > max_request_bytes {
if fed.saturating_add(self.declared_size(s)) > Self::MAX_REQUEST_BYTES {
self.h264 = None;
return Err(VideoError::Decode(format!("frame {index} needs more than {} MiB of samples", Self::MAX_REQUEST_BYTES >> 20)));
}
+9 -17
View File
@@ -120,13 +120,12 @@ fn prores_frame_size_is_checked_before_decoding() {
assert!(matches!(m.frame(0), Err(VideoError::Decode(e)) if e.contains("56x48 frame in a 64x48 track")));
}
/// In-memory movie bytes, zero-padded up to `len` without storing the padding. Counts
/// reads, records their largest size, and refuses reads over 32 MiB.
/// In-memory movie bytes, zero-padded up to `len` without storing the padding. Records the
/// largest read asked of it and refuses reads over 32 MiB (the test movies are much smaller).
struct PaddedSource {
bytes: Vec<u8>,
len: u64,
largest: AtomicUsize,
reads: AtomicUsize,
}
impl ByteSource for PaddedSource {
@@ -135,7 +134,6 @@ impl ByteSource for PaddedSource {
}
fn read_at(&self, offset: u64, buf: &mut [u8]) -> std::io::Result<()> {
self.largest.fetch_max(buf.len(), Ordering::Relaxed);
self.reads.fetch_add(1, Ordering::Relaxed);
if buf.len() > 32 << 20 {
return Err(std::io::Error::other("read too large for the test source"));
}
@@ -155,7 +153,7 @@ fn h264_sample_reads_are_capped() {
// After the type: version and flags, the constant size (0: one size per sample), the count.
let field = if bytes[at + 8..at + 12] == [0; 4] { at + 16 } else { at + 8 };
bytes[field..field + 4].copy_from_slice(&(300u32 << 20).to_be_bytes());
let src = Arc::new(PaddedSource { bytes, len: 1 << 30, largest: AtomicUsize::new(0), reads: AtomicUsize::new(0) });
let src = Arc::new(PaddedSource { bytes, len: 1 << 30, largest: AtomicUsize::new(0) });
let mut m = Movie::open_source(src.clone()).unwrap();
let r = m.frame(0);
assert!(matches!(&r, Err(VideoError::Decode(e)) if e.contains("sample larger than 256 MiB")), "{r:?}");
@@ -165,33 +163,27 @@ fn h264_sample_reads_are_capped() {
#[test]
fn one_frame_request_reads_a_bounded_amount_of_samples() {
// Keep the 65-sample GOP, but scale the declared sample size and the per-request budget
// together: exactly 64 samples fit, and the 65th must be refused before it is read.
const SAMPLE_BYTES: u32 = 16 << 10;
// 65 frames whose `stsz` entries each claim 32 MiB: under the per-sample cap, but together
// past the 2 GiB one request may feed the decoder.
let mut bytes = h264_mp4(65, 65).unwrap();
let at = bytes.windows(4).position(|w| w == b"stsz").unwrap();
if bytes[at + 8..at + 12] == [0; 4] {
// one size per sample
for i in 0..65 {
let field = at + 16 + 4 * i;
bytes[field..field + 4].copy_from_slice(&SAMPLE_BYTES.to_be_bytes());
bytes[field..field + 4].copy_from_slice(&(32u32 << 20).to_be_bytes());
}
} else {
// the writer stored one size for all the (equally large) samples
bytes[at + 8..at + 12].copy_from_slice(&SAMPLE_BYTES.to_be_bytes());
bytes[at + 8..at + 12].copy_from_slice(&(32u32 << 20).to_be_bytes());
}
let src = Arc::new(PaddedSource { bytes, len: 3 << 30, largest: AtomicUsize::new(0), reads: AtomicUsize::new(0) });
let mut m = Movie::open_source(src.clone()).unwrap();
assert_eq!(m.max_request_bytes(), 2 << 30);
m.request_bytes_override = Some(64 * SAMPLE_BYTES as usize);
src.reads.store(0, Ordering::Relaxed); // Don't count reads made when opening the movie.
let src = Arc::new(PaddedSource { bytes, len: 3 << 30, largest: AtomicUsize::new(0) });
let mut m = Movie::open_source(src).unwrap();
let r = m.frame(64);
assert!(matches!(&r, Err(VideoError::Decode(e)) if e.contains("needs more than 2048 MiB of samples")), "{r:?}");
assert_eq!(src.reads.swap(0, Ordering::Relaxed), 64, "the first request must stop before reading the refused sample");
// the sample that was refused is not skipped: asking again fails the same way instead of decoding past it
let again = m.frame(64);
assert!(matches!(&again, Err(VideoError::Decode(e)) if e.contains("needs more than 2048 MiB of samples")), "{again:?}");
assert_eq!(src.reads.load(Ordering::Relaxed), 64, "the retry must start from the keyframe and stop before the refused sample");
}
/// A source that, once `failing` is set, cannot be read at all.
+2 -1
View File
@@ -1,6 +1,6 @@
# Target-app parity: SoundCraft vs Avid Pro Tools
> **Last reviewed:** 2026-11-14 · **Last updated:** 2026-11-14 · **Change:** minor (Performance row: recording is to disk (#84, #888); scores unchanged; previously minor: strict external-WAV AAF import; previously trivial: Frequency Shifter: 28 built-in processors; G-09/localization: pt-BR catalog; readiness estimates unchanged) · **Target:** Avid Pro Tools Ultimate 2026.4.1 (bundle 26.4.1.179, macOS)
> **Last reviewed:** 2026-11-14 · **Last updated:** 2026-11-23 · **Change:** minor (archived the 27 October–15 November progress recap; Performance row: recording is to disk (#84, #888); scores unchanged; previously minor: strict external-WAV AAF import; previously trivial: Frequency Shifter: 28 built-in processors; G-09/localization: pt-BR catalog; readiness estimates unchanged) · **Target:** Avid Pro Tools Ultimate 2026.4.1 (bundle 26.4.1.179, macOS)
The authoritative assessment of how close SoundCraft is to Pro Tools. [`ROADMAP.md`](../ROADMAP.md)
summarizes it, [`gaps.md`](gaps.md) itemizes every shortfall, and the per-dimension docs go deeper:
@@ -245,6 +245,7 @@ serializes more, because it needs hands-on testing.
| Date | Change | Summary |
|---|---|---|
| 2026-11-15 | minor | Historical ROADMAP sync over 27 October–15 November: releases v0.14.0–v0.20.1, clip drawing and edit-mode colours, Edit-window I/O volume and pan, Grid/Nudge time scales, a new-tracks workflow, device/buffer application (#1077), sample-accurate volume automation (#1355), session and format hardening (#892, #890, #995, #993), VST3 multi-out and offline-render support, BWF timecode, about a 20 % faster mix bounce in the #1144 demo benchmark and craft-libs cutovers; no new measurement of menu breadth, readiness or effort |
| 2026-11-14 | minor | Strict external-WAV AAF import added to format, interchange and alpha-gate evidence; readiness estimates unchanged |
| 2026-11-09 | trivial | Built-in plugin counts: 28 processors + 3 instruments with the Frequency Shifter. Percentages unchanged |
| 2026-11-05 | trivial | Localization row: English plus a near-complete pt-BR catalog for fixed UI strings (PR #1346), not native-reviewed. Percentages and hours unchanged |