diff --git a/app/static/js/services/soundfontPlayer.js b/app/static/js/services/soundfontPlayer.js index 3dbea9b..e236623 100644 --- a/app/static/js/services/soundfontPlayer.js +++ b/app/static/js/services/soundfontPlayer.js @@ -322,21 +322,11 @@ if (_initialized && _fluidModule) { var key = channel + ':' + pitch; var mappedChs = _activeNotes[key]; - if (mappedChs === undefined) { - if (_activeNotes['_' + key]) mappedChs = _activeNotes['_' + key]; - } if (mappedChs === undefined) mappedChs = [channel]; - if (!Array.isArray(mappedChs)) mappedChs = [mappedChs]; for (var i = 0; i < mappedChs.length; i++) { try { _fluidModule._fluid_synth_noteoff(_synthPtr, mappedChs[i], pitch); } catch (e) {} } delete _activeNotes[key]; - try { - var r1 = _fluidModule._fluid_synth_noteoff(_synthPtr, mappedCh, pitch); - if (r1 !== 0) { - r1 = _fluidModule._fluid_synth_noteon(_synthPtr, mappedCh, pitch, 0); - } - } catch (e) { console.warn("[SonicSF] stopNote error:", e); } } }, @@ -360,7 +350,6 @@ }, _playNoteFluid: function (note, velocity, durationMs, startTime, program, channel, synthEngine) { - console.log("[SonicSF] _playNoteFluid chParam:", channel, "synthEngine:", synthEngine ? synthEngine.soundfont_id + ':' + synthEngine.soundfont_bank + ':' + synthEngine.soundfont_program : 'null'); var midiPitch = Math.min(127, Math.max(0, parseInt(note) || 60)); var midiVel = Math.min(127, Math.max(1, Math.floor( typeof velocity === 'number' ? (velocity > 1 ? velocity : velocity * 127) : 100