Reactronica

Docs

Make music with React

Reactronica

React Components

Play audio in the browser with simple declarative components. Treat music as a function of state.

Uses Tone JS under the hood. Inspired by React Music.

import { Song, Track, Instrument } from 'reactronica;
const Audio = () => {
return (
<Song isPlaying={false}>
<Track steps={['C3', 'E3', 'B2', 'E3']}>
<Instrument type="synth" />
</Track>
</Song>
)
}

Synth

Take advantage of the browser's synth engine

import { Song, Track, Instrument } from 'reactronica;
const KeyboardAudio = () => {
const [notes, setNotes] = useNotes([]);
return (
<>
{/* Custom keyboard component */}
<Keyboard
onMouseDown={(notes) => setNotes(notes)}
onMouseUp={() => setNotes([])}
/>
<Song>
<Track>
<Instrument type="synth" notes={notes} />
</Track>
</Song>
</>
)
}

Samples

Load up your own WAV or MP3 files.

import { Song, Track, Instrument } from 'reactronica;
const Samples = () => {
const [notes, setNotes] = useNotes([]);
return (
<>
<button onClick={() => setNotes({ name: 'C3' })}>
Kick
</button>
{/* Other buttons... */}
<Song>
<Track>
<Instrument
type="sampler"
notes={notes}
samples={{
C3: '/drums/kick.wav',
D3: '/drums/snare.wav',
E3: '/drums/hat.wav',
}}
/>
</Track>
</Song>
</>
)
}

Sequence

Create melodies and chord progressions.

1
2
3
4
5
6
7
8

Examples

Digital Audio Workstation

Early prototype of a browser based Digital Audio Workstation. Inspired by Ableton Live, Cubase and Logic Pro, this experiment comes complete with multi-track sequencing, browser synths, drums and web audio effects.

https://reactronica.com/daw

Reactronica Digital Audio Workstation demo

Ukulele Tablature

Have a play and try changing the notes while the song is playing. Arrow keys should work as well.