One pianist, two tablets, one concert-proof open book.
DuoStave is an offline sheet-music reader for Android. Two paired tablets act as one open book: the left tablet shows the left page, the right tablet the right page, and they turn together. The link between them is Bluetooth Low Energy, so it works in a rehearsal hall with no wifi and no cell service.
A pianist puts the same score on both tablets, taps Host on the left one and types a 4-digit code on the right one. From then on pages turn together, pencil marks appear on both screens as she draws, the page-turn pedal works, the screen never sleeps, and if anything crashes or drops she is playing again in seconds with nothing lost.
Copyright (C) 2026 Glosso Studio. Free software under the GNU Affero General Public License v3.0.
- Offline link: page turns, annotation mirroring and concert control travel over BLE GATT ("DSLink v1"). No server, no account, no tracking.
- MusicXML, PDF and image scores, stored content-addressed: the same file
imported on both tablets gets the same
scoreKey/pageKey(sha256), with no network needed. - Deterministic pagination: the same MusicXML file paginates the same way on both devices. Page turns are absolute and idempotent, so a split brain is harmless.
- Live annotations with last-writer-wins merge on a hybrid logical clock, undo, partial eraser, colors and widths, stylus pressure. Performance mode defers sends without losing them.
- Setlists and concert mode: the pedal advances through pieces and pages.
- Score tools: transposition, playback through a built-in General MIDI synthesizer, a score corrector, and paper score capture with the camera.
- Crash-proof: book state persists for crash recovery, every reconnect runs a resync handshake, and deleted marks are only purged once backups and the peer have them.
- USB-C link (in progress): an Android Open Accessory transport that reuses the same framing.
DuoStave works fully offline. There are no accounts, no analytics, no crash reporting and no telemetry. Three optional features use the network, all off until you turn them on:
- Library sync (Settings > Library sync): keeps the scores (the files themselves), setlists, layers, transpositions and markings of the two tablets of a duo in step through DuoStave's storage on Cloudflare in the EU, also with Bluetooth off. Live page turns never go through it. Same identity as the cloud backup (a key kept on the tablet, no account). Encrypted in transit and at rest, not end to end. Turning it off stops syncing; "Delete the library from the cloud" erases the cloud copy for both tablets; a duo idle for 12 months is deleted.
- Cloud backup (Settings > Cloud backup): copies your backup zip (scores, markings, setlists) to DuoStave's storage on Cloudflare in the EU, after each backup you make and once a day when something changed. It is shared only with your paired tablet, identified by a key kept on the tablet, with no account. The last backups plus one per month are kept within the duo's plan (2 GB per duo during testing); a duo with no new backup for 12 months is deleted. It is encrypted in transit and at rest, not end to end. "Delete my cloud backups" removes it at any time.
- Your own R2 bucket (advanced): the same zip uploaded to a Cloudflare R2 bucket you configure yourself.
Details: docs/design/backup.md sections 7 and 8.
Paper score capture uses Google's ML Kit Document Scanner, which runs on the device inside Google Play services. DuoStave removes ML Kit's usage-logging upload from its manifest.
Honest BLE threat model: the pairing uses a 4-digit code exchange and a session token that gates every post-pairing message, and any malformed or unauthorized write disconnects the attacker. BLE link-layer encryption on consumer hardware is not military grade, though, and a determined attacker with the right radio tooling is out of scope for a sheet-music reader. Do not use DuoStave to transmit secrets; it only ever carries page positions, strokes and setlists.
Requirements:
- JDK 17 (21 also works; 26 does not).
- Android SDK 34, NDK 26.1.10909125 and CMake 3.22.1 (a small JNI shim lives in
app/src/main/cpp). Install them withsdkmanager "platforms;android-34" "ndk;26.1.10909125" "cmake;3.22.1". - Network access on the first build: the
fetch<Variant>SoundFonttask downloads the 215 MB MuseScore_General.sf2 sound bank once into~/.gradle/caches/duostave-soundfont/and checks its sha256. The unit tests need it too. See tools/soundfont/README.md. - About 4 GB of heap for Gradle (
gradle.propertiessets it).
No secrets, keys or private repositories are needed: every dependency comes from Google's Maven, Maven Central or the Gradle plugin portal.
./gradlew :app:assembleDebug # debug APK
./gradlew :app:testDebugUnitTest # :app's tests, integration tests among them
./gradlew :domain:book:test # one plain JVM module's tests
tools/gate.sh # the full local gate (see CONTRIBUTING.md)Install the APK on both tablets, import the same score file on both, tap Pair and follow the 4-digit code flow.
The cloud Worker and the web app build with Node:
(cd workers/api && npm ci && npm test) # cloud backup and sync Worker
(cd webapp && npm ci && npm run build) # web clientThe Worker (workers/api/wrangler.toml) and the landing site
(site/wrangler.toml) name Glosso Studio's Cloudflare resources: the D1
database_ids, the R2 bucket, the rate-limit namespace, the custom domains
(app.duostave.com, duostave.com) and the Worker and project names. They are
not secrets, but they only work in Glosso Studio's account. A fork that deploys
its own backend must create its own D1 database, R2 bucket and rate-limit
namespace, replace those IDs, names and routes, set its own secrets with
wrangler secret put, and point the app's CLOUD_API_URL
(app/build.gradle.kts) and the scripts in workers/api/scripts/ at its own
Worker. Forks must not deploy against Glosso Studio's resources or domains.
Kotlin, Jetpack Compose, Hilt and Room, package com.glossostudio.duostave.
The dependency rule is feature -> domain <- data/core adapters, wired in
:app. The Gradle modules (ADR-47,
docs/design/architecture.md section 9):
| Modules | Contents |
|---|---|
:domain:* (sync, book, annotate, score, playback, omr, ensemble, cloud) |
Pure Kotlin JVM modules: the book engine, sync logic, annotation merge, ports. No Android on their classpath |
:core:model, :core:platform-api, :core:link-api, :core:protocol |
Shared model, platform and link interfaces, the DSLink wire protocol |
:core:database |
Room database, real migrations, exported schemas |
:core:link, :core:ble, :core:usb, :core:platform, :core:render, :core:midi, :core:omr |
Adapters: BLE GATT and USB AOA transports, platform services, PDF and MusicXML rendering, the synthesizer, OMR |
:core:designsystem, :core:ui |
Theme, shared components and strings, UI slots |
:data, :data:replica |
Repositories, importers, backup, cloud clients |
:feature:* (reader, library, settings, share) |
Compose screens |
:app |
Wires everything with Hilt: application, activity, navigation, the pairing screen |
The module graph enforces the rules: the domains cannot import Android, and live
sync (:domain:sync) cannot depend on the cloud. tools/arch/ checks every
edge between modules against the allowed table. Packages kept their names from
before the split, so a package does not always tell the module;
tools/arch/modules.js maps them.
Key points:
BookEngineowns open-book state; every page turn goes through it.- Strokes are ordered by a hybrid logical clock and merged last-writer-wins with delete-wins through a single guard.
- The DSLink framing is transport-agnostic: frames are bytes on a stream, so
USB-C is a drop-in second medium. Golden vectors in
spec/vectors/are shared with the Worker and web tests. - MusicXML renders through OpenSheetMusicDisplay in a WebView (bundled, offline); PDF through PDFium.
The design documents in docs/design/ (identity, BLE protocol, annotations, architecture, backup) are the source of truth.
| Path | What |
|---|---|
app/, core/, domain/, data/, feature/ |
The Android app (Gradle modules above) |
build-logic/ |
Gradle convention plugins |
workers/api/ |
Cloudflare Worker: cloud backup, library sync, device auth (TypeScript) |
workers/protocol/ |
Shared TypeScript wire protocol package |
webapp/ |
Web client (TypeScript, React, Vite), served by the same Worker |
site/ |
Landing page for duostave.com (Cloudflare Pages) |
packages/score-edit/ |
Score corrector core in TypeScript, bundled into the app's OSMD assets |
spec/vectors/ |
Golden test vectors for the wire format |
tools/ |
Local gate, architecture checks, visual checkpoints, pedal simulator, OMR training, soundfont notes |
docs/ |
Design documents and verification reports |
See CONTRIBUTING.md. Contributions are accepted under the
Developer Certificate of Origin (git commit -s). Please follow the
Code of Conduct.
Security issues: see SECURITY.md. Please do not open public issues for vulnerabilities.
DuoStave is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. See LICENSE.
Copyright (C) 2026 Glosso Studio.
The trained OMR model (the weights, such as app/src/main/assets/omr/detector.tflite)
is under a separate license, CC BY-NC-SA 4.0: free to use, share and
adapt for non-commercial purposes, with credit, and adaptations under the same
license. For commercial use, write to hello@duostave.com. The code that trains
and runs it is AGPL-3.0 like the rest.
Third-party components keep their own licenses; see NOTICE. The app also lists them in Settings > Advanced > Licenses. The score recognition model was trained in part on OpenScore String Quartets transcriptions through OSSQ-OMR (CC0). The ML Kit Document Scanner is a Google component under its own terms and is not open source.
"DuoStave" and the DuoStave logo identify Glosso Studio's app; please use a different name and logo for a modified version you distribute.