V45.5 instrument solo path (Q3 debug): dbg log solo_toggle/solo_apply/solo_kill/solo_guard/play_tracks - lan test toi thay ro trang thai ref + note bi block; C++ [Vst2Sandbox] ON/OFF/CC log trong SandboxVst2Host (Qin chay sandbox, truoc day midi vao Qin hoan toan mu trong bridge.log - chi VST3 log [midi]), v=202608291806

This commit is contained in:
2026-08-29 18:09:16 +07:00
parent 82796417c1
commit 72ae22f865
6 changed files with 16 additions and 9 deletions
+5 -1
View File
@@ -18943,6 +18943,7 @@ const App = () => {
// (setTimeout 60ms restart) thay trang thai PRE-solo -> Qin note van fire
// (tremolo). Render ke tiep tu dong dong bo lai ref.
activeTracksRef.current = effective;
try { if (window.__dbgLog) window.__dbgLog('solo_apply', 'track=' + trackId + ' patch=' + (patch ? JSON.stringify(patch) : '-') + ' n=' + effective.length + ' solo=[' + effective.filter(function (t) { return t.solo; }).map(function (t) { return t.id; }).join(',') + '] muted=[' + effective.filter(function (t) { return t.muted; }).map(function (t) { return t.id; }).join(',') + ']'); } catch (e) {}
let becameAudible = false;
effective.forEach(t => {
const audible = computeTrackAudibleGain(effective, t) > 0;
@@ -18975,6 +18976,7 @@ const App = () => {
if (!audible && wasAudible && isMidiSoundTrack(t)) {
try {
const _isPerc = !!(t.synth_engine && t.synth_engine.soundfont_bank === 128) || !!t.is_percussion;
try { if (window.__dbgLog) window.__dbgLog('solo_kill', 'track=' + t.id + ' tset=' + (((timelinePitchesRef.current || {})[t.id] || new Set()).size) + ' held=' + ((activeMidiPitchesRef.current || new Set()).size)); } catch (e) {}
const _held = activeMidiPitchesRef.current || new Set();
// D18c: timeline MIDI notes (per-track) dang keu - NOTE_OFF tung pitch;
// truoc day chi kill preview keyboard (activeMidiPitchesRef) -> note
@@ -25425,7 +25427,7 @@ const App = () => {
// vua tro nen inaudible (solo track khac / mute) khong duoc phat ra.
const _list = (activeTracksRef.current && activeTracksRef.current.length) ? activeTracksRef.current : (tracksRef.current && tracksRef.current.length ? tracksRef.current : activeTracks);
const _trk = _list.find(t => t.id === trkId) || track;
if (!_trk || computeTrackAudibleGain(_list, _trk) <= 0) return;
if (!_trk || computeTrackAudibleGain(_list, _trk) <= 0) { try { if (window.__dbgLog) window.__dbgLog('solo_guard', 'block ch=' + trkId + ' p=' + (pitch || 60)); } catch (e) {} return; }
// D18c: track pitch dang keu (timeline) - de applyAllTrackMuteSolo kill
// dung note khi track thanh inaudible giua chung (Qin VST2 tremolo).
try { var _tps = timelinePitchesRef.current; (_tps[trkId] || (_tps[trkId] = new Set())).add(pitch || 60); } catch (e) {}
@@ -25497,6 +25499,7 @@ const App = () => {
// FX (khi bật).
try { if (window.__ensureMasteringRouting) window.__ensureMasteringRouting(); } catch (e) {}
const allPlayTracks = activeTracksRef.current && activeTracksRef.current.length ? activeTracksRef.current : activeTracks;
try { if (window.__dbgLog) window.__dbgLog('play_tracks', 'n=' + allPlayTracks.length + ' solo=' + (allPlayTracks.some(function (t) { return t.solo; }) ? 1 : 0) + ' ids=' + allPlayTracks.map(function (t) { return t.id + ':' + (t.solo ? 'S' : t.muted ? 'M' : 'A'); }).join(',')); } catch (e) {}
// Capture items signature at schedule time — updatePlayhead so sánh với
// signature này để phát hiện items đổi vị trí giữa lúc play (re-schedule).
// V28: defer bookkeeping signature — tính đồng bộ chặn main thread trước
@@ -28088,6 +28091,7 @@ const App = () => {
// ── Track Controls ──
const toggleTrackSoloEvaluate = trackId => {
const wasPlaying = isPlaying;
try { if (window.__dbgLog) window.__dbgLog('solo_toggle', 'track=' + trackId + ' wasPlaying=' + (wasPlaying ? 1 : 0) + ' refSolo=' + ((activeTracksRef.current || []).find(function (t) { return t.id === trackId; }) || {}).solo + ' n=' + (activeTracksRef.current || []).length); } catch (e) {}
const playingSubTab = subTabs.find(s => s.isPlaying && s.type === 'PIANO_ROLL');
fxRtKeepForRestart = true; // restart/resume — giữ session FX realtime
stopAllPlayback();