Update fine regex
This commit is contained in:
parent
491f502daa
commit
7b205f5390
2 changed files with 1 additions and 37 deletions
|
|
@ -441,8 +441,7 @@ class SharedScreenModel(private val fileRepository: FileRepository) : ScreenMode
|
||||||
|
|
||||||
val isDC = markerText.contains(Regex("""D\.?C\.?"""))
|
val isDC = markerText.contains(Regex("""D\.?C\.?"""))
|
||||||
val isDS = markerText.contains(Regex("""D\.?S\.?"""))
|
val isDS = markerText.contains(Regex("""D\.?S\.?"""))
|
||||||
val isFarany = markerText.trim().equals("Farany", ignoreCase = true)
|
val isFarany = markerText.trim().contains(Regex("""^(fine|fin|farany|end)$""", RegexOption.IGNORE_CASE))
|
||||||
|
|
||||||
val isRit = Regex("""rit\.?|ritard\.?|ritenuto\.?|ritardando""", RegexOption.IGNORE_CASE)
|
val isRit = Regex("""rit\.?|ritard\.?|ritenuto\.?|ritardando""", RegexOption.IGNORE_CASE)
|
||||||
|
|
||||||
var resultMarker: MidiMarkers = marker
|
var resultMarker: MidiMarkers = marker
|
||||||
|
|
|
||||||
|
|
@ -735,23 +735,6 @@ actual class FMediaPlayer actual constructor(
|
||||||
// println("Note detectée au grille: ${tick/60} -> Temps: ${microsecond / 1000} ms")
|
// println("Note detectée au grille: ${tick/60} -> Temps: ${microsecond / 1000} ms")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Détection de tous les note y compris les /2 /4 temps
|
|
||||||
/*val processedTicks = mutableSetOf<Long>()
|
|
||||||
|
|
||||||
for (track in sequence.tracks) {
|
|
||||||
for (i in 0 until track.size()) {
|
|
||||||
val event = track.get(i)
|
|
||||||
val message = event.message
|
|
||||||
if (message is ShortMessage *//*&& message.command == ShortMessage.NOTE_ON *//*&& message.data2 > 0) {
|
|
||||||
if (!processedTicks.contains(event.tick)) {
|
|
||||||
val microsecond = (event.tick * usPerTick).toLong()
|
|
||||||
timestamps.add(microsecond)
|
|
||||||
processedTicks.add(event.tick)
|
|
||||||
println("Note detectée au Tick: ${event.tick} -> Temps: ${microsecond / 1000} ms")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
val sortedList = timestamps.sorted()
|
val sortedList = timestamps.sorted()
|
||||||
sharedScreenModel.updateTimestamps(sortedList)
|
sharedScreenModel.updateTimestamps(sortedList)
|
||||||
// println("SUR tempo $targetBpm Synchronization terminer et mis à jour")
|
// println("SUR tempo $targetBpm Synchronization terminer et mis à jour")
|
||||||
|
|
@ -788,16 +771,6 @@ actual class FMediaPlayer actual constructor(
|
||||||
try {
|
try {
|
||||||
this.currentGlobalVolume = level
|
this.currentGlobalVolume = level
|
||||||
applyVoiceStates()
|
applyVoiceStates()
|
||||||
/*val volumeInt = (level * 127).toInt().coerceIn(0, 127)
|
|
||||||
|
|
||||||
synthetizer?.channels?.forEachIndexed { index, channel ->
|
|
||||||
if (index < 4) {
|
|
||||||
val vol = if (voiceVolumes[index] != 0f) volumeInt else 0
|
|
||||||
channel?.controlChange(7, vol)
|
|
||||||
} else {
|
|
||||||
channel?.controlChange(7, volumeInt)
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
val mixer = AudioSystem.getMixer(null)
|
val mixer = AudioSystem.getMixer(null)
|
||||||
val lines = mixer.sourceLines
|
val lines = mixer.sourceLines
|
||||||
for (line in lines) {
|
for (line in lines) {
|
||||||
|
|
@ -874,14 +847,6 @@ actual class FMediaPlayer actual constructor(
|
||||||
channels[i].controlChange(11, finalVol)
|
channels[i].controlChange(11, finalVol)
|
||||||
|
|
||||||
if (finalVol == 0) channels[i].controlChange(123, 0)
|
if (finalVol == 0) channels[i].controlChange(123, 0)
|
||||||
/*val targetVolume = voiceVolumes[i].toInt()
|
|
||||||
|
|
||||||
channels[i].controlChange(7, targetVolume)
|
|
||||||
channels[i].controlChange(11, targetVolume)
|
|
||||||
|
|
||||||
if (targetVolume == 0) {
|
|
||||||
channels[i].controlChange(123, 0)
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
// println("SATB $i Volumes: ${voiceVolumes[i]}")
|
// println("SATB $i Volumes: ${voiceVolumes[i]}")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue