
Production-grade, high-performance musical notation component rendering standard staff and guitar/bass tablature with synchronized playback cursor, real-time MIDI highlights, universal importer/parsers (MIDI/MusicXML), and advanced guitar articulations.
A production-grade, highly performant Kotlin Multiplatform (Compose Multiplatform) musical notation component for rendering both Standard Music Staff (Treble, Bass, and Grand Staff) and Guitar / Bass Tablature (TAB) in interactive, scrolling sheet-music views with synchronized playback cursor, real-time MIDI active-pitch highlights, custom color coding, chords, lyrics, annotations, complete musical articulation semantics, and a full file Importer & Parsers engine.
ScoreImporter):
Dispatchers.Default.ScoreImportResult.Success or ScoreImportResult.Error..mid, .midi): Quantizes timing jitter into clean musical grids, auto-detects triplets, dotted notes, key signatures, and splits piano tracks..musicxml, .xml): Parses 3.1 & 4.0 partwise/timewise notations, tablature frets/strings, accidentals, ornaments, and lyrics.UniversalScoreParser: Auto-detects file type from bytes or extension and converts directly to a Score.StaffAssignmentEngine automatically balances high notes on Treble clef and low notes on Bass clef with cost scoring algorithms.dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.creativeblisslabs:staff-tab-notation:1.0.0")
}
}
}dependencies {
implementation("com.creativeblisslabs:staff-tab-notation:1.0.0")
}import com.creativeblisslabs.notation.importer.ScoreImporter
import com.creativeblisslabs.notation.importer.ScoreImportResult
// In your ViewModel / CoroutineScope:
viewModelScope.launch {
when (val result = ScoreImporter.importScore(fileBytes, "song.mid")) {
is ScoreImportResult.Success -> {
val score = result.score
println("Loaded ${result.totalMeasures} measures (${result.calculatedDurationMs} ms)")
}
is ScoreImportResult.Error -> {
println("Error: ${result.message}")
}
}
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.creativeblisslabs.notation.model.*
import com.creativeblisslabs.notation.ui.StaffAndTabNotationViewer
@Composable
fun NotationViewerScreen(score: Score?) {
// Format switcher: "Both", "Staff", or "Tab"
var format by remember { mutableStateOf("Both") }
StaffAndTabNotationViewer(
score = score,
playheadMeasure = 0,
playheadOffset = 0.0f,
activeMidiNotes = mapOf(60 to true), // Real-time key/fret highlights
playingNote = 60,
primaryColor = Color(0xFF6C63FF),
currentFormat = format,
onFormatChange = { format = it },
showLetters = true,
showLyrics = true,
isSplitStaff = true,
modifier = Modifier.fillMaxSize()
)
}See the full API Reference & Manual for exhaustive documentation of all parsers, importer APIs, data classes, parameters, and guitar articulation semantics.
Copyright 2026 Creative Bliss Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
A production-grade, highly performant Kotlin Multiplatform (Compose Multiplatform) musical notation component for rendering both Standard Music Staff (Treble, Bass, and Grand Staff) and Guitar / Bass Tablature (TAB) in interactive, scrolling sheet-music views with synchronized playback cursor, real-time MIDI active-pitch highlights, custom color coding, chords, lyrics, annotations, complete musical articulation semantics, and a full file Importer & Parsers engine.
ScoreImporter):
Dispatchers.Default.ScoreImportResult.Success or ScoreImportResult.Error..mid, .midi): Quantizes timing jitter into clean musical grids, auto-detects triplets, dotted notes, key signatures, and splits piano tracks..musicxml, .xml): Parses 3.1 & 4.0 partwise/timewise notations, tablature frets/strings, accidentals, ornaments, and lyrics.UniversalScoreParser: Auto-detects file type from bytes or extension and converts directly to a Score.StaffAssignmentEngine automatically balances high notes on Treble clef and low notes on Bass clef with cost scoring algorithms.dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.creativeblisslabs:staff-tab-notation:1.0.0")
}
}
}dependencies {
implementation("com.creativeblisslabs:staff-tab-notation:1.0.0")
}import com.creativeblisslabs.notation.importer.ScoreImporter
import com.creativeblisslabs.notation.importer.ScoreImportResult
// In your ViewModel / CoroutineScope:
viewModelScope.launch {
when (val result = ScoreImporter.importScore(fileBytes, "song.mid")) {
is ScoreImportResult.Success -> {
val score = result.score
println("Loaded ${result.totalMeasures} measures (${result.calculatedDurationMs} ms)")
}
is ScoreImportResult.Error -> {
println("Error: ${result.message}")
}
}
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.creativeblisslabs.notation.model.*
import com.creativeblisslabs.notation.ui.StaffAndTabNotationViewer
@Composable
fun NotationViewerScreen(score: Score?) {
// Format switcher: "Both", "Staff", or "Tab"
var format by remember { mutableStateOf("Both") }
StaffAndTabNotationViewer(
score = score,
playheadMeasure = 0,
playheadOffset = 0.0f,
activeMidiNotes = mapOf(60 to true), // Real-time key/fret highlights
playingNote = 60,
primaryColor = Color(0xFF6C63FF),
currentFormat = format,
onFormatChange = { format = it },
showLetters = true,
showLyrics = true,
isSplitStaff = true,
modifier = Modifier.fillMaxSize()
)
}See the full API Reference & Manual for exhaustive documentation of all parsers, importer APIs, data classes, parameters, and guitar articulation semantics.
Copyright 2026 Creative Bliss Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0