Initial commit: InTono — app KMP per l'apprendimento musicale

App Kotlin Multiplatform (Android/iOS/Desktop) con Compose Multiplatform:
controllo intonazione (YIN), pratica guidata, metronomo, ear training,
sfide, scansione spartiti via AI, spartiti bundled e pentagramma con
glifi tipografici, travature, battute e spaziatura proporzionale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lucianoandClaude Fable 5 committed 2026-07-22 10:06:59 +02:00
commit 21ad969b10
245 files changed
+28963

No files matched your search

@@ -0,0 +1,35 @@
package com.notemusicali.history
import kotlinx.serialization.Serializable
@Serializable
data class NoteResult(
val noteName: String,
val midiNumber: Int,
val centsDeviation: Float,
val reactionTimeMs: Long,
val firstAttemptSuccess: Boolean,
)
@Serializable
data class PracticeSession(
val id: String,
val sequenceName: String,
val instrumentName: String,
val dateMillis: Long,
val totalTimeMs: Long,
val noteResults: List<NoteResult>,
val noteMidiNumbers: List<Int>,
val completed: Boolean = true,
) {
val averageCents: Float
get() = if (noteResults.isEmpty()) 0f
else noteResults.map { kotlin.math.abs(it.centsDeviation) }.average().toFloat()
val perfectNotes: Int
get() = noteResults.count { kotlin.math.abs(it.centsDeviation) <= 10f }
val firstAttemptRate: Float
get() = if (noteResults.isEmpty()) 0f
else noteResults.count { it.firstAttemptSuccess }.toFloat() / noteResults.size
}