Roughhouse
A quick and dirty multitrack recorder for Android and the browser, with automatic music analysis and songwriting tools.
Roughhouse is a multitrack recorder for Android and the web that I built for getting song ideas down fast. It looks like an old cassette 4-track: open it, hit record, and you’re recording. Under the deck is a set of tools that analyze what you play and help you write around it.
What it does
- Recording. Unlimited tracks with volume, pan, mute and solo, a metronome with count-in, looping, and basic editing. A scratch mode strips the screen down to the essentials.
- Effects. Low cut, bass and treble, compression, tempo-synced echo and reverb on every track.
- Analysis. Each track gets its tempo, key, note range, the melody as notes, and the chords for each bar. A live pitch monitor works as a tuner while you sing. Anything the analysis gets wrong can be corrected by hand.
- Songwriting tools. A circle of fifths, chord suggestions that fit the melody you recorded, lyrics pinned to bars, and song sections.
- Import and export. Import existing audio (with tempo and key detection), and export to WAV, FLAC, M4A, MP3 or MIDI.
How it works
Everything runs on the device with no network calls. The audio engine is written from scratch in Java on top of Android’s low-latency AudioTrack and AudioRecord, with biquad filters, a compressor and a Freeverb-style reverb.
The analysis is classic music information retrieval rather than a model:
- Pitch uses the YIN algorithm on downsampled audio, which then drives note transcription and the tuner.
- Tempo comes from spectral-flux onset detection and autocorrelation, with a prior that keeps it from landing on double or half time.
- Key is estimated by matching a chroma profile against the Krumhansl-Kessler key profiles.
- Chords are found per bar by matching chroma against triad templates.
The FLAC encoder is written from scratch and tested bit-exact against reference decoders, and builds are signed and published automatically with GitHub Actions.
The web version is the same code ported to JavaScript. The mixer runs in an AudioWorklet, analysis and exports run in a Web Worker, and jams are stored in the browser with IndexedDB. Given the same audio, its analysis matches the Android app’s, and backups move between the two.