fix(build): remove extra brace at L6795, Babel build now succeeds; feat(ai-copilot): rows=4, resize-y, cursor-aware ArrowUp/Down

This commit is contained in:
2026-07-27 16:36:26 +07:00
parent 4ed0b1e5be
commit 095a0680e8
3 changed files with 27 additions and 22 deletions
+17 -18
View File
@@ -6759,24 +6759,24 @@ const App = () => {
setActiveMidiPitches(new Set(activeMidiPitchesRef.current));
// Stop previous notes on this channel before playing new note
// Only send All Notes Off when sustain pedal is not active
{ if (window.SonicSF) {
const ch = msg.data[0] & 0x0F;
if (!window.SonicSF.sustainActive || !window.SonicSF.sustainActive(ch)) {
try { window.SonicSF.controllerChange(ch, 123, 0); } catch (e) {}
}
const arSub = subTabsRef && subTabsRef.current && activeTabRef && subTabsRef.current.find(s => s.id === activeTabRef.current && s.type === 'PIANO_ROLL' && s.isArmed);
if (arSub) {
window.SonicSF.playNote(pitch, velocity, 60000, undefined, arSub.instrumentProgram, null, ch, arSub.synth_engine);
} else {
const armedTrack = activeTracksRef.current ? activeTracksRef.current.find(t => t.isArmed) : null;
if (armedTrack) {
const prog = armedTrack.instrumentProgram;
const se = armedTrack.synth_engine;
const dest = activeTrackNodesRef.current[armedTrack.id]?.gainNode || null;
window.SonicSF.playNote(pitch, velocity, 60000, undefined, prog, dest, ch, se);
if (window.SonicSF) {
const ch = msg.data[0] & 0x0F;
if (!window.SonicSF.sustainActive || !window.SonicSF.sustainActive(ch)) {
try { window.SonicSF.controllerChange(ch, 123, 0); } catch (e) {}
}
}
} }
const arSub = subTabsRef && subTabsRef.current && activeTabRef && subTabsRef.current.find(s => s.id === activeTabRef.current && s.type === 'PIANO_ROLL' && s.isArmed);
if (arSub) {
window.SonicSF.playNote(pitch, velocity, 60000, undefined, arSub.instrumentProgram, null, ch, arSub.synth_engine);
} else {
const armedTrack = activeTracksRef.current ? activeTracksRef.current.find(t => t.isArmed) : null;
if (armedTrack) {
const prog = armedTrack.instrumentProgram;
const se = armedTrack.synth_engine;
const dest = activeTrackNodesRef.current[armedTrack.id]?.gainNode || null;
window.SonicSF.playNote(pitch, velocity, 60000, undefined, prog, dest, ch, se);
}
}
}
} else if (cmd === 0x8 || (cmd === 0x9 && velocity === 0)) {
activeMidiPitchesRef.current.delete(pitch);
setActiveMidiPitches(new Set(activeMidiPitchesRef.current));
@@ -6792,7 +6792,6 @@ const App = () => {
window.SonicSF.stopNote(ch, pitch);
}
}
}
// Sustain (CC64), Modulation (CC1), Pitch Bend
const midiCh = msg.data[0] & 0x0F;