Realtime audio processing / synthesis using Rust/WASM in the browser.

Overview

Rust Audio

About

This repo is my investigation into using Rust for creative audio coding on various platforms (e.g. desktop, web, etc.), but especially for targeting the web.

Granular Synthesizer Demo

Granular Synthesizer Demo

Todos:

  • Update licenses / cargo tomls, directory names

  • Show hoverable tooltips for icon buttons

  • Enable sampling from multi-channel audio input

  • split granular synth into its own repo / separate website entry before adding more features?

  • Show recording buffer visualization (or at least some sort of indication recording is taking place)

  • Interpolate changes in Gain

  • Name downloaded file something more like: "name_of_audio_granulated.wav" or similar

  • Optimizations:

    • Add finished grains to a hashmap when finished to prevent the need for searching for spent grains on every frame
    • Improve which rand function we're using for better efficiency
  • Use newtype-style units to disambiguate calculations

  • Move audio PROCESSING into a Web Worker thread so that cpal merely has to request audio data at the appropriate time

    • Keeps main thread / audio processing from getting locked up by UI updates and vice versa
    • Keeps WebAudio context on the main thread (where it has to be)
  • Share a single audio context that is initialized (?) at init time?

  • Memoize decoded audio from previous files? To prevent stutter on change?

  • Enable dragging the current buffer selection window?

  • Web

    • Refactor visual representation of current audio buffer:
      • use an svg element?
      • probably would be best to use a canvas to do this
  • Common

    • Clean up any unused files in /common
    • Move audio handles in there?
  • CLI

    • Re-sample any audio files that don't match the current sample rate.
  • Native

    • Make a Native app using Tauri that relies on current web view with Rust running natively under the hood?
    • Use serde_wasm_bindgen instead of message passing between backend and front end to prevent JSON-ifying buffers?
  • More audio tools / effects:

    • Recording
    • Reverb
    • Delay

Visual effects: - WebGL: particles that react / correspond to audio grains - Show audio output as a sample window? - Or just show current amplitude output with simple bars


General Fixes:

  • Correct sample rate for mp3 audio for all environments.
You might also like...
gc-sections for wasm

wasm-gc Note: you probably don't need to use this project. This project is no longer necessary to run by hand, nor do you need the wasm-gc executable

List the symbols within a wasm file

wasm-nm List the symbols within a wasm file. Library Executable License Contributing Executable To install the wasm-nm executable, run $ cargo install

Instrument and transform wasm modules.

wasm-instrument A Rust library containing a collection of wasm module instrumentations and transformations mainly useful for wasm based block chains a

Just a little game I made in a day to try out the WASM-4 fantasy console.

Dodgeball This is just a little game I made in a day to try out the WASM-4 fantasy console. Play it here. The palette is SODA-CAP by Cappuchi. License

WebAssembly (Wasm) interpreter.

Continuous Integration Test Coverage Documentation Crates.io wasmi- WebAssembly (Wasm) Interpreter wasmi was conceived as a component of parity-ethere

WASM-compiled built-in actors used by all Filecoin clients

Built-in Filecoin actors (v8) This repo contains the code for the on-chain built-in actors that power the Filecoin network starting from network versi

A faster experimental wasm-based tar implementation for browsers.

@bytedance/tar-wasm A faster* experimental wasm-based tar implementation for browsers. *50-160x faster, see benchmarks below. Usage Install npm instal

TSS of GG18 by WASM, for Confidential Transaction Generation and Signing

TSS WASM portable lightweight client application for threshold ECDSA (based on GG18), built on&for multi-party-ecdsa : Wasm HW friendly Dev yarn build

Rust-ffi-guide - A guide for doing FFI using Rust

Using unsafe for Fun and Profit A guide to traversing the FFI boundary between Rust and other languages. A rendered version is available here. This gu

Comments
  • VST Plug-in Version?

    VST Plug-in Version?

    Hi there, I love the granular synth demo you built. Do you intend to create a VST version of it? If not, what's the license under which the code is licensed? I would be interested in creating a fork to continue the development of the plugin as a VST3 / Clap plugin (MIT Licensed, open source).

    opened by AlexW00 2
Owner
Austin Theriot
GitLab making it look like I don't code anymore.
Austin Theriot
Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.

Percy Build frontend browser apps with Rust + WebAssembly. Supports server side rendering. The Percy Book This README gives a light introduction to Pe

Chinedu Francis Nwafili 2k Sep 16, 2022
📦✨ your favorite rust -> wasm workflow tool!

?? ✨ wasm-pack Your favorite Rust → Wasm workflow tool! Docs | Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About Th

Rust and WebAssembly 4.5k Sep 19, 2022
Gun port in rust & wasm

gun-rs-wasm Rust & WASM port of Gun. For a non-wasm version, check out gun-rs Example (source) Use npm install rusty-gun import { Node as Gun } from "

Martti Malmi 37 Sep 4, 2022
📝 A template for creating WASM + Typescript + Rust workflow libraries.

Create Rust + TypeScript libraries with ease! PR'S WELCOMED! ✨ Inspiration I wanted to create a WebAssembly/Rust library with additional JS features,

Shaoru Ian Huang 23 Aug 19, 2022
Rust implementation of the Mina protocol, targeting Wasm and ARM architectures.

Mina-rs An implementation of Mina protocol in Rust, with focus on web and Wasm compatibility ** As you can probably tell this is a WIP! Don't use for

ChainSafe 148 Sep 20, 2022
A self-guided learning project that includes Rust + Wasm together

A self-guided learning project that includes Rust + Wasm together. Who knows, maybe Typescript and React joins too..

M.Yavuz Yagis 1 Feb 14, 2022
WASM bindings for React - enables you to write and use React components in Rust

This library enables you to write and use React components in Rust, which then can be exported to JS to be reused or rendered.

Yichuan Shen 48 Sep 22, 2022
Facilitating high-level interactions between Wasm modules and JavaScript

wasm-bindgen Facilitating high-level interactions between Wasm modules and JavaScript. Guide | API Docs | Contributing | Chat Built with ?? ?? by The

Rust and WebAssembly 5.6k Sep 21, 2022
Install `wasm-pack` by downloading the executable

wasm-pack-action Install wasm-pack by downloading the executable (much faster than cargo install wasm-pack, seconds vs minutes). Usage - uses: jetli/w

Jet Li 33 Sep 19, 2022
`wasm-snip` replaces a WebAssembly function's body with an `unreachable`

wasm-snip wasm-snip replaces a Wasm function's body with an unreachable instruction. API Docs | Contributing | Chat Built with ?? ?? by The Rust and W

Rust and WebAssembly 167 Sep 18, 2022