All Projects â†’ joshwcomeau â†’ Key And Pad

joshwcomeau / Key And Pad

🎹 Fun experiment with the Web Audio API 🎶

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Key And Pad

Romplayer
AudioKit Sample Player (ROM Player) - EXS24, Sound Font, Wave Player
Stars: ✭ 445 (+23.61%)
Mutual labels:  keyboard, music, synthesizer
Audiokitsynthone
AudioKit Synth One: Open-Source iOS Synthesizer App
Stars: ✭ 1,258 (+249.44%)
Mutual labels:  keyboard, music, synthesizer
Beep.js
Beep is a JavaScript toolkit for building browser-based synthesizers.
Stars: ✭ 1,294 (+259.44%)
Mutual labels:  music, synthesizer, web-audio
Awesome Music Production
A curated list of software, services and resources to create and distribute music.
Stars: ✭ 340 (-5.56%)
Mutual labels:  music, synthesizer
Tonejs Instruments
A small instrument sample library with quick-loader for tone.js
Stars: ✭ 172 (-52.22%)
Mutual labels:  music, web-audio
Javascriptmusic
Live coding music and synthesis in Javascript / AssemblyScript (WebAssembly)
Stars: ✭ 193 (-46.39%)
Mutual labels:  music, synthesizer
Unimidi
Realtime MIDI IO for Ruby
Stars: ✭ 229 (-36.39%)
Mutual labels:  music, synthesizer
I dropped my phone the screen cracked
web audio, cracked.
Stars: ✭ 245 (-31.94%)
Mutual labels:  music, web-audio
Klystrack
A chiptune tracker
Stars: ✭ 321 (-10.83%)
Mutual labels:  music, synthesizer
All Around Keyboard
a web component for piano keyboards
Stars: ✭ 11 (-96.94%)
Mutual labels:  keyboard, music
Clubber
Application of music theory in audio reactive visualizations
Stars: ✭ 325 (-9.72%)
Mutual labels:  music, web-audio
Supriya
A Python API for SuperCollider
Stars: ✭ 167 (-53.61%)
Mutual labels:  music, synthesizer
Tone.js
A Web Audio framework for making interactive music in the browser.
Stars: ✭ 11,352 (+3053.33%)
Mutual labels:  music, web-audio
Otto
Sampler, Sequencer, Multi-engine synth and effects - in a box! [WIP]
Stars: ✭ 2,390 (+563.89%)
Mutual labels:  music, synthesizer
Granular
HTML5 Granular Synthesiser
Stars: ✭ 113 (-68.61%)
Mutual labels:  music, synthesizer
Miti
miti is a musical instrument textual interface. Basically, its MIDI, but with human-readable text. 🎵
Stars: ✭ 103 (-71.39%)
Mutual labels:  music, synthesizer
glicol
(Audio) graph-oriented live coding language and music DSP library written in Rust
Stars: ✭ 853 (+136.94%)
Mutual labels:  synthesizer, web-audio
Tuna
An audio effects library for the Web Audio API.
Stars: ✭ 1,345 (+273.61%)
Mutual labels:  music, web-audio
Cracked
Mac app for noise making - built w/ "I Dropped My Phone The Screen Cracked"
Stars: ✭ 98 (-72.78%)
Mutual labels:  music, web-audio
Fabgl
Display Controller (VGA, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal for the ESP32
Stars: ✭ 534 (+48.33%)
Mutual labels:  keyboard, synthesizer

A Web Audio experiment, featuring a keyboard-controlled synthesizer and a mouse-controlled X/Y pad (eg. kaoss pad). Built with React and Redux.

Make some music!


Web Audio Reconciler

Key&Pad uses the Web Audio API to generate oscillators and effects. I needed some way for these nodes to be updated when the state in the Redux store changed, so I took inspiration from React and wrote a reconciler.

It subscribes to the store, and whenever a change is published, it calculates the minimum change needed to update the Web Audio nodes.

Oscillators are cheap and disposable. When a note is played or released, we can simply scrap all existing oscillators and recreate them from the Redux state.

When dragging on the X/Y pad, though, effect parameters change incredibly fast, so a bit more precision is required. Thankfully, the currently-active effect is available in Redux state, so it's simply a matter of switching on the effect name, and applying the new amount.

I'm quite pleased with this approach. We're maintaining a single source of truth by having Redux state hold the data needed to build the Web Audio nodes, and our reconciler ensures that updates are performant and straightforward. A single function controls every possible update, and the changes that flow through from Redux to the imperative Web Audio API are easy to follow.

Redux VCR

This synth was developed in tandem with Redux VCR, an ambitious and experimental devtool that records user sessions so they can be played back by app developers.

DAWs like Ableton Live have an interesting "record" option. Rather than record the resulting audio, it instead records the sequence of MIDI actions needed to construct the audio. This way, recordings can be edited and tweaked, and they're a much smaller file size.

It occurred to me that Redux functions in a very similar manner; If you store all of your app state in redux, you can simply replay those actions in realtime to re-create the session on the fly.

I really wanted to see what people would create with Key&Pad, and this tool allows me to anonymously collect and watch what people do; not just the resulting audio, but also the notes pressed, the X/Y pad updates, etc.

Typically, Redux VCR's recorded sessions would only be viewable by developers and administrators. Because Key&Pad records no personal information, though, its cassettes can be replayed by anybody. Simply visit this secret URL and interact with the VCR :)

Special Thanks

The Web Audio API is immensely powerful, but it gives you the primitives needed to construct advanced effects. For the most part, I deferred this task to the makers of Tuna.js and Soundbank.

If anyone else is working with Web Audio, I recommend both of these tools.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].