• Stars
    star
    350
  • Rank 121,229 (Top 3 %)
  • Language
    TypeScript
  • License
    Other
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A web-based sound synthesis, music production, and audio experimentation platform

Web Synth

Combined screenshots of the Web Synth application showing the graph editor for the audio patch network and a part of the synth designer UI with envelope generators, param controls, and the FM synth modulation matrix

Web Synth is a browser-based audio synthesis, music production, and sound experimentation platform. It has features of traditional DAWs as well as additional tools to support modular style patching, dynamic custom code, and live looping.

Try It Yourself

Or, watch the demo video to get a feel for what it can do:

screenshot from the youtube video showing web synth in the background

Tech

Web synth makes extensive use of many modern web technologies for its operation including Web Audio, WebAssembly, WebGL, WebMIDI, SharedArrayBuffer, AudioWorkletProcessor, and more.

Web synth supports high performance and low latency realtime audio generation. It achieves this by compiling code for synthesizers, effects, and other audio nodes from Rust and other specialized languages into WebAssembly and running it on the dedicated audio thread. This offers near-native performance and jank-free playback.

Because of this, Web Synth requires a modern browser to run. Although it will technically load on mobile devices and phones, the UI isn't optimized for mobile use at this time.

Notable Features

  • Versatile 8-operator polyphonic FM Synthesizer
    • Supports many primitive waveforms as well as loading wavetables from WaveEdit or other sources
    • Contains a number of built-in effects from basics like bitcrusher and filters to OTT-style multiband compression and wavefolding
    • Highly modulatable and patchable with sample-level parameter automation via other modules or built-in per-voice envelope generators
  • Fully functional MIDI editor
    • MIDI file import and export
    • Multi-note selection and editing
    • Record live from keyboard or other input source
    • Live playback and preview
  • Two programmable loopers for samples and MIDI
  • Dynamic compilation of DSP code written in Faust and Soul via WebAssembly
    • Facilitates infinite custom effects using existing code with minimal or no changes required
    • Parameters are fully integrated into the web synth patching system allowing them to be modulated by other components or controlled live by auto-generated UI
  • Preset and composition sharing/loading system for many of web synth's components
  • Modular synth-style utilities like LFOs, random voltage sources, and quantizers
  • Variety of visualizers including oscilloscope and spectrum analyzer
  • Support for building custom UIs with many input types and markdown notes
  • Supports hardware MIDI keyboards and controllers via WebMIDI
  • Many other miscellaneous tools and modules like visual filter designer, granular synthesizer, delays, signal debuggers, and more

Design + Structure

The tool is built on top of the WebAudio API and makes use of it for all audio processing. The WebAudio graph is the backbone of everything and the every piece of audio-processing code exists as a node within it. These nodes are created as different modules within the application and can be connected together using a built-in graph editor. The tool's engine has support for handling de/initialization of nodes, resolving connections, handling input/output shapes changing, and de/serializing on page un/load.

Speaking of that, the whole application state is serialized to the browser's local storage every time the tab is closed and automatically re-loaded when the tab is opened back up again. Saving and loading is as simple as just creating or loading a JSON blob representing the state of localStorage. The goal (which is mostly but not completely realized) is that refreshing the page should bring you back to the exact state you were in before automatically with no user intervention required.

Building + Running for Development

Note that these docs might be somewhat out of date. Check the Github Actions CI script and the Justfile in the project root for details.

You'll need a few pieces of software in order to build and run this locally. They're mainly for compiling, transforming, and optimizing the WebAssembly blobs that are created as output for the Rust application.

You must have several tools installed in order to build this tool for development:

  • The Rust programming language (nightly version): https://rustup.rs/
  • The wasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown
  • wasm-bindgen-cli: cargo install wasm-bindgen-cli
  • wasm-opt: Clone https://github.com/WebAssembly/binaryen and follow install instructions there
  • NodeJS and Yarn
  • The Just command runner: cargo install just
  • If you want Faust code support, you'll need to install go
  • If you want to run the Web API backend which handles presets, composition sharing, and a few other things like that, you'll need to stand up a MySQL database and install the Diesel ORM command line (cargo install diesel-cli --features=mysql).

Once you have these tools installed, you can build the project by running just build-all (to create an optimized, production deployment) or just run (to start a local webserver on port 9000 for development that automatically hot-reloads when the JS/TS code is changed).

More Repositories

1

robintrack

Scrapes the Robinhood API to retrieve + store popularity and price data.
JavaScript
683
star
2

tickgrinder

Low-latency algorithmic trading platform written in Rust
Rust
522
star
3

three-good-godrays

Screen-space raymarched godrays for three.js using the pmndrs postprocessing library
TypeScript
152
star
4

neural-network-from-scratch

A neural network library written from scratch in Rust along with a web-based application for building + training neural networks + visualizing their outputs
Rust
110
star
5

cryptoviz

A web-based Depth-Of-Market visualization for data of the Poloniex cryptocurrency exchange.
JavaScript
73
star
6

spotifytrack

A personal homepage showing users' top songs and artists, providing a shareable link that they can use to show it off to friends.
TypeScript
65
star
7

rust-cloud-run-demo

A demo project showing off a Google Cloud Run-compatible web server using Rust, Rocket, Diesel, and MySQL
Rust
34
star
8

svelte-todo

Full-stack to-do app to try out SvelteKit. Minimal with SQLite database + HTTP basic auth
TypeScript
25
star
9

osutrack-api

API for osu!track https://ameobea.me/osutrack/
TypeScript
21
star
10

sketches

Various coding experiments and artsy things
Rust
17
star
11

phost

Small project hoster. Can deploy static websites + Dockerfiles and provide a management TUI client.
Python
17
star
12

polotrack

A web-based dashboard for analyzing Poloniex portfolio holdings + trade history to provide useful insights
JavaScript
15
star
13

io-game

A .io game written using Elixir/Phoenix and WebAssembly
Rust
12
star
14

rocket_async_compression

Implements response compression with gzip and brotli via the `async-compression` crate
Rust
11
star
15

noise-asmjs

Uses `noise-rs` library rendered to render noise to a canvas, allowing users to select and configure the utilized noise functions.
JavaScript
11
star
16

rnn-viz

Interactive visualizations and demos that are used in a blog post I wrote about logic in the context of neural networks
Jupyter Notebook
11
star
17

minutiae

Simulation engine involving a 2D universe populated by cells and entities
Rust
10
star
18

osutrack_irc_v2

Utility to provide osu! players with access to osu!track via in the in-game chat system.
JavaScript
7
star
19

FXCMDataDownloader

A Node/Java utility that downloads and stores historical price data from the FXCM API
Java
6
star
20

homepage

My personal website
JavaScript
6
star
21

algobot3

Third iteration of the algorithmic trading bot I've been working on.
JavaScript
5
star
22

ameotrack

Personal data storage and utility platform.
JavaScript
5
star
23

sprout

AI-powered anime recommendation website for MyAnimeList + AniList with other tools, visualizations, and profile analytics
Jupyter Notebook
5
star
24

sketches-3d

Experiments and demos of 3D game-like things. Mostly using Blender + Three.JS with custom shaders and interactive bits.
TypeScript
5
star
25

jantix

A fully-featured TypeScript library defining a modular, self-contained, 100% type-safe Redux architecture
TypeScript
4
star
26

GAWTrack

Events history tracker for GAW cloud miners.
PHP
4
star
27

algobot_elixir

Second iteration of the forex trader bot implemented in elixir
Elixir
4
star
28

advent-of-code-2018

https://adventofcode.com/
Rust
3
star
29

bot4

REPOSITORY MOVED -> https://github.com/ameobea/tickgrinder
2
star
30

paper_parser

Processes scientific papers and determines regions of interest in them.
Python
2
star
31

rust-stackdriver-logging-utils

Utilities and functions that make logging to Google Stackdriver from Rust using fern easier.
Rust
2
star
32

network_research

Misc. files and scripts used for network research
Python
2
star
33

snapmeo

A screenshotter and image uploader for my personal file hosting platform.
Rust
1
star
34

kouffee-bot

Bot for the discord server
TypeScript
1
star
35

hazbin

Website that randomly picks images from my personal collection of screenshots from the pilot episode of Hazbin Hotel. I have hundreds.
JavaScript
1
star
36

amc-web-ui

Main repository for the AutoMultipleChoice-based application being built for CS358
Python
1
star
37

bittrex-orderbook-importer

imports orderbook updates from bittrex
JavaScript
1
star
38

mysql-log-visualization

Tool for creating a live, web-based visualization of a MySQL server's activity.
Rust
1
star
39

Calculator-Programs

A collection of TI graphing calculator programs made by me during my early years of programming.
1
star
40

quavertrack

Quavertrack is a tool for tracking your stats progression in the rhythm game Quaver, allowing you to see how you and other players improve over time.
TypeScript
1
star
41

algobot

Algorithmic trading platform
JavaScript
1
star