An STM32F103C8T6 based MIDI Controller for MIDI2LR

For those of you who use Adobe Lightroom,  there is a way to use a MIDI hardware ‘box’ to control various Lightroom actions. I am told that once you use the hardware controls you will never want to go back to the software ones. There is a Lightroom plugin called MIDI2LR which interfaces various MIDI ‘boxes’ to  Lightroom. The MIDI box sends MIDI Control/Change commands to MIDI2LR which then changes them into Lightroom actions. More info on MID2LR can be found HERE.

There are several commercial MIDI controllers which do work with MID2LR, however, features and functionality differ. Since the whole idea for using the hardware controls is ease of use and productivity, I would think that Lightroom enthusiasts would want a means of creating a custom hardware solution.

It is actually relatively easy to create an STM32F103C8T6 based MIDI Controller for MIDI2LR. As a proof of concept, I built one on a breadboard to demonstrate what can be done. Here is the design layout:

An STM32F103C8T6 based MIDI Controller for MIDI2LRDownload the Fritzing diagram source code HERE.  And here is what it looks like all wired together:

An STM32F103C8T6 based MIDI Controller for MIDI2LR

The two buttons next to the display are used to control menu selections. The menu is used to set whether the buttons send MIDI Notes or Change/Control commands and also is used to select up to 5 channels.  Therefore with the 8 buttons  x ( 5 channels) x 2 (Note vs. CC commands), there is a possibility of  80 different commands to send to MIDI2LR.  The 5 channels is arbitrary and of course changeable in the code so possibilities are only limited by practicality. When a button is pressed, the MIDI CC/Note is sent to MIDI2LR and displayed on the OLED screen.

The code below was developed and sent to the STM32F103C8T6 via the Arduino IDE:

The Arduino IDE was used to develop and program the STM32F103C8T6. The IDE was also customized to use the Arduino Core for STM32 MCUs. Also note the use of the Adafruit graphics libraries to control the OLED display.

Once the code is sent, just plug in the STM32F103C8T6 via an USB-micro cable to your Windows 10 PC and it will be added as an audio device (no drivers are needed as it is automatically recognized). Install the MIDI2LR plugin and while in Lightroom you can test out the button functions and customize the functionality.

You might say that buttons are OK but dials (rotary encoders) are what is missing.  You are right, that is what is being planned for in the next step of this project. Stay tuned!

1 comment

    • elektrouwe on May 6, 2021 at 10:51 am
    • Reply

    thanx, good stuff !

Leave a Reply

Your email address will not be published.