vendredi 30 mars 2018

Hack of the MIDIPLUS/MIDITECH 4x4 USB MIDI

 

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.  

SMTDUINO

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 :-) !

The code is easily adaptable to any other multi-jack USB interface.
https://github.com/TheKikGen/USBMidiKliK4x4


Uploading the STDMDuino modified bootloader

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 !








Read More

dimanche 11 mars 2018

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.

Notes affectations start from C2 (C2 = Part1, C2# = Part2, D2 = Part3, etc...)

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.



Read More

samedi 10 mars 2018

Résultat de recherche d'images pour "Arduino"Résultat de recherche d'images pour "midi logo"

As other project, like HIDUINO, or MOCOLUFA (thanks to them for inspiration), USBMIDIKLIK allows your Arduino board to become a very reliable MIDI IN/OUT USB interface. Despite the very good work done on these projects, i was facing some issues... An heavy MIDI traffic was blocking the serial, and some MIDI messages were purely ignored by the parser, like the song pointer position for example... more, these projects rely on a quite old version of the LUFA library.
USBMidiKliK uses interrupts and ring buffers to ensure that (fast) USB to (slow) midi transfers are reliable, plus a "more transparent as possible" midi parser. MIDI product device name is integrated in the makefile, and can also be modified by sysex...so easy to change.
This firmware is uploaded in the ATMEGA8U2 chip managing the USB, and changes the default USB serial descriptors to the MIDI ones. For more convenience when updates are needed, a "dual mode" is embedded, allowing to switch back to the USB serial : when the PB2/MOSI pin of the ATMEGA8U2 is connected to ground, the Arduino is a classical one again, and you can change and upload a new firmware in the ATMEGA328P (UNO) with the standard Arduino IDE.e Arduino.

This is a full open source project.
More detail on my GitHub HERE
Read More

samedi 9 septembre 2017

Volkaoss video demo

Thanks to Lucas, a lived video demo of the Volkaoss...



Read More

mercredi 28 juin 2017


I bought recently a Roland  SP 555 SAMPLER.   I like this specific model, because it has a "loop capture" feature making sampling live more easy.  But guess what ?  DRIVERS ARE NOT WORKING UNDER WINDOWS 10.

Why do I need drivers you think ?  THE SP 555 can be used as a sound card with a specific USB driver, and it works with ASIO also.  So when  you play a sound file on your computer, you can sample directly via USB, without degrading the quality of the sound.  On the other hand, it is more usefull than filling the CF card in "blind" mode.
+ the USB can be also used as MIDI IN/OUT.
+ updates  need USB MIDI

Spending one hour to test all drivers versions, WIN7, WIN7 64bits, VISTA, XP, WIN8,...nothing worked.  The SP 555 was here in the device manager, but with the infamous question mark...

So I spent one more hour to modify the .INF files of the WIN7 64 bits version, disabled the driver protection mode of WIN10, and everything is now working like a charm !!!

- SP-555 is recognized by Windows
- The SP-555 is seen as a sound card
- I can use the windows mixer to set the default output to SP 555
- MIDI IN and OUT is perfectly working with USB : I did the update to 1.4 version

Procedure to install drivers on Windows 10 - 64 bits:
  • Turn OFF SP-555 and connect it with a USB cable to your computer
  • Open a CMD window in admin mode and accept the warning from Windows (type CMD on the search bar and use the right click to launch in administrator mode)
  • Give the following 2 commands:
    bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON
  • Reboot your computer
  • Turn on SP-555 and open device manager and look for SP-555 "unknown device"
  • Download drivers modified by me HERE
    (ignore the error message if you have one and click on Download)
  • Unzip files with 7ZIP in a directory of your choice
  • On the device manager, on SP-555 device,  right-click->properties->driver->update->don't search->have disk and goto folder where you extracted the driver. Ignore the warnings in RED and install.
  • Return to the initial state of signed drivers by opening again a "cmd" as admins and give the following 2 commands:
    bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING OFF
  • Reboot the system
    Done !
Read More

jeudi 16 février 2017

Hi all Roland fans,

After collecting all sort of things and tips for my vintage Roland gears, and to preserve availibility of some drivers, updates and documents, I made all my stuff available for download here !!

You fill find in that Google drive share :

Gear Comments
MC-909
https://drive.google.com/drive/folders/0B3PzgxleWwMIUldJOXh0T051R2c

Sampling Groovebox.  All docs, drivers, firmwares, manual, y.c. service manual, and softwares. + a Cubase txt mixermap I made for the last firmware version (more sounds)
SP-606
https://drive.google.com/drive/folders/0B3PzgxleWwMIcEJYR1NPWDFzR1U

Sampling workstation. All docs and special drivers for WIN 64. Drivers tested with Win 10 64. Fully works including USB audio IN !
SH-201
https://drive.google.com/drive/folders/0B3PzgxleWwMIQkJMeVY5RWtaNVU

DSP analog Synth. All docs and special drivers for WIN 64 (tested for Win 10 64 with USB Audio Out). VST editor plugin des not works properly with 64 bits VST hosts,even with JBridge;; + a Cubase mixermap (txt) I made for that synth.
JX 305
https://drive.google.com/drive/folders/0B3PzgxleWwMIamM3VlJweG1NSUE

Groovesynth. Very good synth. The MC 505 sounds but with a keyboard and a split/dual mode. All docs and firmwares.+ a working Cubase txt mixermap I made.
MC 307
https://drive.google.com/drive/folders/0B3PzgxleWwMIOUFVZC1zRmlacXc
MC-09
This groovebox is really underrated. It is exactly the same sounds as the famous MC-505 but in a smaller size. All docs and firmwares ! + a working and complete Cubase mixermap txt.
https://drive.google.com/drive/folders/0B3PzgxleWwMIXzFpZmxNcUd1Qjg

Looper and TB-303 DSP emulation. This little box is really fun !
I love it. All docs, software and the rare service manual.


Read More

vendredi 2 décembre 2016


"Volkaoss" (VK if you don't speak Klingon) is a MIDI controller / converter allowing you to play MIDI notes on your Kaossilator Pro 3 as a mono synth, and to use the Volca Sample as a GM drum machine on the MIDI channel 10.   This is a totally plug and play solution, without soldering, based on the famous Arduino platform.

Quick setup :

Arduino hardware

You can search on Ebay for "Aduino Uno" and "Arduino MIDI SHIELD".
For example : Arduino Uno from UK  and Arduino Midi shield from HK .
It should cost less than 15 €, shipping included.
You simply have to put the Midi shield into the Arduino Uno socket. That's all you have to do !!

Firmware (sketch) download and uploading to the Arduino.

Download the Volkaoss binary firmware BETA1 for Arduino Uno here.  This is a beta version, so you know what it means !   To push the bin firmware to the Arduino, you will need the excellent XLOADER utility , from Russemoto.  Arduino is usually found on COM 4 or COM 5 after you have plugged the USB cable.

I don't publish the sources because that was a lot of work, and it needs cleaning and formatting. I will probably do in a next future, if users like Volkaoss. For the moment, if you want to support Volkaoss, you can donate !


MIDI setup

The kaossilator must be set to 4 octaves, scale must be chromatic. The Key is usually better fixed to C minus. The receiving MIDI channel is 11 by default. It must be set to 11 in Midi / MSSG / GL.CH else the koassilator will not receive messages from Volkaoss.  The bank A,B,C,D buttons must be configured to  C2, C#2, D2, D#2.  This is the default configuration.
Kaossilator pro Control change # are (corresponding to Kaossilator default factory) :
  • 92  pad on/off control change
  • 12  pad X control change
  • 13  pad Y control change
  • 90  GATE ARP on/off control change
  • 91  GATE ARP speed Control change
  • 93  GATE ARP time  Control change
You can change these in the Kaossilator Midi setting menu.
    TIPS : If you want to store permanently your Kaossilator configuration,  set your key, scale, and range , and store them in to a program bank.  Then save programs to bank 0, and again ALL to bank 0. At the next boot, you kaossilator will be ready to use with Volkaoss.

    The firmware covers both Kaossilator Pro 3 / Pro 3+ and the Volca Sample. You need a splitter cable to control the 2 devices at the same time. Otherwise, simply use a classic midi cable if you own only one of these devices.
    • Plug the MIDI OUT of your keyboard to the Midi IN of the Volkaos. 
    • Plug the splitter cable to the MIDI Out of the Volkaoss.
    • Plug first out of the splitter to the Midin In of the Kaossilator pro, and the second one to the Midi IN of the Volcasample.
    • Plug a +5V power supply or a USB cable to the Arduino board, then choose some samples on parts 1-10 of the Volca Sample.

    Testing

    On the kaossilator, choose the piano patch (A42), and send notes to the channel 1, beyond C1. You should hear a piano sound and see the green light on the pad.
    Send notes from C2 to the channel 10 : you should hear the Volca sample sounds.

    VK global commands

    You can use the following commands on the channel 16, dedicated to VK configuration.:
    • Save current configuration permanently to the EEPROM
    • Reset to factory default : Midin 1, Out 11, transpose 36, PAD Y 64 for the Kaossilator. No activated midi in channels for the Volca sample. Debug mode off.
    • Toggle Debug : activate/ inactivate debug mode. The debug mode sends messages to a terminal connected to the serial port at 115200 bauds.  If you need to boot this debug mode activated, you must save the current configuration.  When debug is on , your midi equipment could react to what is sent to the serial port, especially at boot time, because midi out and terminal are sharing the same serial port.  So don't forget to set debug OFF in normal conditions.
    • Soft reset : reboot Volkaoss (soft reboot is not exactly the same as pushing the reset button).  You can use this command to apply what you saved, or simply to reset the Volkaoss remotely from your MIDI keyboard when necessary.
    Debug mode display at boot time on terminal, 115200 bauds :
    VOLKAOSS - MULTI-DEVICES MIDI CONTROLLER
    Build number : 1.071216.0040
    ================================================
    Parameters retrieved from EEPROM
    ================================================
    Version                             : 0.00
    Debug Mode                          : 1
    VK Midin                            : 16
    Kaossilator Midi In                 : 7
    Kaossilator Midi Out                : 11
    Kaossilator transpose               : 36
    Kaossilator  PAD default value      : 64
    Volca Sample midi in channel status : 0
    ================================================

    VK for the Kaossilator Pro 3 / Pro 3 +

    • Map midi notes to specific pad press and X, Y control changes 
    • Manage holded note on while playing another as a mono synth do 
    • Pitch bend handling relatively to the note currently pressed on the keyboard 
    • Map Cutoff, Reverb level or Modulation Wheel to PAD Y 
    • Map Resonance to a totally free PAD X 
    • Velocity sensitivity 
    • Commands on the C0 octave (C0 beeing the "command key") : 
    • Start/stop bank A, B, C, D. 
    • All banks on / off (2) 
    • ARP/GATE start / stop 
    • ARP speed increase / decrease (cyclic) 
    • Change Midi In channel (between 1-15.  Beyond 15 stays at 1 whatever the #)
    • Change Midi out channel

    To enter a command, you must hold both the command key (C0) and the key corresponding to the function you need to use. If a midi clock is received, the banks, and the ARG/GATE are started synchronously with the BPM. The ARP/gate speed increase/decrease are cyclics.
    If you need to change the midi in channel for the Volkaoss, you must tap the "Change midi in key " a number of time corresponding to the channel number.  Beyond 16, it stays at 1. The channel will change only after you release the command key. So, don't forget to adjust the midi out channel in your midi keyboard.  Same behaviour for the Midi out change.

    VK for the Volca Sample :

    • Map notes on channel 10, C2 octave to Volca Sample parts on midi 1 to 10, and play chromatically the last part played (not used for recording) beyond C2 
    • Velocity sensitivity 
    • Commands on C0 to toggle midi IN for parts (5-9) to use them for specific Volca controls or playing chromatically when recording with a DAW 
    • Reset controllers values 

    Notes are starting with part 1 at C2, part 2 at C#2, etc... on the channel 10 (as the General Midi drums standard). All commands must be sent from the channel 10, at the C0 octave.

    Enabling MIDI IN channels will allow you to tweak part in real time, like the knobs of the Volca Sample. Only channels from 5 to 9 can be enabled. To activate/inactivate (toggle) the part midi in channel, you must first select it, by emitting the note on the channel 10 corresponding to that part. For example, if you need to tweak a Kick drum, choose a sample at the part #5, press the corresponding note on the midi keyboard (E2) at the channel 10, then Command key + Toogle Midi In.  You just enabled the midi in on channel 5.  Then use your midi controller to tweak values.

    The "Reset all CC" command will initialize all CC values to their original value for the selected part.

    Issues reporting


    If you find any issue, you can report it here, in the comments.


    Read More