Fix: DC Farany DC
This commit is contained in:
commit
df5e8567cd
1 changed files with 9 additions and 9 deletions
|
|
@ -3,13 +3,16 @@ package mg.dot.feufaro.midi
|
|||
import SharedScreenModel
|
||||
import kotlinx.coroutines.*
|
||||
import mg.dot.feufaro.getConfigDirectoryPath
|
||||
import mg.dot.feufaro.viewmodel.MidiMarkers
|
||||
import java.io.File
|
||||
import java.util.prefs.Preferences
|
||||
import javax.sound.midi.MetaMessage
|
||||
import javax.sound.midi.MidiSystem
|
||||
import javax.sound.midi.Sequence
|
||||
import javax.sound.midi.Sequencer
|
||||
import javax.sound.midi.ShortMessage
|
||||
import javax.sound.midi.Synthesizer
|
||||
import javax.sound.midi.Track
|
||||
import javax.sound.sampled.AudioSystem
|
||||
import javax.sound.sampled.FloatControl
|
||||
|
||||
|
|
@ -291,7 +294,6 @@ actual class FMediaPlayer actual constructor(
|
|||
(dcGPattern.matches(mk.trim()) ||
|
||||
dcRegex.matches(mk.trim()))
|
||||
}
|
||||
|
||||
if (hasDcAfter) {
|
||||
navigationSteps.add(
|
||||
NavigationStep(
|
||||
|
|
@ -482,13 +484,11 @@ actual class FMediaPlayer actual constructor(
|
|||
synthetizer?.channels?.forEach { it?.controlChange(64, 0) }
|
||||
sequencer?.tempoFactor = 1f
|
||||
|
||||
navigationSteps.filter { it.isFin }.forEach { faranyStep ->
|
||||
if (step.gridIndex > faranyStep.gridIndex) {
|
||||
faranyStep.finActive = true
|
||||
faranyStep.alreadyDone = false
|
||||
navigationSteps.filter { it.isFin && step.gridIndex > it.gridIndex }
|
||||
.forEach {
|
||||
it.finActive = true
|
||||
it.alreadyDone = false
|
||||
}
|
||||
}
|
||||
|
||||
if (sequencer?.isRunning == false) {
|
||||
sequencer?.tempoInBPM = targetBpm
|
||||
sequencer?.start()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue