Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: A3U028PMFM
62 changes: 45 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: build

# Push and pull_request start runs on the PUBLIC repo, where Actions minutes are
# free. The private dev repo pays for every minute, so there EVERY job is gated
# on the event being a manual dispatch: a push or a PR there creates a run whose
# jobs are all skipped, which bills nothing. Keep the `if:` on every job you add
# (CiWorkflowLintTests fails a job without it).
on:
push:
branches: [main]
Expand All @@ -16,8 +21,10 @@ on:
permissions:
contents: read

# The event is part of the group: on the private repo a push creates a run of
# skipped jobs, and it must never cancel a manual run of the same ref.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

env:
Expand All @@ -28,6 +35,7 @@ env:
jobs:
windows:
name: windows / native + managed
if: github.event_name == 'workflow_dispatch' || !github.event.repository.private
# PINNED, not `windows-latest`. The floating label moves to the next image
# on GitHub's schedule and takes the Visual Studio, CMake and Windows SDK
# versions with it — a native build that starts failing on a morning nobody
Expand All @@ -37,8 +45,9 @@ jobs:
timeout-minutes: 90

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
submodules: recursive

# global-json-file, NOT dotnet-version: "10.x". The floating spec installs
Expand All @@ -47,7 +56,7 @@ jobs:
# different analyzer rule sets. global.json pins 10.0.400 with
# rollForward: latestFeature, which is the one place the toolchain is
# declared.
- uses: actions/setup-dotnet@v6
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
with:
global-json-file: global.json

Expand All @@ -59,13 +68,13 @@ jobs:
id: tags
shell: bash
run: |
tags=$(grep -E '^set\((JUCE_TAG|RUBBERBAND_TAG|NEURALAUDIO_TAG|DEMUCS_CPP_TAG) ' \
tags=$(grep -E '^set\((JUCE|RUBBERBAND|NEURALAUDIO)_(TAG|COMMIT) |^set\(DEMUCS_CPP_TAG ' \
src/JuceSharp.Native/CMakeLists.txt | tr -d ' ')
echo "$tags"
echo "hash=$(printf '%s' "$tags" | sha256sum | cut -c1-32)" >> "$GITHUB_OUTPUT"

- name: Cache FetchContent sources
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: src/JuceSharp.Native/build/_deps
key: deps-windows-${{ steps.tags.outputs.hash }}
Expand All @@ -91,6 +100,14 @@ jobs:
- name: Build managed
run: dotnet build JuceSharp.sln -c Release

# A hosted runner has NO audio endpoint, and most engine tests open the
# DEFAULT device (`new JuceAudioEngine()` -> WASAPI default output); without
# one engine_create fails with Device in ~860 cases. This installs the
# VB-CABLE virtual device (LABSN/sound-ci-helpers, pinned to v1.0.4's SHA)
# so those tests run against a real WASAPI endpoint.
- name: Virtual audio device
uses: LABSN/sound-ci-helpers@d08c889a7bba7d9b1b059f8f76dac4672ea3a9cf # v1.0.4

# The null device gives the engine tests a deterministic callback on a
# runner with no sound card.
#
Expand Down Expand Up @@ -119,7 +136,7 @@ jobs:
run: dotnet pack JuceSharp.sln -c Release -o artifacts

- name: Upload packages
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: nupkg
path: |
Expand All @@ -128,36 +145,47 @@ jobs:
if-no-files-found: error

- name: Upload native binaries
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: native-win-x64
path: src/JuceSharp/runtimes/win-x64/native/
if-no-files-found: error

# A MEASUREMENT, not a gate. Nothing here has ever been built for Linux and
# the ASIO/VST3 host paths are Windows-only, so this is expected to fail —
# it exists so the distance to a Linux build is visible and shrinking rather
# than unknown. Flip continue-on-error off the day it goes green.
linux-distance:
name: linux / native only (informational)
# The Linux build of the engine library alone (juce_sharp). It went green
# once the JUCE Linux dependencies below were complete (fontconfig, XInput2),
# so it is a gate now: a change that breaks the Linux compile fails the run.
# Only the library is built; the VST host (Win32 kernel objects), ctest and
# the managed suite stay Windows-only (the windows job above).
linux:
name: linux / native library
if: github.event_name == 'workflow_dispatch' || !github.event.repository.private
# Pinned for the same reason as the windows job above.
runs-on: ubuntu-24.04
continue-on-error: true
timeout-minutes: 90

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
submodules: recursive

# fontconfig: JUCE looks for 'freetype2;fontconfig' as ONE pkg-config
# set, so without libfontconfig1-dev it drops freetype too and juceaide
# (built at configure time) fails on <ft2build.h>. libxi-dev: JUCE's
# gui_basics includes <X11/extensions/XInput2.h> unconditionally on Linux.
- name: Install JUCE Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libasound2-dev \
libjack-jackd2-dev \
libfreetype6-dev \
libfontconfig1-dev \
libx11-dev \
libxext-dev \
libxi-dev \
libxcomposite-dev \
libxrender-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
Expand All @@ -167,12 +195,12 @@ jobs:
- name: Resolve dependency tags
id: tags
run: |
tags=$(grep -E '^set\((JUCE_TAG|RUBBERBAND_TAG|NEURALAUDIO_TAG|DEMUCS_CPP_TAG) ' \
tags=$(grep -E '^set\((JUCE|RUBBERBAND|NEURALAUDIO)_(TAG|COMMIT) |^set\(DEMUCS_CPP_TAG ' \
src/JuceSharp.Native/CMakeLists.txt | tr -d ' ')
echo "hash=$(printf '%s' "$tags" | sha256sum | cut -c1-32)" >> "$GITHUB_OUTPUT"

- name: Cache FetchContent sources
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: src/JuceSharp.Native/build/_deps
key: deps-linux-${{ steps.tags.outputs.hash }}
Expand Down
23 changes: 22 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ purpose — an import would re-load the bytes and defeat the point.
lowpass. Shares `src/wem/WemVorbisCommon.h` with the decoder. `AbiV44Tests`,
`Wem/WemEncoderTests`. → `docs/agents/wem-encoder.md`

- **ABI v48: the note upload names its byte length, and untrusted inputs are
capped:** `dca_engine_chart_source_set_notes_for_player2` checks count x stride
against the buffer; a `.wem` is capped at 256 MiB and is NEVER streamed (a
WEM that does not fit the preload budget is refused); `namamp` dry-bypasses a
capture rate outside [8, 384] kHz instead of terminating on its load thread;
`dca_plugin_save_state` refuses a state over INT32_MAX. `AbiV48Tests`,
`RtWemSourceIsPreloadedNeverStreamed`. → `native-engine-abi.md`

- **ABI v42 decodes Wwise-Vorbis `.wem` NATIVELY (#426):** seven additive
`dca_wem_*` exports, and every engine format manager opens a `.wem` as a source
(decoded on the load thread, 16-bit preload). The decoder (`src/wem/`) is a
Expand Down Expand Up @@ -908,7 +916,20 @@ purpose — an import would re-load the bytes and defeat the point.
`Directory.Build.targets` packs the LICENSE. `global.json` pins the SDK with
`rollForward`, and `.github/workflows/build.yml` installs THAT one
(`global-json-file:`), runs on pinned runner images, and scopes the default
token with a top-level `permissions: contents: read`. `CiWorkflowLintTests`
token with a top-level `permissions: contents: read`. It runs on push and
pull_request only on the PUBLIC repo: every job carries
`if: github.event_name == 'workflow_dispatch' || !github.event.repository.private`,
so on the private dev repo those events give a run of skipped jobs (0 paid
minutes) and only the "Run workflow" button runs it. A hosted runner has no
audio endpoint, so the windows job installs the VB-CABLE virtual device
before the managed tests (the default-device engine tests need one), and the
test project sets `DeterministicSourcePaths=false` so the `[CallerFilePath]`
source lints still find the repo under `ContinuousIntegrationBuild`.
Every action is pinned by full commit SHA, every checkout sets
`persist-credentials: false`, the concurrency group includes the event, and
JUCE / Rubber Band / NeuralAudio are fetched by commit (`*_COMMIT`, the
commit their `*_TAG` named).
`CiWorkflowLintTests`
parses the YAML — never grep CI YAML, a substring matches the comment that
explains why a block is absent.
- **A shipped package is UNSIGNED, so an `InternalsVisibleTo` naming an assembly
Expand Down
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ python tools/check-doc-links.py

CI is [`.github/workflows/build.yml`](.github/workflows/build.yml): it runs the
native build, `ctest`, the managed suite (with `DCA_ENABLE_NULL_DEVICE=1` and
`JUCESHARP_REQUIRE_NATIVE=1`), the doc-link check and `dotnet pack`. It is not a
substitute for running the gates locally — the RT gate and the device-dependent
tests behave differently on a runner with no sound card.
`JUCESHARP_REQUIRE_NATIVE=1`), the doc-link check and `dotnet pack`. It runs on
every push to `main` and every pull request here; the private development
repository runs the same workflow only by hand (every job is gated on that). It
is not a substitute for running the gates locally — the RT gate and the
device-dependent tests behave differently on a runner with no sound card.

## The rules that bite hardest

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
this bump red and taught the reader to revert it).
-->
<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# JuceSharp

📖 **Docs:** the GitBook/HonKit source lives under [`docs/`](./docs/) — start at
[`docs/README.md`](./docs/README.md) and [`docs/SUMMARY.md`](./docs/SUMMARY.md).
No site is published today; render locally with HonKit if you want the browsable
version (`cd docs && npm install && npx honkit serve`).
📖 **Docs:** plain Markdown under [`docs/`](./docs/), readable right here on
GitHub — start at [`docs/README.md`](./docs/README.md); the table of contents is
[`docs/SUMMARY.md`](./docs/SUMMARY.md).

A reusable .NET wrapper around a JUCE-based native audio engine
(`juce_sharp.dll`). Extracted from the
Expand Down Expand Up @@ -36,7 +35,7 @@ A reusable .NET wrapper around a JUCE-based native audio engine
```
JuceSharp/
├── JuceSharp.sln standalone solution
├── docs/ GitBook/HonKit documentation source
├── docs/ documentation (Markdown)
├── examples/ six runnable sample projects
├── src/
│ ├── JuceSharp/ managed C# wrapper (PackageId: JuceSharp)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and will refuse a mismatched `juce_sharp.dll`.

| Version | Supported |
|---|---|
| `main` (currently 1.0.0, ABI v47) | ✅ |
| `main` (currently 1.1.0, ABI v48) | ✅ |
| Anything older | ❌ — upgrade |

## Reporting a vulnerability
Expand Down
22 changes: 14 additions & 8 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ their source is committed to this repository.

### JUCE

- Version: **9.0.3** (`JUCE_TAG`), <https://github.com/juce-framework/JUCE>
- Version: **9.0.3** (`JUCE_TAG`), fetched as commit be29c81492b6151c8ea8d14c840e1311963b3a83 (`JUCE_COMMIT`), <https://github.com/juce-framework/JUCE>
- Copyright (c) Raw Material Software Limited
- Linked into: `juce_sharp.dll` and `juce_vst_host.exe`
- Licence: **AGPLv3 or the commercial JUCE 9 licence.** JUCE 9.0.3's
Expand All @@ -45,7 +45,7 @@ their source is committed to this repository.

### Rubber Band Library

- Version: **v4.0.0** (`RUBBERBAND_TAG`), <https://github.com/breakfastquay/rubberband>,
- Version: **v4.0.0** (`RUBBERBAND_TAG`), fetched as commit 1d95888bec3ae0a17c0c4af791810d5a63f6bc35 (`RUBBERBAND_COMMIT`), <https://github.com/breakfastquay/rubberband>,
statically linked through upstream's single-file build
(`single/RubberBandSingle.cpp`)
- Copyright 2007-2024 Particular Programs Ltd.
Expand Down Expand Up @@ -102,7 +102,7 @@ the `namamp` module.

| Component | Version | Copyright | Licence |
|---|---|---|---|
| **NeuralAudio**, <https://github.com/mikeoliphant/NeuralAudio> | **v0.1.3** (`NEURALAUDIO_TAG`) | Copyright (c) 2024 Mike Oliphant | MIT |
| **NeuralAudio**, <https://github.com/mikeoliphant/NeuralAudio> | **v0.1.3** (`NEURALAUDIO_TAG`), commit b1137e1db2d43670e7dcf6345ade7808613cac20 (`NEURALAUDIO_COMMIT`) | Copyright (c) 2024 Mike Oliphant | MIT |
| NeuralAmpModelerCore (NAM Core), submodule of NeuralAudio | as pinned by NeuralAudio v0.1.3 | Copyright (c) 2023 Steven Atkinson | MIT |
| RTNeural, submodule of NeuralAudio | as pinned by NeuralAudio v0.1.3 | Copyright (c) 2020, jatinchowdhury18 | BSD-3-Clause |
| math_approx, submodule of NeuralAudio | as pinned by NeuralAudio v0.1.3 | Copyright (c) 2024, jatinchowdhury18 | BSD-3-Clause |
Expand Down Expand Up @@ -196,22 +196,28 @@ carries `juce_sharp.dll`, so a built example is under the terms in § 1.

### By `JuceSharp.StemSeparation` (the Python sidecar)

Fetched into a per-user cache on first use:
Fetched into a per-user cache on first use, every file pinned by SHA-256
(`PythonEnvManager.DefaultPythonEmbedSha256`, `DefaultPipWheelSha256`, and the
hash-locked package set `requirements-win_amd64-cp311.lock`, which also lists
each package's own dependencies):

- **CPython 3.11.9 embeddable distribution** — Python Software Foundation
License, from python.org.
- **pip** — MIT, the wheel from PyPI.
- **torch / torchaudio** — BSD-3-Clause.
- **demucs** — MIT.
- **bs_roformer** — see the project's own terms.
- **librosa** — ISC.
- **soundfile** — BSD-3-Clause, wrapping **libsndfile** (**LGPL-2.1**).
- **numpy** (BSD-3-Clause), **pyyaml** (MIT), **onnx** (Apache-2.0).
- **numpy** (BSD-3-Clause), **pyyaml** (MIT), **onnx** (Apache-2.0),
**safetensors** (Apache-2.0).

### Model weights

Downloaded by demucs / Hugging Face into their own caches:

- **htdemucs** checkpoints — Meta, MIT.
- **Demucs bags** (`htdemucs`, `htdemucs_ft`, `htdemucs_6s`, `hdemucs_mmi`,
`mdx`, `mdx_extra`) — Meta, MIT; the safetensors exports in the Hugging Face
repositories `adefossez/*`, fetched by `StemSeparator` at a pinned revision
with a pinned SHA-256 per file (`DemucsWeightPins`).
- **htdemucs ggml conversions** fetched by `DemucsGgmlModelCatalog` for the
native `demucs.cpp` backend — a third-party re-host of the Meta MIT weights
(Hugging Face dataset `Retrobear/demucs.cpp`); each catalogue row carries a
Expand Down
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ the library's.
```
JuceSharp/
├── JuceSharp.sln standalone solution
├── docs/ ← you are here (GitBook/HonKit source)
├── docs/ ← you are here (Markdown docs)
├── examples/ six runnable sample projects
├── src/
│ ├── JuceSharp/ managed wrapper (PackageId: JuceSharp)
Expand Down
Loading
Loading