fix: reduce Tone.js context.lookAhead to reduce MIDI input latency

This commit is contained in:
Xiaohan-Tian
2025-12-19 12:55:56 -08:00
parent d3a2fe1f8d
commit 4b075e8979
@@ -64,6 +64,9 @@ export class KGAudioInterface {
}
try {
// Reduce lookahead time to 0.05 seconds to improve MIDI input responsiveness
Tone.getContext().lookAhead = 0.05;
// Set up master gain for volume control
this.masterGain = new Tone.Gain(this.masterVolume).toDestination();