Open ffabreti opened 1 year ago
This is going to be great.... Looking forward for the rest
(hijacking this great guide, thanks @ffabreti) Does this also work with Harley Benton MP-100?
I will answer this myself - YES, it does work with Harley Benton MP-100 too.
Good job guys! I am also looking forward for the rest of the explanation.
Hello folks,
In my fork of the project I expanded the documentation a bit on the topics of setting up Python and loading the CSV config and the firmware. It's over here. Hope this helps!
I also created a pull request to get it into the main project but I suspect that harvie256 might be busy these days as he hasn't been very active here recently :)
Thanks @eliericha I've merged the pull request.
Yes sorry, I've been in a field camp for the last couple of months so haven't been active of any projects!
No worries, thanks @harvie256 !
So, you have gotten a MIDI Commander...
...and you have hit lots of limitations, so frustrating to get a good piece of hardware with a crappy software. But wait, that's not all, MeloAudio site seens to be heading the same crappy way. Enters midi-commander-custom. Harvie256 was kind enough to share his knowledge of reverse engineering poor firmwares and improving over it. But where do you begin ? You know nothing about C++ or Python and you just want to make music! Keep reading...
Firmwhat ?
First of, you need to understand a firmware is a bridge between a hardware and another software. In this case, when you press a button with you feet, the firmware will send a MIDI command thru a physical interface (5 pin MIDI or USB) to a computer, an Ipad, an amplifier or any other piece of software inside a hardware you want to control.
The problem with MIDI Commander is that it's firmware has very little functionality and installing midi-commander-custom will allow you to overcome those limitations.
According to Harvie256, this software is written in an area not used by the original firmware, what makes very easy to revert the changes if you need to get back to the original initial state.
How it works...
Great, let's understand how this software works. Midi-commander-custom is made of 2 parts:
The Midi-commander-custom-firmware
You can find this piece of software in DFU/DFU_OUT probably in a file named like
generated-20220424-163714.dfu
This is the piece of firmware that needs to be loaded to your MidiCommander device flash memory so that it will accept the configuration loaded by the Python-script later. To achieve this, you need to use a software like DfuSe (I used it on Windows 10) to upload this project DFU file into your MidiCommander device. This issue #16 has references to download, install and fix the DfuSe install on Windows, the procedure to upload the image is inside de DfuSe software. Be very carefull to exactly follow the steps.Because MeloAudio site seems to be down, you may be need instructions on how to put you device in DFU mode:
The CSV config file used by the Python-script
The "Comma-Separated Values" file is where the user interacts with
midi-commander-custom
defining a configuration that will change the default behavior ofMidi-Commander
device. This CSV file is easily edited on Google-Sheets (or Excel) and the user may alter some arguments that will end-up at the physical memory ofMidi-Commander
and that will be read by the firmware device when it turns on. Remember to save the file as CSV (that is a text format) and NOT as XLS or similar binary format. It is important to say that the CSV file must not be edited at will, because it is a formatted file where the Phyton script will be expecting some sections and some fixed keywords so that it can read the user inputed configSections on the file start with a * Let's walk through each section of the CSV file
Global_Settings
Here you can define
MIDI_Channel
,RealTime_Passthrough
andConfigName
. Not sure what the first two are supposed to mean, but theConfigName
is the name that will show-up in the LCD display ofMidi-Commander
. Be careful with the length ofConfigName
because the display supports few characters.Bank_Naming
Banks are like pages where you can write a config that will be acting over the 8 buttons
Midi-Commander
have. The 2 buttons at the right (UP and DOWN) are used to change between banks. As each bank have a specific config you can have and you may have 10 banks withmidi-commander-custom
, you can have 10 differents pages (banks) to produce 10 differents scenarios controlled by the same set of 8 buttons. So banks can have names that are shown at the LCD display when selected, so that you can realize which scenario you are current working on. Those names are defined in the parametersBank_Name_Large
andBank_Info_Small
Button_Settings
Midi-Commander
output to the other physical connected device input. A MIDI message is composed of a Command and a Channel. Of course MIDI messages carry aditional info to configure the command to be executed on the channel. All of it can be customised bymidi-commander-custom
:PC (program change)
CC (control change)
Note (note to play)
PB (pitch bend to execute)
Start
Stop
The Python Script
The Python Script CSV_to_Flash.py is used to convert and load the SpreadSheet that holds user configs into the physical flash memory of MidiCommander device. I supose there is a specific part of the flash memory that (besides holding the firmware) holds the configuration that will be active when the user press a button. That is exactly where the python script will write the config provided by the spreadsheet.
The script is then run from a terminal (I recommend a Linux virtual machine, not Windows WLS) taking as the only argument the spreadsheet path:
python /some/path/CSV_to_Flash.py my_spreadsheet_config.csv
Note: after you edit your spreadsheet, save it as a CSV file. That is the format of the file expected by the script. Do not save it as XLS or XLSX because it will not work as an input the the python script.
continues...