How itzbittu09/crimson-voice works
Crimson Voice is an Android vocal-synthesis editor. The apparent workflow is project editing and note entry, followed by lyric/phoneme and voicebank-based synthesis, cached audio playback, and edit recovery. The Rust engine excerpts confirm synthesis, caching, audio output, and snapshot history; the Kotlin UI and storage sources were not sampled, and there is no README, so Android workflow links are shown as unverified rather than asserted.
Main entry points: lib.rs Vocal engine · cache.rs Chunk synthesis cache · ProjectComposerActivity.kt Project composer · PianoRollActivity.kt Piano roll
Components 24
Android app
- Main screen
app/src/main/kotlin/com/example/crimsonvoice/MainActivity.kt - Project composer
app/src/main/kotlin/com/example/crimsonvoice/ProjectComposerActivity.kt - Piano roll
app/src/main/kotlin/com/example/crimsonvoice/PianoRollActivity.kt - Settings screen
app/src/main/kotlin/com/example/crimsonvoice/SettingsActivity.kt - Composer components
app/src/main/kotlin/com/example/crimsonvoice/ui/composer/ComposerComponents.kt - Note editors
app/src/main/kotlin/com/example/crimsonvoice/ui/pianoroll/NoteEditors.kt - Piano roll canvas
app/src/main/kotlin/com/example/crimsonvoice/ui/pianoroll/PianoRollCanvas.kt
Project and score
- Project session
app/src/main/kotlin/com/example/crimsonvoice/state/ProjectSessionState.kt - Project storage
app/src/main/kotlin/com/example/crimsonvoice/data/ProjectRepository.kt - Settings storage
app/src/main/kotlin/com/example/crimsonvoice/data/SettingsRepository.kt - Score model
rust_engine/src/score.rs - Atomic file storage
app/src/main/kotlin/com/example/crimsonvoice/data/AtomicFileStorage.kt
Synthesis inputs
- Voicebank access
app/src/main/kotlin/com/example/crimsonvoice/data/VoicebankRepository.kt - Lyric conversion
rust_engine/src/g2p.rs - Voicebank synthesis
rust_engine/src/voicebank.rs - G2P converter
app/src/main/kotlin/com/example/crimsonvoice/score/SimpleG2pConverter.kt
Audio engine
- Kotlin engine bridge
app/src/main/kotlin/com/example/crimsonvoice/engine/VocalEngineBridge.kt - JNI interface
rust_engine/src/jni_bridge.rs - Vocal engine
rust_engine/src/lib.rs - Chunk synthesis cache
rust_engine/src/cache.rs - Audio playback
rust_engine/src/audio_out.rs - Audio focus
app/src/main/kotlin/com/example/crimsonvoice/engine/AndroidAudioFocusController.kt
Edit recovery
- Score and audio history
rust_engine/src/history.rs
Other components
- Editor user
Connections 26
- Editor user → Main screen: opens
- Main screen → Project composer: navigates
- Project composer → Project session: edits project
- Piano roll → Note editors: uses editors
- Piano roll → Piano roll canvas: renders notes
- Project composer → Composer components: uses components
- Project session → Project storage: loads and saves
- Project storage → Atomic file storage: persists through
- Settings screen → Settings storage: reads and writes
- Project composer → Voicebank access: selects voicebank
- Piano roll → Kotlin engine bridge: calls engine
- Kotlin engine bridge → JNI interface: invokes native
- JNI interface → Vocal engine: dispatches to
rust_engine/src/jni_bridge.rs - Vocal engine → Score model: owns project
rust_engine/src/lib.rs - Vocal engine → Chunk synthesis cache: creates and updates
rust_engine/src/lib.rs - Vocal engine → Voicebank synthesis: previews through
rust_engine/src/lib.rs - Vocal engine → Lyric conversion: provides registry
rust_engine/src/lib.rs - Vocal engine → Audio playback: starts playback
rust_engine/src/lib.rs - Chunk synthesis cache → Score model: reads score data
rust_engine/src/cache.rs - Chunk synthesis cache → Voicebank synthesis: synthesizes notes
rust_engine/src/cache.rs - Chunk synthesis cache → Lyric conversion: resolves lyrics
rust_engine/src/cache.rs - Audio playback → Chunk synthesis cache: mixes cached chunks
rust_engine/src/audio_out.rs - JNI interface → Score and audio history: captures and restores
rust_engine/src/jni_bridge.rs - Score and audio history → Chunk synthesis cache: snapshots audio
rust_engine/src/history.rs - G2P converter → Piano roll: converts lyrics
- Audio focus → Audio playback: coordinates focus