Assemble the Uno Host shield, and Midi shield, then upload the firmware to the Uno. Don't forget to set the switch to OFF on the Midi shield, before uploading, then ON again to use it.
For greater simplicity, the HEX files compiled from the latest version are provided to be used with AVRDude.
Plug an USB keyboard in the host shield, a midi cable to the midi out and to a synth. You are now able to use your favorite USB midi keyboard with any standard midi DIN device.
The KikGen Labs proposes again a firmware entirely rewritten for a commercial product. This time it is the Smartpad from Midiplus, which technical characteristics being very close to the Launchpad from Novation.
At this stage, the firmware is an advanced prototype, developed with stm32duino, with all pads, 64 RGB colors, encoders, buttons operationals, including midi. The perspectives offered by this new firmware are vast: fully customized Ableton Live controller, chord generator, autonomous sequencer, master keyboard , etc....
The story of this project starts with a hack of the MIDIPLUS/MIDITECH 4x4 USB to MIDI interface. Needing more midi jacks, I bought a second Miditech interface, but I discovered it was not possible to use 2 Miditech / Midiplus MIDI USB 4X4 on the same computer to get 8x8, and according to the Miditech support, as that usb midi interface was not updateable at all ! I was stucked....That was motivating me enough to write a totally new and better firmware : the UsbMidiKlik4x4 project was born.
The current version V2.5 supports full USB midi until 16xIN , 16XOUT plus routing features, enabling configurables standalone mode, merge mode, thru mode, split mode, midi transformation, midi clock, etc., huge sysex flow, configuration menu from serial USB, and is very fast and stable thanks to the STM32F103. More of that, you can aggregate until 5 3x3 boards seen as one by activating the "Bus mode".
USBMidiKliK4x4 features :
STM32F103C8 / STM32F103CB / STM32F103RB / STM32F103RC uC support
Bluepill and Miditech 4x4 board support
16 MIDI USB IN/OUT
15-16 MIDI JACK IN / JACKS OUT *1
8 Virtual internal IN/OUT
4 midi clock and Midi Time Code generators
Full remote configuration by SYSEX
Configuration user interface from a serial USB terminal
Support of large sysex flow
Complex routing engine allowing to route any IN to any OUT
Transformation pipes allowing dynamic modification of midi messages
Customisable USB device ProductStringName, Vendor and Product Ids
STANDALONE mode (no USB host needed)
INTELLITHRU mode allowing specific routing rules when USB is idle
Stackable interfaces in bus mode to get 6x6 to 15x15 physical midi ports
The "pipeline" feature allows you to modify an incoming midi message through a chain of transformation functions (a "pipe"), e.g., transpose notes, split, map channel to another, map CC to another, etc...New pipes can be easily added in order to obtain complex midi transformations without degrading performances.
Like all of you here, I tried to connect a MIDI interface to the USB Host port of the MPC LIVE, only to find out that the additional MIDI OUT ports are not supported. Only PORTs A and B are visible, C & D indicating always "None".
idVendor 0x09e8 idProduct 0x003b iProduct 2 MPC Live Controller
I quite recently developed a 3 I/O USB MIDI interface, and it allows to modify easily the VendorID and ProductID as well as the "Product String", identifying a USB device on a host system. https://github.com/TheKikGen/USBMidiKliK4x4
So I simply modified the parameters of my MIDI interface, so that it would be seen as an internal AKAI controller.
-===========================================- CURRENT SETTINGS --------------------------------------------- Magic number: MDK7-1.181219.1306 Next BootMode: 0 => Vendor Id: 9E8 => Product Id: 3B => Product string : MPC Live Controller
After plugging in the reconfigured MIDI interface, and rebooting the MPC LIVE, I had the joy of seeing that 4 MIDI ports were now visible A, B, corresponding to the 2 internal MIDI ports, and C, D, corresponding to MIDI OUT 1 and 2 of my interface !! It works !!
In addition, in the setup panel, you can see all MIDI OUT ports in the synchronization options. I haven't done any in-depth tests, but all MIDI OUT ports work directly, either on the tracks or in MIDI Clock sync.
Based on a STMF103 Bluepill I bought 2$, I have designed a board that allows a 3 in / 3 out MIDI USB interface, compatible with the firmware i wrote for the MIDIKLIK 4x4.
The idea
I currently own 2 MIDI 4X4 from Miditech/Miduplus manufacturer.I thought it was possible to stack the 2 on the same PC to get 8x2 ports IN/Out. But as theses devices have exactly the same product and vendor ID, and no serial, it is in fact impossible to do that without conflicts (it seems however some people installed 2 MIDI 4X4 succefully on the same computer...). So the only alternative was to buy a 8x8 interface to the same manufacturer, for the three times the price of the MIDI 4x4 that I did not.
More, recently, one of my interface started to work incorrectly, invoking to me a corrupted firmware.
I asked to the Miditech and Midiplus support and they were enough kind to provide to me an updated firmware kit, but for the NEW version...Happy to learn that my interface was the "old" one, however still sold on many web sites today...I tested that update package without any success...My version was not updatable at all they said.
I could'nt accept that a device (almost) still in order with USB, 8 ports 4IN - 4 OUT goes directly in the trash bin. Nothing to loose, I opened the box, and inside I discovered that the microcontroller was a STMF103RC, a very common uC on musical gears(the Arturia Minilab and the Novation launchkey and launchpad are using it for example).
Here start the idea of a possible hack :I have a board available with a programmable and powerfull chip, native USB, plus all the circuitry for 4 MIDI IN / 4OUT.Why not rewriting a new firmware from scratch as I did for other uC like of the AVR family ? I could even extend that firmware to enable merge mode, thru mode, specific routing and filtering modes.So, building an ultimate USB MIDI interface better than the original....
First steps
The STMF103 has an internal bootloader working with the UART Serial 1. The bootloader mode is activated by maintaining the Boot0 pin to HIGH and the Boot1 pin to LOW. So I desoldered 2 resitors on the board because they were disabling that mode,made a small reset button / "boot1 HIGH" circuit, and soldered the boot 0 to ground.
I also connected TX and RX of the serial 1 to a small plug. That was easy because some large labelled TXn / RXn pads exist on the MIDI4x4 motherboard. I connected that plug to an USB Serial TTL, and 2 H later, I was able to upload a new firmware in the thing.
The original Miditech / Midiplus firmware is protected against read. I had to accept the "The chip will be entirely erased if you continue.." warning. Not a problem as hacking the existing firmware was not my goal at all.
STMDUINO
To preserve and reuse my existing software libraries, I choose to use STMDUINO.
It is port of the Arduino platform to the ARM STM32 chip
family from ST Micro. So you can develop "sketches" as usual, with the
Arduino IDE, and reuse your existing "Arduino" code.
I flashed a modified STMDuino generic bootloader2.0 to the board with STMFLASH, and tested the 4x4 board as a generic STMF103RC in the Arduino IDE... my MIDI demo sketch worked at the first compilation...And I could address the 4 serial ports connected to midi jacks.
I have rewritten entirely the firmware from a white page, and I have extended its features to enable routing : "4 merge" mode, thru mode, split mode, etc, So I can say my modified USB interface 4X4 is now better than the original, very stable, and, the most important stackable with my existing one as I changed, obviously, the Product ID !
The STM32F103 is really really fast...no lag at all, even at 300 BPM with 4IN/OUT working. At this time, I use the box with the new firmware in my MIDI setup :-) !
You need to modify the board to enable the internal bootloader of the STM32F103. To do that, start by unscrewing the front plate of the case, and remove the board from the case.
- Remove the R28 resistor because it's disabling the bootloader standard mode. Connect a 10K resistor between the boot1 pin and the ground as shown.
- Solder a wire to the Boot0 pin, and another to the VCC 3,3V pin. Connect the wires together. This can be removed after the STMDuino bootloader download
- Plug your TTL to Serial USB stick
- Plug the Miditech/Midipplus board into the USB
- Launch STM Flash loader demonstrator (if you don't have it , check the ST Micro. web site) and reset the Miditech/Midiplus board by by touching the RST tap point and the ground (for example the USB plug shield). As the chip is in bootloader mode, you will, or hear nothing...
- Connect TTL RX 1/TTL TX1 from the Miditech/Midiplus board to the TTL RX/ TTL TX of your serial USB converter. You can solder 2 wires to the pads clearly labelled on the board it self, or just hold the wires with the left hand and do the rest with the right one !
- Choose the right serial port in the list proposed by STMFlash tool the click on "Next"
At this point, it is still time to stop. After that step, not return possible !!!!!
- You will see a red warning indicating that the firmware is protected, and going further will erase it. So, if you are really sure, click on "Remove protection". The existing Miditech/Midiplus firmware will be entirely erased.
- Click next, and choose the "midiplus4x4_boot20.bin". This is the STMDUINO bootloader,especially modified for the Miditech/Midiplus board (notably to activate the USB with a DISC command on PA8). Check "Optimizer", "Global Erase", and "Verify after download", then "Next". The download will start, and if everything is ok, you will have a message confirming that the the update was done correctly.
- Unplug, and plug agin the Miditech/Midiplusboard : that will activate the STM32DUINO perpetual bootloader mode. If the blue led is flashing, you are ready to use the Arduino IDE with that board !
I own an Electribe Korg for some time and I have to say that I really like this gear. First because it is fast to handle, and second because it has a very special sound despite its relative low sampling rate comparing to current standard. I still use it in 2018, in the middle of much more elaborate gears (sometime too much elaborate !).
The Electribe ES1 is however quite limited in functionality, and on one point in particular: its inability to play a sample chromatically with an external midi keyboard. Close to my other Volkaoss project, I quickly realized a MIDI notes to Electribe ES1 Pitch Control changes with an Arduino Uno board. Everything worked perfectly, and I was able to play a sample chromatically with an external Midi keyboard BUT....
But to my surprise the Electribe recording mode does not take into account a pitch transmitted to the MIDI IN. Only PITCH potentiometer movements are recorded to change sample pitch in a pattern. This is when the idea of controlling these movements with a midi keyboard connected to an Arduino came up...graft an Arduino to the ES1 like the Borg do in Startrek !
To do this, I chose to develop on an Arduino nano board, because of its small factor, and to use a Microchip MCP4151 digital potentiometer, with a resolution of 256 steps, which is enough to manage 127 positions on the PITCH potentiometer.
Full source project on my gihub here.
The schematic is really simple : The MCP4151 uses SPI, an that can be tricky on the Nano : notably the
fact that MISO (pin 12) must be pulled up to MOSI (look at the 1K resistor). That was working
perfectly on the Uno proto board without that, so I suppose it is mandatory when using SPI on the Nano (whatever, it is required by SPI usually).
As you can see on the schematic, the analog PITCH pot wiper pad is connected to the Nano Analog2 pin and disconnected from the ES1. So, the Nano is able to read pot values and to resend them to the MCP 4151 digital potentiometer. That was the first step of this project : be transparent, as shown on that video :
Next, I had to develop a new Arduino firmware to simulate potentiometers movements, when pressing a note on the MIDI keyboard. That was not so easy as the 256 steps of the MCP4151 seem a bit short to address the only 127 values but from an analog pot with an infinite resolution. After fine tuning sessions, I finally got a very acceptable result, and I'm now able to record samples pitch on the Electribe from an external midi keyboard.
The Arduino Nano is fully embedd in the Electribe case, and works as the "man in the middle" behind the ES1 MIDI IN jack. It filters and eventually transforms every midi messages sent to the Electribe MIDI IN jack and resends such messages to the ES1 CPU .
I had to tap directly on the ES1 motherboard but hopefully that was easy as there is a lot of space between pads you can tap in. (Hires pictures can be found on the GitHub project site).
Using BorgTribe
At the boot time, The Nano takes the hand and asks the global parameters of the ES1 via a system exclusive message. Then it autoconfigures everything, notably MIDI notes part affectation by resending the sysex modified to the Electribe ES1. So the only thing to really configure is the midi channel. After power on, the Electribe has a standard behaviour ("Classic" mode), as the Nano resend everything coming from midi IN and/or the analog Pitch potentiometer.
The C0 midi keyboard key is the "command key".
When you hold the command key and press a function key, that will send a specific command to BorgTribe, confirmed by parts flashing n times.
Setting modes : C0 + D0
3 Modes are available :
1- Classic mode : the standard Electribe one
2- Midi Pitched notes : Convert notes received on MIDI IN to Pitch control changes. In that mode, you can't record pitch in the Electribe, but useful when in playing mode, because it acts like a transpose function with the current selected part.
3- Potentiometer Pitched notes : Convert notes received on MIDI IN to potentiometers movement. In that mode you can record pitched notes in the current pattern, in the same way you do by moving manually the pitch potentiometer.
Mode alternate each time you send the command. The parts will flash a number of time corresponding to the current mode.
Setting full velocity : C0 + E0
This disable the velocity sensitivity and set the value by default to 127 (max). This reproduce the Electribe pad behaviour.
Clear current pattern : C0 + F0
This command clears the current pattern. It is necessary to confirm the command by sending it a second time when the parts are flashing 5 time.
Auto tune Key : C0 + F0#
This command attempts an autotuning by comparing default internal note/tune tables with midi CC pitch values. It is necessary to confirm the command by sending it a second time when the parts are flashing. Still experimental.
Reset BorgTribe : C0 + B0
This command proceed a soft reset of the Arduino Nano. It is necessary to confirm the command by sending it a second time when the parts are flashing.