Hi Hidehiko
Does your? keyer send MIDI ?
Here is a small arduino code that reads a morse-key? and sends MIDI to the usb-port. I have not tried on Windows but it works on several linux versions.
//---- Code begin ----
#include "MIDIUSB.h"
// keyer to MIDI for Quisk, Requires an Arduino Leonardo or Due
// nja 2-nov-2022
const byte ledPin = 13;
const byte interruptPin = 2; // keyer connected ti this pin
volatile byte state = LOW;
void setup() {
? Serial.begin(115200);
? pinMode(ledPin, OUTPUT);
? pinMode(interruptPin, INPUT_PULLUP);
? attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
}
void blink() {
? state = digitalRead(interruptPin);? // l?s status p? interruptpinden
//??? Serial.println(state);
? if (state == 1) {
??? keyDown(); }
? else {
??? keyUp();
? }
}
void keyDown() {
// Key the transmitter
? noteOn(0, 60, 64);?? // Channel 0, middle C, normal velocity
? MidiUSB.flush();
}
void keyUp() {
// Unkey the transmitter
? digitalWrite(ledPin,LOW); //turn off the LED
? noteOff(0, 60, 64);?? // Channel 0, middle C, normal velocity
? MidiUSB.flush();
}
void noteOn(byte channel, byte pitch, byte velocity) {
? midiEventPacket_t noteOn = {0x09, 0x90 | channel, pitch, velocity};
? MidiUSB.sendMIDI(noteOn);
}
void noteOff(byte channel, byte pitch, byte velocity) {
? midiEventPacket_t noteOff = {0x08, 0x80 | channel, pitch, velocity};
? MidiUSB.sendMIDI(noteOff);
}
void loop() {
//? digitalWrite(ledPin, state);
}
//---- Code end ----
Hope this helps.
de oz9ny, niels