Skip to content
Open
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
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Continuous integration for the Rust crate, the Wasm bindings and the
# npm package.
#
# First, build-wasm checks the Rust lints, the docs, the crate archive and the
# Wasm target on Linux, then uploads pkg/. In parallel, msrv checks
# rust-version from Cargo.toml. Next, check-os builds the native library,
# compiles TypeScript and checks the npm archives on Linux, macOS and Windows.
# Last, verify reports one status check for branch protection.
# First, build-wasm checks the lints, Biome, the docs, the crate archive, the
# Wasm target and TypeScript on Linux, then uploads pkg/. In parallel, msrv
# checks rust-version from Cargo.toml. Next, check-os builds the native
# library, compiles TypeScript and checks the npm archives on Linux, macOS and
# Windows. Last, verify reports one status check for branch protection.
name: CI

on:
Expand Down Expand Up @@ -34,15 +34,18 @@ jobs:
- uses: ./.github/actions/setup-wasm
with:
components: rustfmt, clippy
node-cache: ""
- run: cargo fmt --check
- run: cargo clippy --locked --lib -- -D warnings
- run: cargo doc --locked --no-deps
env:
RUSTDOCFLAGS: "-D warnings"
- run: cargo package --locked
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm run check:wasm
- run: npm run build:wasm
- run: npm run typecheck
# Upload the built pkg/ files for the cross-OS matrix.
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
Expand Down
23 changes: 18 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,28 @@ Remove-Item Env:RUSTDOCFLAGS

In `cmd.exe` on Windows, use `set "RUSTDOCFLAGS=-D warnings"` before the doc commands and `set "RUSTDOCFLAGS="` after them.

If you change TypeScript, JSON, YAML or Markdown files, also check the
lints and the format:

```sh
npm ci
npm run lint
npm run format:check
```

If you change the Wasm or TypeScript code, also run these commands.
`npm run check:wasm` runs Clippy and rustdoc in release mode for
`wasm32-unknown-unknown`. `npm run build` compiles `src/wasm.rs` and
`src/index.ts`. `npm run verify:pack` runs `npm run build` one time and
checks the `tunelet` and `@bytelandtechnology/tunelet` archives:
checks the `tunelet` and `@bytelandtechnology/tunelet` archives. Run
`npm run build:wasm` before `npm run typecheck` so `pkg/tunelet.d.ts`
exists:

```sh
npm ci
npm run check:wasm
npm run build:wasm
npm run typecheck
npm run verify:pack
```

Expand All @@ -133,10 +146,10 @@ npm run verify:pack
`npm run build:ts` before `npm run verify:pack -- --ignore-scripts`.

- `.github/workflows/ci.yml` runs on each pull request and each push to `main`.
`build-wasm` checks the format, Clippy, rustdoc, the crate archive and
`check:wasm` on `ubuntu-latest`, then builds and uploads `pkg/`. `check-os`
runs on `ubuntu-latest`, `macos-latest` and `windows-latest` with isolated
failures (`fail-fast: false`). Each runner builds `libtunelet.so`,
`build-wasm` checks the format, Clippy, rustdoc, the crate archive, Biome,
`check:wasm` and `typecheck` on `ubuntu-latest`, then uploads `pkg/`.
`check-os` runs on `ubuntu-latest`, `macos-latest` and `windows-latest` with
isolated failures (`fail-fast: false`). Each runner builds `libtunelet.so`,
`libtunelet.dylib` or `tunelet.dll`, compiles TypeScript and runs
`npm run verify:pack -- --ignore-scripts`. `msrv` checks `rust-version` from
`Cargo.toml` on `ubuntu-latest`. `verify` reports the combined status for
Expand Down
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,37 +289,37 @@ processor.process(&input, &mut output, &events)?;
`ControlEvent::Parameter` accepts these `ParameterControl` variants. All ranges
are inclusive, and `f32` values must be finite.

| Variant | TypeScript `type` | Configuration field | Range |
| ----------------------------- | ------------------------------- | --------------------------------------- | ----------------- |
| `PunchGainDb` | `"punchGainDb"` | `punch.gain_db` | `-96..=12` dB |
| `PunchImpact` | `"punchImpact"` | `punch.impact` | `0..=1` |
| `PunchCeilingDb` | `"punchCeilingDb"` | `punch.ceiling_db` | `-96..=0` dBFS |
| `PunchAttackMs` | `"punchAttackMs"` | `punch.attack_ms` | `0.01..=5000` ms |
| `WarmDriveDb` | `"warmDriveDb"` | `warm.drive_db` | `0..=6` dB |
| `PitchThreshold` | `"pitchThreshold"` | `resynthesis.pitch.threshold` | `0.002..=0.2` |
| `RetuneMs` | `"retuneMs"` | `resynthesis.correction.retune_ms` | `0..=400` ms |
| `Humanize` | `"humanize"` | `resynthesis.correction.humanize` | `0..=1` |
| `FlexTune` | `"flexTune"` | `resynthesis.correction.flex_tune` | `0..=1` |
| `PitchRatio` | `"pitchRatio"` | `resynthesis.pitch_ratio` | `0.25..=4` |
| `FormantWidth` | `"formantWidth"` | `resynthesis.formant.width` | `0.5..=2` |
| `FormantStretch` | `"formantStretch"` | `resynthesis.formant.stretch` | `0.5..=2` |
| `FormantAspirationMix` | `"formantAspirationMix"` | `resynthesis.formant.aspiration_mix` | `0..=1` |
| `FormantAspirationCutoffHz` | `"formantAspirationCutoffHz"` | `resynthesis.formant.aspiration_cutoff_hz` | `500..=10000` Hz |
| `ChoirVoices` | `"choirVoices"` | `resynthesis.choir_voices` | `1..=16` |
| `ChoirDetune` | `"choirDetune"` | `resynthesis.choir_detune` | `10..=100` |
| `ChoirDelay` | `"choirDelay"` | `resynthesis.choir_delay` | `20..=200` |
| `ChoirSpreadPercent` | `"choirSpreadPercent"` | `resynthesis.choir_spread_percent` | `0..=100`% |
| `HarmonyRegisterPercent` | `"harmonyRegisterPercent"` | `resynthesis.harmony.register_percent` | `0..=100`% |
| `HarmonyVoicingSpreadPercent` | `"harmonyVoicingSpreadPercent"` | `resynthesis.harmony.voicing_spread_percent` | `0..=100`% |
| `HarmonyPortamentoMs` | `"harmonyPortamentoMs"` | `resynthesis.harmony.portamento_ms` | `0..=10000` ms |
| `HarmonyVoices` | `"harmonyVoices"` | `resynthesis.harmony.voices` | `0..=4` |
| `HarmonyGain` | `"harmonyGain"` | `resynthesis.harmony_gain` | `0..=1` |
| `HarmonicModulation` | `"harmonicModulation"` | `resynthesis.harmonic_modulation` | `0..=24` |
| `DryMix` | `"dryMix"` | `resynthesis.dry_mix` | `0..=1` |
| `ReverbMix` | `"reverbMix"` | `reverb.mix` | `0..=1` |
| `ReverbDiffusion` | `"reverbDiffusion"` | `reverb.diffusion` | `0..=1` |
| `ReverbDecay` | `"reverbDecay"` | `reverb.decay` | `0..=1` |
| `ReverbBrightnessHz` | `"reverbBrightnessHz"` | `reverb.brightness_hz` | `80..=20000` Hz |
| Variant | TypeScript `type` | Configuration field | Range |
| ----------------------------- | ------------------------------- | -------------------------------------------- | ---------------- |
| `PunchGainDb` | `"punchGainDb"` | `punch.gain_db` | `-96..=12` dB |
| `PunchImpact` | `"punchImpact"` | `punch.impact` | `0..=1` |
| `PunchCeilingDb` | `"punchCeilingDb"` | `punch.ceiling_db` | `-96..=0` dBFS |
| `PunchAttackMs` | `"punchAttackMs"` | `punch.attack_ms` | `0.01..=5000` ms |
| `WarmDriveDb` | `"warmDriveDb"` | `warm.drive_db` | `0..=6` dB |
| `PitchThreshold` | `"pitchThreshold"` | `resynthesis.pitch.threshold` | `0.002..=0.2` |
| `RetuneMs` | `"retuneMs"` | `resynthesis.correction.retune_ms` | `0..=400` ms |
| `Humanize` | `"humanize"` | `resynthesis.correction.humanize` | `0..=1` |
| `FlexTune` | `"flexTune"` | `resynthesis.correction.flex_tune` | `0..=1` |
| `PitchRatio` | `"pitchRatio"` | `resynthesis.pitch_ratio` | `0.25..=4` |
| `FormantWidth` | `"formantWidth"` | `resynthesis.formant.width` | `0.5..=2` |
| `FormantStretch` | `"formantStretch"` | `resynthesis.formant.stretch` | `0.5..=2` |
| `FormantAspirationMix` | `"formantAspirationMix"` | `resynthesis.formant.aspiration_mix` | `0..=1` |
| `FormantAspirationCutoffHz` | `"formantAspirationCutoffHz"` | `resynthesis.formant.aspiration_cutoff_hz` | `500..=10000` Hz |
| `ChoirVoices` | `"choirVoices"` | `resynthesis.choir_voices` | `1..=16` |
| `ChoirDetune` | `"choirDetune"` | `resynthesis.choir_detune` | `10..=100` |
| `ChoirDelay` | `"choirDelay"` | `resynthesis.choir_delay` | `20..=200` |
| `ChoirSpreadPercent` | `"choirSpreadPercent"` | `resynthesis.choir_spread_percent` | `0..=100`% |
| `HarmonyRegisterPercent` | `"harmonyRegisterPercent"` | `resynthesis.harmony.register_percent` | `0..=100`% |
| `HarmonyVoicingSpreadPercent` | `"harmonyVoicingSpreadPercent"` | `resynthesis.harmony.voicing_spread_percent` | `0..=100`% |
| `HarmonyPortamentoMs` | `"harmonyPortamentoMs"` | `resynthesis.harmony.portamento_ms` | `0..=10000` ms |
| `HarmonyVoices` | `"harmonyVoices"` | `resynthesis.harmony.voices` | `0..=4` |
| `HarmonyGain` | `"harmonyGain"` | `resynthesis.harmony_gain` | `0..=1` |
| `HarmonicModulation` | `"harmonicModulation"` | `resynthesis.harmonic_modulation` | `0..=24` |
| `DryMix` | `"dryMix"` | `resynthesis.dry_mix` | `0..=1` |
| `ReverbMix` | `"reverbMix"` | `reverb.mix` | `0..=1` |
| `ReverbDiffusion` | `"reverbDiffusion"` | `reverb.diffusion` | `0..=1` |
| `ReverbDecay` | `"reverbDecay"` | `reverb.decay` | `0..=1` |
| `ReverbBrightnessHz` | `"reverbBrightnessHz"` | `reverb.brightness_hz` | `80..=20000` Hz |

## Lifecycle

Expand Down
31 changes: 31 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://biomejs.dev/schemas/2.6.8/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["**", "!CHANGELOG.md", "!package-lock.json"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": false
}
}
Loading
Loading