diff --git a/src/IO/MidiConnection.ts b/src/IO/MidiConnection.ts index e51793f..c486dc2 100644 --- a/src/IO/MidiConnection.ts +++ b/src/IO/MidiConnection.ts @@ -72,7 +72,7 @@ export class MidiConnection{ const timeoutId = setTimeout(() => { output.send(noteOffMessage); delete this.scheduledNotes[noteNumber]; - }, durationMs); + }, durationMs - 100); this.scheduledNotes[noteNumber] = timeoutId; } else { diff --git a/src/main.ts b/src/main.ts index 63095c5..7acfbf6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -252,6 +252,7 @@ export class Editor { if (event.ctrlKey) { this.api.script(keycode - 111) } else { + this.changeModeFromInterface("local"); this.changeToLocalBuffer(index); } } @@ -365,6 +366,8 @@ export class Editor { this.loadUniverse(query); this.buffer_search.value = ""; this.closeBuffersModal(); + // Focus on the editor + this.view.focus(); } } });