mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-24 06:43:14 -06:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a19d9f3d39 | ||
|
|
3911c7e5d3 | ||
|
|
7391fc7465 | ||
|
|
40dfd311d2 | ||
|
|
7becad97d9 | ||
|
|
60b7633935 | ||
|
|
0929d693ee | ||
|
|
3d5916e42c | ||
|
|
6c121c3a26 | ||
|
|
e2c4c2e55d | ||
|
|
17af0c9193 | ||
|
|
a3f3b0ff51 | ||
|
|
aceae129c2 | ||
|
|
915481be1b |
@@ -55,3 +55,4 @@ jobs:
|
||||
AZURE_SIGNING_ACCOUNT: ${{ secrets.AZURE_SIGNING_ACCOUNT }}
|
||||
AZURE_CERT_PROFILE: ${{ secrets.AZURE_CERT_PROFILE }}
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
ARTCRAFT_SERVICES_DISPATCH_TOKEN: ${{ secrets.ARTCRAFT_SERVICES_DISPATCH_TOKEN }}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Accessibility
|
||||
|
||||
Source: `standards/app-accessibility.md` in [storytold/craft-contrib](https://github.com/storytold/craft-contrib/blob/main/standards/app-accessibility.md); do not edit this copy directly. Propose changes to the shared statement in [`storytold/craft-contrib`](https://github.com/storytold/craft-contrib).
|
||||
|
||||
We want people who use screen readers, braille displays, screen magnifiers, voice control, high contrast, large text, reduced motion, or keyboard navigation to be able to get their work done in the Craft applications.
|
||||
|
||||
## Supported environments and how accessibility works
|
||||
|
||||
The Craft applications draw their own interface in Rust with `egui` and expose accessibility information through **AccessKit**:
|
||||
|
||||
- **Windows:** UI Automation (for tools such as NVDA, JAWS, and Narrator)
|
||||
- **macOS:** NSAccessibility (VoiceOver)
|
||||
- **Linux and FreeBSD:** AT-SPI (Orca)
|
||||
- **Web (WebAssembly):** Browser accessibility tree in modern evergreen browsers
|
||||
- **Display and motion:** Light and dark themes, along with ongoing work to honour system high-contrast, text-scaling, and reduced-motion settings
|
||||
- **Headless and command-line workflows:** Most Craft applications also ship a command-line and automation binary (`<app>-cli`) that can inspect and edit documents from a terminal without using the graphical interface; see [This application](#this-application) below
|
||||
|
||||
**Current status:** The Craft suite is in early-alpha development. We use WCAG 2.2 and W3C's [WCAG2ICT](https://www.w3.org/TR/wcag2ict-22/) as practical reference points for user needs ([RFC-0014](https://github.com/storytold/craft-contrib/blob/main/rfcs/0014-accessibility.md)), while manual testing with assistive technologies across every tool and surface is still in progress.
|
||||
|
||||
## Known limitations and workarounds
|
||||
|
||||
Shared framework improvements are tracked in [storytold/craft-libs#437](https://github.com/storytold/craft-libs/issues/437). Current suite-wide gaps include:
|
||||
|
||||
- **Custom drawn surfaces (canvases, pages, grids, timelines, node graphs, and layer lists):** Some custom-painted views do not yet publish complete `AccessKit` nodes, caret bounds for magnifiers, or editable states (for example, `AccessKit`'s Windows adapter reporting `Document` nodes as read-only, which can prevent typing echo in screen readers). *Workaround:* Use structured inspector panels where available, or run headless commands through `<app>-cli` when a task does not need direct canvas interaction.
|
||||
- **Focus in menus, toolbars, and dialogs:** Some popups, menus, or keyboard access-key overlays may leave focus in the underlying document or not yet restore focus cleanly when dismissed. *Workaround:* Press `Escape` to close open popups, `Alt` or `F10` for menu/toolbar navigation, and `F6` to move between major regions where supported.
|
||||
- **Unannounced state changes:** Shortcuts or background tasks that change state away from focus do not yet consistently announce updates through a live region.
|
||||
- **Pointer-heavy interactions:** Certain timeline, node-wiring, or object-placement gestures do not yet have non-dragging keyboard alternatives.
|
||||
|
||||
See [This application](#this-application) below for repository-specific links and details.
|
||||
|
||||
## Reporting an accessibility barrier
|
||||
|
||||
If you run into an accessibility barrier, please open an issue using the link in [This application](#this-application) below (or let us know in the [ArtCraft Discord](https://discord.gg/artcraft) if GitHub's issue form gets in the way).
|
||||
|
||||
- **No personal disclosure needed:** You never have to disclose a disability or explain why you use assistive technology.
|
||||
- **Screenshots and recordings are optional:** Plain-text descriptions are always welcome and sufficient.
|
||||
- **Helpful details to share (when convenient):**
|
||||
- What you were trying to do, what happened, and what you expected
|
||||
- Application version (or commit) and operating system or browser
|
||||
- Input method, display settings, or assistive technology and version (for example, NVDA, JAWS, Narrator, VoiceOver, Orca, screen magnifier, high contrast, text scaling, or keyboard-only)
|
||||
|
||||
## How we respond
|
||||
|
||||
- **Triage and labels:** Maintainers and triagers label barrier reports with `accessibility` and set priority during triage based on impact—barriers that block a core workflow are treated as high-priority bugs, and barriers that risk losing work are critical.
|
||||
- **Assistive-technology verification (`needs screen reader test`):** Pull requests that fix a reported assistive-technology barrier or add custom accessibility-tree or focus behaviour are labelled `needs screen reader test` so someone using assistive technology can verify a build and share what they observed; if the barrier remains, we reopen the issue.
|
||||
|
||||
## Note for contributors and coding agents
|
||||
|
||||
`ACCESSIBILITY.md` is a user-facing overview, **not** an extra rule set or audit checklist for coding agents:
|
||||
|
||||
- **Follow `AGENTS.md` and [`standards/accessibility.md`](https://github.com/storytold/craft-contrib/blob/main/standards/accessibility.md) for engineering work,** and keep every pull request scoped strictly to its issue. Do not widen an unrelated change to audit or rework surrounding UI.
|
||||
- **Design for the actual user need—do not overbuild or apply naive readings of standards.** Accessibility guidelines exist to support real workflows and give flexible ways to meet them. Understand what a criterion genuinely requires in context before changing UI: for example, a button whose label or icon is legible and whose focus or selection ring already has clear contrast does **not** need its resting fill or border restyled to hit a 3:1 ratio, and inherently spatial or freehand tools should not have artificial keyboard grids bolted onto them.
|
||||
- **Preserve visual design and shared primitives.** Use shared theme tokens and shared widgets from `storytold/craft-libs` instead of inventing one-off styling, contrast overrides, focus shims, or live-region scaffolding inside an application.
|
||||
- **Be candid in pull requests.** Automated accessibility-tree checks never prove a change works with a real screen reader; describe only what was actually verified.
|
||||
|
||||
## Ownership
|
||||
|
||||
Maintained by the `craft-app-team` maintainers in [`storytold`](https://github.com/storytold). Shared updates belong in [`storytold/craft-contrib`](https://github.com/storytold/craft-contrib); repository-specific facts follow below.
|
||||
|
||||
## This application
|
||||
|
||||
**SoundCraft** (`storytold/soundcraft`) is an open-source digital audio workstation (DAW) written in pure Rust.
|
||||
|
||||
- **Published application builds:** macOS, Windows, Linux, FreeBSD, and Web (WebAssembly)
|
||||
- **Command-line and automation interface:** `soundcraft-cli` provides headless terminal and automation access for scripted workflows without the graphical interface
|
||||
- **Report an accessibility barrier:** [Open an issue in `storytold/soundcraft`](https://github.com/storytold/soundcraft/issues/new)
|
||||
- **Tracked accessibility issues:** [Open issues labelled `accessibility` in `storytold/soundcraft`](https://github.com/storytold/soundcraft/issues?q=is%3Aissue+state%3Aopen+label%3Aaccessibility)
|
||||
- **Pull requests awaiting assistive-technology verification:** [Pull requests labelled `needs screen reader test` in `storytold/soundcraft`](https://github.com/storytold/soundcraft/pulls?q=is%3Apr+label%3A%22needs+screen+reader+test%22)
|
||||
- **Contributor and agent rules for this repository:** [`AGENTS.md`](AGENTS.md)
|
||||
Generated
+50
-38
@@ -1201,37 +1201,54 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-aaf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-audio",
|
||||
"craft-cfb",
|
||||
"craft-timeline",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-audio"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c)",
|
||||
"craft-media",
|
||||
"craft-xml",
|
||||
"log",
|
||||
"serde",
|
||||
"symphonia",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-cfb"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
|
||||
[[package]]
|
||||
name = "craft-codepage"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
|
||||
[[package]]
|
||||
name = "craft-docpath"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
|
||||
[[package]]
|
||||
name = "craft-fonts-build"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
|
||||
[[package]]
|
||||
name = "craft-i18n"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"fixed_decimal",
|
||||
"icu_decimal",
|
||||
@@ -1254,7 +1271,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-jpeg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ddbe78231b5b23273b3d191f04b1a38f4c0445b3#ddbe78231b5b23273b3d191f04b1a38f4c0445b3"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
@@ -1262,7 +1279,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-mcp-server"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=08da5e1486ee640de1d2cccd8fe8dd32b1d3b62c#08da5e1486ee640de1d2cccd8fe8dd32b1d3b62c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
@@ -1270,21 +1287,16 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-media"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-media"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ddbe78231b5b23273b3d191f04b1a38f4c0445b3#ddbe78231b5b23273b3d191f04b1a38f4c0445b3"
|
||||
|
||||
[[package]]
|
||||
name = "craft-midi"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1293,7 +1305,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-mime"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"craft-codepage",
|
||||
@@ -1303,15 +1315,15 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-score"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=3a1a627dc69c677d3a26c22b72e070242ee6b841#3a1a627dc69c677d3a26c22b72e070242ee6b841"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=3a1a627dc69c677d3a26c22b72e070242ee6b841)",
|
||||
"craft-xml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-scraft-format"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-audio",
|
||||
"craft-midi",
|
||||
@@ -1325,16 +1337,24 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-time"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-timeline"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-fonts-build",
|
||||
"craft-i18n",
|
||||
@@ -1355,7 +1375,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-update"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"dunce",
|
||||
@@ -1382,10 +1402,10 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-video"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ddbe78231b5b23273b3d191f04b1a38f4c0445b3#ddbe78231b5b23273b3d191f04b1a38f4c0445b3"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"craft-jpeg",
|
||||
"craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ddbe78231b5b23273b3d191f04b1a38f4c0445b3)",
|
||||
"craft-media",
|
||||
"rav1e",
|
||||
"rayon",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1394,26 +1414,17 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-xml"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=3a1a627dc69c677d3a26c22b72e070242ee6b841#3a1a627dc69c677d3a26c22b72e070242ee6b841"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"quick-xml 0.41.0",
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-xml"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10#ea24422ae9859dc5da398d0462bc87f8e02e0d10"
|
||||
dependencies = [
|
||||
"quick-xml 0.41.0",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-zip"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c#45a8e16669e70dadb780dfbc759c882dd5b7ea1c"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=a3fca1707941bce4768586661ccbb94c44ee46eb#a3fca1707941bce4768586661ccbb94c44ee46eb"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"thiserror 2.0.21",
|
||||
@@ -3758,7 +3769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5019,7 +5030,7 @@ dependencies = [
|
||||
"craft-docpath",
|
||||
"craft-score",
|
||||
"craft-scraft-format",
|
||||
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ea24422ae9859dc5da398d0462bc87f8e02e0d10)",
|
||||
"craft-xml",
|
||||
"log",
|
||||
"proptest",
|
||||
"serde",
|
||||
@@ -5044,6 +5055,7 @@ name = "soundcraft-interchange"
|
||||
version = "0.20.1"
|
||||
dependencies = [
|
||||
"cfb",
|
||||
"craft-aaf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"soundcraft-model",
|
||||
@@ -5140,7 +5152,7 @@ dependencies = [
|
||||
name = "soundcraft-video"
|
||||
version = "0.20.1"
|
||||
dependencies = [
|
||||
"craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=45a8e16669e70dadb780dfbc759c882dd5b7ea1c)",
|
||||
"craft-media",
|
||||
"craft-video",
|
||||
"proptest",
|
||||
"serde",
|
||||
|
||||
+15
-13
@@ -11,9 +11,9 @@ rust-version = "1.95"
|
||||
repository = "https://github.com/storytold/soundcraft"
|
||||
|
||||
[workspace.dependencies]
|
||||
craft-score = { git = "https://github.com/storytold/craft-libs", rev = "3a1a627dc69c677d3a26c22b72e070242ee6b841" }
|
||||
craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10" }
|
||||
craft-mime = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10" }
|
||||
craft-score = { git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
craft-mime = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
# internal
|
||||
soundcraft-interchange = { path = "crates/interchange" }
|
||||
soundcraft-time = { path = "crates/time" }
|
||||
@@ -61,25 +61,27 @@ cpal = "0.18"
|
||||
midir = "=0.11.1"
|
||||
|
||||
# Which file paths stored in a session may be opened.
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10" }
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
|
||||
# Video containers and bitstreams, shared with the other craft apps.
|
||||
craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "45a8e16669e70dadb780dfbc759c882dd5b7ea1c" }
|
||||
craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
# H.264 and ProRes codecs shared with the other Craft apps.
|
||||
craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ddbe78231b5b23273b3d191f04b1a38f4c0445b3", default-features = false, features = ["h264-decode", "prores", "mjpeg"] }
|
||||
craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb", default-features = false, features = ["h264-decode", "prores", "mjpeg"] }
|
||||
# Audio file formats, codecs and waveform overviews, shared with the other craft apps. It shares
|
||||
# types with craft-media, so both stay on one rev.
|
||||
# Standard MIDI Files and the note/controller model, shared with the other craft apps.
|
||||
craft-midi = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "45a8e16669e70dadb780dfbc759c882dd5b7ea1c", features = ["serde"] }
|
||||
craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "45a8e16669e70dadb780dfbc759c882dd5b7ea1c", features = ["decode", "lossless-encode", "peaks", "serde"] }
|
||||
craft-time = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "45a8e16669e70dadb780dfbc759c882dd5b7ea1c" }
|
||||
craft-scraft-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "45a8e16669e70dadb780dfbc759c882dd5b7ea1c" }
|
||||
craft-midi = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb", features = ["serde"] }
|
||||
craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb", features = ["decode", "lossless-encode", "peaks", "serde"] }
|
||||
craft-time = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
# AAF property-stream framing, shared with the other craft apps.
|
||||
craft-aaf = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
craft-scraft-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
# craft-update: app-specific pretend versions apply to startup and manual checks.
|
||||
craft-update = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10", features = ["egui"] }
|
||||
craft-mcp-server = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "08da5e1486ee640de1d2cccd8fe8dd32b1d3b62c" }
|
||||
craft-update = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb", features = ["egui"] }
|
||||
craft-mcp-server = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb" }
|
||||
|
||||
# ui
|
||||
craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ea24422ae9859dc5da398d0462bc87f8e02e0d10", features = ["serde"] }
|
||||
craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a3fca1707941bce4768586661ccbb94c44ee46eb", features = ["serde"] }
|
||||
egui = { version = "0.37" }
|
||||
# Resizable table columns (About ▸ Contributors / Models); no image loaders.
|
||||
egui_extras = { version = "0.37", default-features = false }
|
||||
|
||||
@@ -613,7 +613,11 @@ mod tests {
|
||||
});
|
||||
let (stream, _) = remote.connection().unwrap();
|
||||
writeln!(stream, "bytes the app never reads").unwrap();
|
||||
// Wait until the reset has arrived (the read stops timing out).
|
||||
// Wait until the reset has arrived (the read stops timing out) and a write on
|
||||
// this socket fails, so the call below cannot be counted as already sent on it.
|
||||
// On some stacks (FreeBSD among them) a read can see the close while a later
|
||||
// write still succeeds, which made the client report the mutation unconfirmed
|
||||
// without opening the second connection the test is checking.
|
||||
let mut byte = [0u8; 1];
|
||||
for _ in 0..20 {
|
||||
match stream.read(&mut byte) {
|
||||
@@ -621,6 +625,12 @@ mod tests {
|
||||
_ => break,
|
||||
}
|
||||
}
|
||||
for _ in 0..20 {
|
||||
if writeln!(stream, "probe").is_err() {
|
||||
break;
|
||||
}
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
}
|
||||
let error = remote.call("engine.execute", json!({"command": "track.new"})).unwrap_err();
|
||||
assert_eq!(seen.load(Ordering::SeqCst), 1, "the call went out once, on the second connection: {error}");
|
||||
assert!(error.contains("may or may not have been executed"), "{error}");
|
||||
|
||||
@@ -1209,9 +1209,9 @@ mod tests {
|
||||
let (mut e, t, at) = keys();
|
||||
let s = e.session_mut();
|
||||
let cc = soundcraft_midi::CtrlEvent { tick: 0, channel: 0, kind: soundcraft_midi::CtrlKind::Cc(1), value: 64 };
|
||||
let a = soundcraft_midi::Sequence { notes: vec![note(0, 1, 60), note(3, 2, 62), note(5, 1, 63)], ctrls: vec![] };
|
||||
let b = soundcraft_midi::Sequence { notes: vec![note(0, 1, 64)], ctrls: vec![] };
|
||||
let c = soundcraft_midi::Sequence { notes: vec![note(1, 1, 65)], ctrls: vec![cc] };
|
||||
let a = soundcraft_midi::Sequence { notes: vec![note(0, 1, 60), note(3, 2, 62), note(5, 1, 63)], ctrls: vec![], sysex: vec![] };
|
||||
let b = soundcraft_midi::Sequence { notes: vec![note(0, 1, 64)], ctrls: vec![], sysex: vec![] };
|
||||
let c = soundcraft_midi::Sequence { notes: vec![note(1, 1, 65)], ctrls: vec![cc], sysex: vec![] };
|
||||
for (start, end, seq, muted) in [(0, 4, a, false), (6, 8, b, true), (8, 12, c, false)] {
|
||||
let id = s.new_clip_id();
|
||||
let mut clip = Clip::midi(id, "Keys", at(start), at(end) - at(start), seq);
|
||||
|
||||
@@ -349,7 +349,10 @@ fn select_split(e: &mut Engine, p: &Value) -> Result<Value> {
|
||||
};
|
||||
let mut nc = c.clone();
|
||||
nc.id = s.new_clip_id();
|
||||
nc.content = ClipContent::Midi { sequence: soundcraft_midi::Sequence { notes: hit, ctrls: Vec::new() } };
|
||||
// Note-split has always copied only the matching notes, not controllers. SysEx is the same
|
||||
// default now that Sequence has that field: packets stay on the source clip. Full SysEx
|
||||
// split/trim/heal is storytold/soundcraft#1618.
|
||||
nc.content = ClipContent::Midi { sequence: soundcraft_midi::Sequence { notes: hit, ctrls: Vec::new(), sysex: Vec::new() } };
|
||||
crate::edit::place_clip(s, nt, nc);
|
||||
}
|
||||
Ok(json!({"matched": matched, "split": split, "tracks": new_tracks.values().collect::<Vec<_>>()}))
|
||||
@@ -961,6 +964,44 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// Note-split copies only the notes in the pitch range. SysEx already on the clip stays there;
|
||||
/// the new clip's sysex list is empty (storytold/soundcraft#1618 owns split/trim of packets).
|
||||
#[test]
|
||||
fn note_split_leaves_sysex_on_the_source_clip() {
|
||||
let (mut e, t) = midi_engine();
|
||||
let r = e
|
||||
.execute(
|
||||
"event.retrospective_record",
|
||||
&json!({"track": t.0, "notes": [{"pitch": 36, "start_ticks": 0}, {"pitch": 72, "start_ticks": 0}]}),
|
||||
)
|
||||
.unwrap();
|
||||
let cid = r["clip"].as_u64().unwrap();
|
||||
let packet = soundcraft_midi::SysExEvent { tick: 0, status: 0xF0, data: vec![0x43, 0x10, 0x4C, 0x00, 0x00, 0x7E, 0x00, 0xF7] };
|
||||
if let Some(c) = e.session_mut().find_clip_mut(ClipId(cid))
|
||||
&& let ClipContent::Midi { sequence } = &mut c.content
|
||||
{
|
||||
sequence.sysex.push(packet.clone());
|
||||
}
|
||||
e.execute("edit.select", &json!({"clips": [cid]})).unwrap();
|
||||
e.execute("event.select_split_notes", &json!({"pitch_from": 60, "pitch_to": 127, "action": "split"})).unwrap();
|
||||
let source = e.session().find_clip(ClipId(cid)).map(|(_, c)| c.clone()).unwrap();
|
||||
match &source.content {
|
||||
ClipContent::Midi { sequence } => {
|
||||
assert_eq!(sequence.notes.iter().map(|n| n.pitch).collect::<Vec<_>>(), vec![36]);
|
||||
assert_eq!(sequence.sysex, vec![packet]);
|
||||
}
|
||||
_ => panic!(),
|
||||
}
|
||||
let nt = e.session().tracks.iter().find(|x| x.id != t).unwrap();
|
||||
match &nt.clips()[0].content {
|
||||
ClipContent::Midi { sequence } => {
|
||||
assert_eq!(sequence.notes[0].pitch, 72);
|
||||
assert!(sequence.sysex.is_empty());
|
||||
}
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn chords_from_demo_become_markers() {
|
||||
let mut e = crate::demo::demo_engine();
|
||||
|
||||
@@ -35,11 +35,13 @@ fn document_values<'a>(s: &'a Session, navigation: &'a EditState) -> impl Partia
|
||||
midi_originals,
|
||||
pool,
|
||||
folder,
|
||||
room_tone,
|
||||
} = s;
|
||||
// Tuples implement PartialEq up to twelve elements. These contain only borrowed fields.
|
||||
(
|
||||
(format_version, name, sample_rate, bit_depth, frame_rate, timecode_start, tempo, key_signatures, sources, videos, busses),
|
||||
(outputs, markers, groups, auto_names, edit_values(edit, navigation), next_id, comments, midi_originals, pool, folder),
|
||||
room_tone,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -329,6 +329,31 @@ impl Cfb {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether the preview found the dialogue file in the media folder, relinked from `locator`.
|
||||
fn found_in_media_folder(f: &AafFolder, preview: &Value) {
|
||||
let plan = &preview["plan"];
|
||||
let warnings: Vec<_> = plan["warnings"].as_array().unwrap().iter().filter_map(|w| w.as_str()).collect();
|
||||
assert!(!warnings.iter().any(|w| w.starts_with("Missing media")), "{warnings:?}");
|
||||
assert_eq!(plan["sources"].as_array().unwrap().len(), 2, "{warnings:?}");
|
||||
let found = std::fs::canonicalize(&f.dir).unwrap().join("Diálogo á #1.wav");
|
||||
assert_eq!(plan["sources"][0]["path"], json!(found.display().to_string()));
|
||||
assert!(warnings.iter().any(|w| w.starts_with("Relinked ")), "{warnings:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_locator_from_a_mac_finds_its_file_in_the_chosen_media_folder() {
|
||||
let f = AafFolder::new();
|
||||
let preview = with_locator(&f, "file:///Users/Diálogo á %231.wav").unwrap();
|
||||
found_in_media_folder(&f, &preview);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_locator_from_windows_finds_its_file_in_the_chosen_media_folder() {
|
||||
let f = AafFolder::new();
|
||||
let preview = with_locator(&f, "file:///C:/me/Diálogo á %231.wav").unwrap();
|
||||
found_in_media_folder(&f, &preview);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn looped_sector_chains_fail_instead_of_hanging() {
|
||||
let fixture = std::fs::read(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures/synthetic-two-tracks.aaf")).unwrap();
|
||||
|
||||
@@ -14,6 +14,7 @@ serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
cfb.workspace = true
|
||||
craft-aaf.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
//! locator resolves under the AAF's folder (see `locator_path`). A file that cannot be found
|
||||
//! is reported and its edits skipped; it does not abort the import.
|
||||
use crate::{ImportClip, ImportError, ImportTrack, Media, Plan, Rational, TimecodeRate};
|
||||
use craft_aaf::aaf::properties::{Properties, Property, PropertyError};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
io::{Read, Seek, SeekFrom},
|
||||
@@ -286,6 +287,14 @@ fn read_u32(d: &[u8], at: usize) -> Result<u32> {
|
||||
d.get(at..at + 4).and_then(|b| b.try_into().ok()).map(u32::from_le_bytes).ok_or_else(|| fail("truncated AAF structure"))
|
||||
}
|
||||
|
||||
fn property_error(path: &str, e: PropertyError) -> ImportError {
|
||||
match e {
|
||||
PropertyError::UnsupportedByteOrder => fail("unsupported AAF byte order"),
|
||||
PropertyError::ShortHeader | PropertyError::TruncatedIndex => fail("truncated AAF structure"),
|
||||
PropertyError::TruncatedValue => fail(format!("{path}: truncated properties")),
|
||||
}
|
||||
}
|
||||
|
||||
fn property_total(current: usize, additional: usize) -> Result<usize> {
|
||||
current.checked_add(additional).filter(|total| *total <= MAX_PROPERTY_BYTES).ok_or_else(|| fail("AAF retained property data exceeds 128 MiB"))
|
||||
}
|
||||
@@ -387,27 +396,20 @@ impl<F: Read + Seek> Store<F> {
|
||||
if d.first() != Some(&0x4c) {
|
||||
return Err(fail("unsupported AAF byte order"));
|
||||
}
|
||||
let count = usize::from(read_u16(&d, 2)?);
|
||||
let headers_end = 4 + 6 * count;
|
||||
let mut at = headers_end;
|
||||
// Shared wire framing (craft-libs#3068); duplicates, budgets and messages stay ours.
|
||||
let records = Properties::new(&d).map_err(|e| property_error(path, e))?;
|
||||
// Validate and charge the complete object before copying any property values.
|
||||
for i in 0..count {
|
||||
let size = usize::from(read_u16(&d, 8 + 6 * i)?);
|
||||
at = at.checked_add(size).filter(|end| *end <= d.len()).ok_or_else(|| fail(format!("{path}: truncated properties")))?;
|
||||
for record in records.clone() {
|
||||
record.map_err(|e| property_error(path, e))?;
|
||||
}
|
||||
let additional =
|
||||
d.len().checked_add(path.len()).and_then(|n| n.checked_add(class.len())).ok_or_else(|| fail("AAF property size overflow"))?;
|
||||
self.charge_properties(additional)?;
|
||||
|
||||
let mut props = HashMap::new();
|
||||
at = headers_end;
|
||||
for i in 0..count {
|
||||
let pid = read_u16(&d, 4 + 6 * i)?;
|
||||
let form = read_u16(&d, 6 + 6 * i)?;
|
||||
let size = usize::from(read_u16(&d, 8 + 6 * i)?);
|
||||
let value = d.get(at..at + size).ok_or_else(|| fail(format!("{path}: truncated properties")))?.to_vec();
|
||||
at += size;
|
||||
props.insert(pid, (form, value));
|
||||
for record in records {
|
||||
let Property { id, form, payload } = record.map_err(|e| property_error(path, e))?;
|
||||
props.insert(id, (form, payload.to_vec()));
|
||||
}
|
||||
let object = Obj { path: path.to_string(), class, props: Rc::new(props) };
|
||||
self.objects.insert(path.to_string(), object.clone());
|
||||
@@ -566,7 +568,10 @@ fn locator_path(url: &str, base: &Path) -> Result<PathBuf> {
|
||||
if !matches!(p.components().next_back(), Some(Component::Normal(_))) {
|
||||
return Err(fail(format!("Locator does not name a file: {url}")));
|
||||
}
|
||||
if p.is_absolute() {
|
||||
// A rooted locator is a full path on the exporting machine. On Windows `/Users/me/a.wav` and
|
||||
// `/C:/me/a.wav` have a root but no drive prefix, so `is_absolute` is false there; they are still
|
||||
// full paths and must not be read as relative ones. On Unix `has_root` equals `is_absolute`.
|
||||
if p.has_root() {
|
||||
return Ok(p);
|
||||
}
|
||||
// A relative locator may only hold plain names (no drive prefix or root on Windows).
|
||||
@@ -1005,6 +1010,17 @@ mod tests {
|
||||
assert!(locator_path("file:///x.wav#y", base).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_rooted_locator_from_another_machine_keeps_its_path() {
|
||||
// Exporters write the path on their own machine: a Mac volume, or a Windows drive after the
|
||||
// `file:///` root. On Windows neither has a drive prefix of the local kind, yet both name a file
|
||||
// by its full path, so they are taken as given and never joined to the AAF folder.
|
||||
let base = Path::new("/base");
|
||||
assert_eq!(locator_path("file:///Users/me/a.wav", base).unwrap(), PathBuf::from("/Users/me/a.wav"));
|
||||
assert_eq!(locator_path("file:///C:/Users/me/a.wav", base).unwrap(), PathBuf::from("/C:/Users/me/a.wav"));
|
||||
assert_eq!(locator_path("/Volumes/Media/a.wav", base).unwrap(), PathBuf::from("/Volumes/Media/a.wav"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn locators_never_walk_out_of_the_aaf_folder() {
|
||||
let base = Path::new("/base");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! SoundCraft MIDI.
|
||||
//!
|
||||
//! - [`Note`], [`CtrlEvent`] and [`Sequence`]: the MIDI content of a region / track, in ticks at
|
||||
//! - [`Note`], [`CtrlEvent`], [`SysExEvent`] and [`Sequence`]: the MIDI content of a region / track, in ticks at
|
||||
//! [`PPQ`] (960) ticks per quarter note; [`read_smf`] / [`write_smf`]: Standard MIDI File import
|
||||
//! and export, and [`read_smf_lenient`] for files that are slightly damaged. These come from
|
||||
//! `craft-midi` in craft-libs, shared with the other Craft apps, and are re-exported so the rest
|
||||
@@ -14,7 +14,8 @@ pub mod ops;
|
||||
mod rng;
|
||||
|
||||
pub use craft_midi::{
|
||||
CtrlEvent, CtrlKind, LenientRead, MAX_EVENTS, MAX_TRACKS, MidiError, Note, PPQ, Sequence, Smf, SmfTrack, read_smf, read_smf_lenient, write_smf,
|
||||
CtrlEvent, CtrlKind, LenientRead, MAX_EVENTS, MAX_TRACKS, MidiError, Note, PPQ, Sequence, Smf, SmfTrack, SysExEvent, read_smf, read_smf_lenient,
|
||||
write_smf,
|
||||
};
|
||||
pub use names::{gm_drum_name, gm_program_name, note_name};
|
||||
pub use rng::XorShift;
|
||||
|
||||
Reference in New Issue
Block a user