Skip to content
SpacekidLabsPublic

About

When existing tools didn't break audio hard enough, I built my own. DATABEND is an experimental offline audio glitching and sound mangling Electron app designed for sound designers and noise musicians.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DATABEND

DATABEND is an experimental audio editor for glitching, slicing and wave-style processing. Load a file, work with transient slices and loop regions, run it through any of 44 processors, and export WAV.

The desktop app is native Rust: egui for the interface, CPAL for playback, Symphonia for decoding and RustFFT for spectral processing. It loads no JavaScript, HTML, Electron or webview.

DATABEND also runs in the browser at databend.spacekidlabs.com. That version is the original JavaScript app, kept in web/.

Run

Needs a recent stable Rust (edition 2024).

cargo run --release
# In a window instead of full screen:
cargo run --release -- --windowed
# Open a file on launch:
cargo run --release -- --windowed /path/to/audio.wav

Build the macOS app

rustup target add aarch64-apple-darwin x86_64-apple-darwin   # once
./scripts/build-native-macos.sh

This writes a universal dist/DATABEND.app (Apple Silicon + Intel, macOS 11 or later) and dist/DATABEND-<version>-universal.dmg. The version comes from Cargo.toml. The app is ad-hoc signed, not notarized, so macOS asks you to allow it the first time (right-click → Open). It uses the same bundle ID as the Electron app, so installing it replaces v1.x.

Release

Pushing a version tag builds the universal DMG on GitHub Actions and attaches it to a draft GitHub Release (.github/workflows/release.yml):

  1. Set version in Cargo.toml, run cargo check so Cargo.lock follows, and commit.

  2. Tag the commit, with the release notes in the tag message (one change per line), and push the tag:

    git tag -a v2.1.0 -m "- Added ...
    - Fixed ..."
    git push origin v2.1.0
  3. Check the draft under Releases on GitHub and press Publish.

The tag has to match the Cargo.toml version. spacekidlabs.com/download only sees published releases, so it switches to the new version on its next build after step 3.

Using it

The original fonts, palette, toolbar, waveform envelopes, processor names, parameter ranges and keyboard shortcuts carry over from the JavaScript app. The logo's context menu has the hidden multitrack, Destroy and slice-kit actions. Double-click the empty canvas, or choose Sample Browser from the waveform's context menu, to browse a folder.

Every effect dialog has Audition. It loops the processed selection (or the active loop, or the whole track) and refreshes when you move a slider, change a dropdown or press Random, without touching your edits or undo history. Stop Audition, Space, Cancel and Escape stop the preview. Commit uses the same rendered audio and random seed as the preview.

Recovery data is saved to ~/Library/Application Support/DATABEND/recovery.json. Set DATABEND_DATA_DIR to use a different folder, for example for a test session. Undo history holds up to 100 snapshots (about 512 MiB) and isn't kept between launches. The current audio, track settings, selection and folder are.

Tests

cargo test --locked --no-default-features

The tests check the Rust DSP against 304 outputs captured from the original JavaScript (tests/reference.json.gz, tests/transients.json.gz). That's 302 numerical comparisons with an absolute tolerance of 0.000002 per sample, plus two random-scramble cases checked by sample preservation. They cover all five clustering algorithms, three segmentation modes, alternate wavelet bases, select options and parameter extremes. Transient positions are compared exactly at 22.05, 44.1, 48 and 96 kHz, and an inverse-transform oracle checks spectral rotation. Other tests cover the editor (undo/redo, region replacement, fades, recovery, mixdown, PCM16) and Audition on all 44 effects.

To regenerate the fixtures from the JavaScript app (development only):

node scripts/reference-fixtures.cjs

This evaluates the processors in web/app.js and rewrites assets/processors.json and the two fixture files.

Compatibility notes

  • DSP uses f64 arithmetic and f32 storage, to match JavaScript Number / Float32Array rounding. Wavelet coefficients, PCM16 truncation, the 12× RMS gain cap, clipping and legacy zero-value defaults are kept.
  • Randomized effects stay random; a seeded generator makes tests reproducible. Waveset Scramble uses a native shuffle instead of V8's implementation-dependent random sort.
  • The original automation selectors were never connected to the processor options, so they stay inactive here. Melter's feedback control is also inactive, as in the original.

DATABEND online (web/)

web/ is the original JavaScript app (formerly the Electron desktop app, released up to v1.1.0). It's still live as DATABEND online, and it's the source for the test fixtures.

cd web
npm run build:web   # writes web/web-dist/

Every push to main deploys it to databend.spacekidlabs.com through Cloudflare Workers Builds, with the build's root directory set to web (web/wrangler.jsonc).

The Electron shell (main.js, preload.js, the splash screen) is still in web/ but is no longer released. web/waveset-k-means-quantizer/ is an older, separate analysis prototype.

Project structure

  • src/: the Rust app (dsp/ holds the processors)
  • tests/: parity, editor and Audition tests, with the captured fixtures
  • assets/: fonts, icon and the processor catalog
  • scripts/build-native-macos.sh: builds the universal .app and .dmg
  • scripts/reference-fixtures.cjs: regenerates the fixtures from web/app.js
  • web/: DATABEND online (JavaScript)

License

ISC. See LICENSE.

About

When existing tools didn't break audio hard enough, I built my own. DATABEND is an experimental offline audio glitching and sound mangling Electron app designed for sound designers and noise musicians.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages