diff --git a/static/scripts/inputs.mjs b/static/scripts/inputs.mjs index 098a5e3..e3e2e21 100644 --- a/static/scripts/inputs.mjs +++ b/static/scripts/inputs.mjs @@ -142,7 +142,7 @@ export class MIDI extends Input{ // Turn off keyboard mode output.send([0xB0, 0x00, 0x00]) - // MIDI only supports 7-bit values, so we have to divide ditduration by two + // MIDI only supports 7-bit values, so we have to divide dit duration by two output.send([0xB0, 0x01, this.ditDuration/2]) // Send keyer mode diff --git a/static/scripts/outputs.mjs b/static/scripts/outputs.mjs index b6f6f4d..bf32f37 100644 --- a/static/scripts/outputs.mjs +++ b/static/scripts/outputs.mjs @@ -357,7 +357,7 @@ class MIDIBuzzer extends Buzzer { let ms = when?when - Date.now():0 setTimeout( () => { - for (let output of this.outputs) { + for (let output of (this.outputs || [])) { output.send(message) } },