mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-09-02 09:34:33 +02:00
fix build error
This commit is contained in:
@@ -139,6 +139,9 @@ function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pitchData.midi === targetMidi) {
|
if (pitchData.midi === targetMidi) {
|
||||||
|
// Prevent re-triggering success if we're already in a success state
|
||||||
|
if (feedbackMessage === "Good!") return;
|
||||||
|
|
||||||
if (matchStartTime === null) {
|
if (matchStartTime === null) {
|
||||||
setMatchStartTime(Date.now());
|
setMatchStartTime(Date.now());
|
||||||
} else {
|
} else {
|
||||||
@@ -147,6 +150,7 @@ function App() {
|
|||||||
// Success!
|
// Success!
|
||||||
setFeedbackMessage("Good!");
|
setFeedbackMessage("Good!");
|
||||||
setRevealed(true);
|
setRevealed(true);
|
||||||
|
setMatchStartTime(null);
|
||||||
|
|
||||||
const isRhythmActive = settings.rhythm.active && settings.rhythm.autoAdvance;
|
const isRhythmActive = settings.rhythm.active && settings.rhythm.autoAdvance;
|
||||||
const isTimerMode = settings.rhythm.mode === 'seconds';
|
const isTimerMode = settings.rhythm.mode === 'seconds';
|
||||||
@@ -157,7 +161,6 @@ function App() {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
generateNewNote();
|
generateNewNote();
|
||||||
}, 800);
|
}, 800);
|
||||||
setMatchStartTime(null);
|
|
||||||
} else {
|
} else {
|
||||||
// Rhythm Active AND Auto-Advance
|
// Rhythm Active AND Auto-Advance
|
||||||
if (isTimerMode) {
|
if (isTimerMode) {
|
||||||
|
|||||||
@@ -127,8 +127,7 @@ export const SheetMusic: React.FC<SheetMusicProps> = ({
|
|||||||
const data = getNoteInKey(visualMidi, keySignature);
|
const data = getNoteInKey(visualMidi, keySignature);
|
||||||
const ghost = new GhostNote({
|
const ghost = new GhostNote({
|
||||||
keys: data.keys,
|
keys: data.keys,
|
||||||
duration: "w",
|
duration: "w"
|
||||||
clef: noteClef as 'treble' | 'bass'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add a Question Mark Annotation
|
// Add a Question Mark Annotation
|
||||||
@@ -160,7 +159,7 @@ export const SheetMusic: React.FC<SheetMusicProps> = ({
|
|||||||
if (clef === 'grand') noteClef = getGrandStaffClef(visualMidi);
|
if (clef === 'grand') noteClef = getGrandStaffClef(visualMidi);
|
||||||
const data = getNoteInKey(visualMidi, keySignature);
|
const data = getNoteInKey(visualMidi, keySignature);
|
||||||
|
|
||||||
const ghost = new GhostNote({ keys: data.keys, duration: "h", clef: noteClef as 'treble' | 'bass' });
|
const ghost = new GhostNote({ keys: data.keys, duration: "h" });
|
||||||
ghost.addModifier(new Annotation("?").setVerticalJustification(Annotation.VerticalJustify.CENTER));
|
ghost.addModifier(new Annotation("?").setVerticalJustification(Annotation.VerticalJustify.CENTER));
|
||||||
targetHalfObj = { note: ghost, clef: noteClef };
|
targetHalfObj = { note: ghost, clef: noteClef };
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user