A MIDI piano keyboard controller for SDR Console
--Peter Klein, KD7MW
March 2025

Here is a SDR Console XML file that repurposes a MIDI piano keyboard as an SDR Console controller. There are many such keyboards available. Two octave keyboards are plentiful and cheap. So I've set up all of the usable receiver commands in two octaves, from Middle C (note # 60) and up. I don't have an SDR transmitter, so I didn't implement transmit commands. They can easily be added to an additional octave if you have a larger keyboard. Or you can use the keys I've left disabled.

** Files included in this Zip file ***
MidiKbd.txt		This file
MidiKbdPaneSDRC.png	A screen clip of SDR Console's MIDI window 
MidiKbdSDRC.png		A graphic "cheat sheet" of my mappings. 
			MIDI Note numbers are at the top and bottom
SDR-MidiPiano.xml	The MIDI mapping XML file for SDR Console


** SETUP **  

Copy the file SDR-MidiPiano.xml to the folder where SDR Connect expects to find its MIDI configuration. That defaults to Documents, but I suggest creating a subfolder under Documents. I called mine SDRConsole. You will need to open the file in a text editor (such as NotePad). Do a search and replace and change my Device Name (Xkey37) to whatever SDR Console sees as your keyboard's name. Be sure to keep an unaltered copy of the file in case you make a mistake. Be careful not to disturb anything else in the file, especially the double quotes surrounding each parameter.

Then, in SDR Console, go to Tools, Options, Controllers, MIDI. Click the Load From button, point the App to the folder you used, and double click on the SDR-MidiPiano.xml file. 

** DETAILS ***

I have not found a way to implement repeating keys.  Some keyboards have them. Mine doesn't. There probably is a way to create repeating keys using a drum pad programmed to lay down a beat or a drum roll. This will require programming your device with tempos (speeds) appropriate to the step rate.

A piano keyboard is a digital musical instrument. It's very different from a control surface that sends a single command with each button press. Each time you press a piano key, the device sends multiple MIDI "events" (commands). They include a Note On event, which includes a Velocity byte, followed optionally by several Aftertouch events that include a key Pressure byte, and finally a Note Off. On my keyboard, and most others, Note Off is just a Note On event with a Velocity of zero. 

All but the Note Off event include Velocity and Pressure values that vary, so they are unsuitable for SCR Console's MIDI interpreter. Fortunately, SDR Console ignores them. So we use the Note Off commands, which are consistent. The command is sent when you release the key rather than when you press it. 

If your keyboard is like mine, my XML file mappings should work as is. If not, you can use SDR Console's MIDI setup window to capture a key's output. If necessary, edit the XML file to match the Note Off events. The note number is the Index value in decimal numbers. The Channel, Value, and ValueMax fields whould all be zero, and the Modifiers field should be just two double quotes with nothing in between them. I know Simon advises us not to edit the XML file, but often this is easier than trying to get the MIDI setup window to implement the correct command out of the several that are sent.

Tuning is a three-fingered affair. Put your right index finger on the G in the second octave (note #79). The next two fingers will naturally fall into place on the adjacent white keys. Your index finger moves the frequency up at the set step rate. The middle finger moves up by 10x, and the ring finger by 100x. To tune down, move those three fingers to the black keys immediately to the left and slightly above. This is easier to do than it is to describe. If you play piano, you'll see that tuning up is in the key of G major, and tuning down is in the key of F# major.

The fine tune (1/10x) keys are the E and D white keys just below (notes 76 and 74). The filter keys work like the tuning keys: a white note moves the filter edge up, the next lowest black key moves it down.  Other commands are just pairs of adjacent keys. Again, don't hold the keys down, just tap and release as many times as needed. 

A graphic "cheat sheet" of the keyboard mappings is included in this Zip file: MidiKbdPaneSDRC.png .  The key layout I chose made sense to me as a musician. If you don't like it, you can swap note numbers around in the XML file. They are in the "Index" column, between double quotes.
