Skip to documentation
Nomadly.beApps & Hacks / Midiface 4×4 Thru/Merge button hack for merge mode

Technical documentation · 18 October 2026

Midiface 4×4 Thru/Merge button hack for merge mode

A QT Py and a relay to select MERGE automatically at startup: 5 button presses with an external USB power supply, 6 if the Midiface is connected to a computer.

Before you begin: read the notice on risks, liability and the trademarks mentioned.

01

Overview & objective

The Miditech MIDIface 4×4 Thru/Merge returns to its default mode whenever it is powered on. On the unit used for this build, the number of MODE button presses needed to select MERGE depends on how its USB port is connected.

Midiface USB connectionButton presses to program
External USB power supply · recommended5 presses
USB connected to a computer6 presses
For MERGE mode, use an external USB power supply where possible.

In the configuration described here, data travels through the MIDI cables; the Midiface USB port is used only for power. The unit therefore does not need to be connected to a PC. An external USB power supply frees up a computer port and avoids making the build dependent on the computer, including any loss of USB power during shutdown or sleep.

The QT Py and relay automate the 5 or 6 presses required for the selected connection. The relay contact is wired in parallel with the existing button. Once the sequence is complete, the relay remains released and the NeoPixel stays off until the microcontroller starts again.

The code defaults to 5 presses for an external USB power supply. Before programming the QT Py, change N_PUSH_BUTTON to 6 only if the Midiface will be connected to a computer. The build does not detect the connection automatically.

The Midiface USB port and the QT Py USB-C port serve different purposes: the QT Py USB-C port is connected to a PC temporarily for programming.

For modes, indicators and MIDI connections, refer to the Midiface 4x4 Thru / Merge DEU-ENGmanual, also available on the official Miditech manuals page.

Scope. This documentation describes the hardware shown in the photos and the connection points identified by its owner; check any other board revision before wiring it.
02

Parts and tools

Indicative budget: approximately €16 for the QT Py, relay and wiring only.

This estimate is a rough guide. The cost varies with the supplier, date, place of purchase and delivery charges. The Midiface, USB power supply, tools and printing of the support are not included.

MC Hobby links for components and wire, provided for reference.

MC Hobby does not sponsor this project. Nomadly simply bought the parts there, without any special benefit or compensation. Nomadly recommends this Belgian shop for its service quality and prices.

ItemPurpose
Midiface 4×4 Thru/Merge ↗Unit to modify; power supply and MODE / SW1 button.
Adafruit QT Py SAMD21 / QT Py M0 ↗Runs the sequence; output A2 to the relay.
Pololu Basic SPDT Relay Carrier 5V · 1 relay ↗Control input EN ; dry contact COM / NO.
Black silicone stranded wire · 26 AWG ↗Internal wiring · GND identification.
Red silicone stranded wire · 26 AWG ↗Internal wiring · +5 V power identification.
Green silicone stranded wire · 26 AWG ↗Internal wiring · control and button contact; label both ends.
Disconnectable +5 V connectionSafe access for programming the QT Py over USB-C.
External USB power supply and USB cable for the MidifacePower for standalone MERGE use · 5-press version recommended.
Insulation and fixings suitable for the enclosureMechanical support and board protection.
Arduino IDE · official download ↗Write, compile and upload the firmware to the QT Py.
Multimeter, soldering equipment, USB-C data cableChecking connection points, assembly and programming.
03

Opening the enclosure

Disconnect USB power and MIDI cables before opening the Midiface 4×4 Thru/Merge.

  1. Remove the two screws at the ends of the enclosure faceplate.
  2. Gently release and remove the black plate. Keep the plate and both screws for reassembly.
  3. Slide the circuit board out of the enclosure. It is held in rails: slide it gently along them to remove it.
Open enclosure, black plate and two screws removed
Disassembly: accessing the circuit board held in rails.
  • The two screws and black plate have been removed in this photo.
  • The circuit board slides out along the enclosure rails.
Enlarge photo
04

How it works & timing

The firmware runs only once in setup(). The loop() function is empty. The N_PUSH_BUTTON constant defines the number of presses: 5 with an external USB power supply, 6 if the Midiface USB port is connected to a computer.

PhaseRelay / SW1NeoPixelProgrammed duration
Startup delayLOW · releasedRed8 969 ms
Press, repeated N_PUSH_BUTTON timesHIGH · COM/NO closedBlue264 ms per press
Release after each pressLOW · COM/NO openGreen744 ms per pause
Completion indicatorLOW · releasedWhite7 546 ms
Final idle stateLOW · releasedOff; pixel power disabledUntil the next startup

Timing according to the Midiface connection

USB connectionPressesEnd of press/pause cycles*NeoPixel off*
External USB power supply · recommended514.009 s21.555 s
Computer615.017 s22.563 s

Total programmed delays: 8 969 + N_PUSH_BUTTON × (264 + 744) + 7 546. * Excluding QT Py startup and instruction execution time. The durations come from the supplied MidifaceMerger.ino file.

Resetting the QT Py restarts the sequence. Avoid resetting it during use: the selected number of presses assumes the Midiface is starting up with the intended USB connection. If that connection changes, adjust N_PUSH_BUTTON and upload the code again.
05

Wiring diagram

The two COM / NO wires simulate closing the SW1 button contact. They are not connected to the relay logic control circuit. The colours are used as reference markers in this document.

MIDIface 5V to QT Py 5V, common GND; QT Py 5V to VDD, GND to GND, A2 to EN; relay COM to SW1 A1 and NO to SW1 A2.
Editable, printable vector diagram. Enlarge ↗ · Download SVG
Red · +5 VGrey · GNDBlue · A2 / ENOchre · SW1 dry contact

Leave NC unconnected. The relay is released when EN = LOW ; EN = HIGH causes a button press.

06

Photos & connection points

The photos retain their original orientation. The MIDIface pads and relay terminal order were confirmed by the owner of the build on 18 October 2026.

MIDIface board, solder side, showing USB and SW1 areas
MIDIface: overview of the solder side.
  • The close-up views below identify the pads to use.
  • MIDIface connection points confirmed by Frédéric Delchambre on 18/10/2026.
Enlarge photo
SW1: A1 at the top left, A2 directly below A1
SW1: the top two pads in the left column. A1/A2 are labels used in this document.
  • A1: top-left pad. A2: pad directly below A1 in the same column.
  • COM and NO are interchangeable on this pair. The other pads are not used.
  • Do not confuse SW1 A2 with the QT Py A2 pin.
Enlarge photo
USB area: GND at the top right, 5V at the bottom right
MIDIface USB: the two confirmed power connection points.
  • GND: top-right pad. +5 V: bottom-right pad.
  • 5V supply; check again before connecting.
  • The point measured at approximately 3 V must not be used.
Enlarge photo
QT Py: 5V and GND on the left near USB-C, A2 on the right
QT Py: USB-C facing down, three connections used.
  • USB-C connector facing down, as in the original photo.
  • 5V: power. A2: relay logic control. Do not use 3V instead of 5V.
Enlarge photo
Relay: COM, NC, NO on the left; GND, VDD, EN on the right
Relay: confirmed terminal order for the board shown.
  • Screw terminals on the left; control pins on the right.
  • COM and NO connect only to the two SW1 button pads. Leave NC unconnected.
  • Connection order confirmed by the owner of the build on 18/10/2026.
Enlarge photo
07

Wiring

Before soldering anything to the QT Py, program it, then disconnect its USB-C cable.

QT Py ↔ relay

QT PyRelayFunction
5VVDD5 V relay power supply.
GNDGNDCommon control ground.
A2ENActive-HIGH control.

Relay ↔ MODE / SW1 button

RelayMIDIfacePhoto reference
COMSW1 A1Top-left pad.
NOSW1 A2Pad directly below A1, in the same column.
NCNot connectedMiddle screw terminal on the relay.

COM and NO can be swapped on this pair: the dry contact has no polarity.

Two different A2 labels. QT Py A2 controls EN. SW1 A2 is a button pad connected to NO. No wire should directly connect these two points.

Power from the MIDIface

MIDIfaceQT PyPhoto reference
5V power5VUSB area, bottom-right pad.
GNDGNDUSB area, top-right pad.

Do not use the point measured at approximately 3 V. The relay is powered from the QT Py 5V and GND pins, never from the A2 output.

Reproducing the build. The diagram shows the wiring provided. For an external supply on 5V, Adafruit recommends a series diode, with the anode towards the source and cathode towards the QT Py. Check this protection and the available voltage under the actual load before final assembly.
08

Arduino firmware

One source file, one setting for the connection used.
  • N_PUSH_BUTTON = 5 : default setting, for an external USB power supply for the Midiface.
  • N_PUSH_BUTTON = 6 : Midiface USB port connected to a computer.

The file below is a complete copy of the supplied source. Its current setting is N_PUSH_BUTTON = 5 · external USB power supply. The Copy code button and download use exactly this version.

Supplied source · complete, unmodified copy.

Download .ino ↓
Show full firmware
#include <Adafruit_NeoPixel.h>

/*
QT Py           Relais
5V   ------->   VDD
GND  ------->   GND
A2   ------->   EN

Relais          MidifaceMerger
COM  ------->   A1
NO   ------->   A2

MidifaceMerger  QT Py
5V   ------->   5V
GND  ------->   GND
*/

const int RELAY = A2;
// Adafruit indique que sur ce modèle la broche 12 coupe l’alimentation du NeoPixel
const int PIN_NEOPIXEL_POWER = 12;

// Si boîtier connecté à l'ordinateur : 6 appuis du bouton (il n'y a aucune raison de relier le boîtier au PC en mode Merge)
// Si boîtier non connecté à l'ordinateur, mais uniquement à alimentation usb externe : 5 appuis du bouton
const int N_PUSH_BUTTON = 5;

Adafruit_NeoPixel pixel(1, PIN_NEOPIXEL);

void setLed(int r, int g, int b)
{
  pixel.setPixelColor(0, pixel.Color(r, g, b));
  pixel.show();
}

void setup()
{
  // Init A2/Relais
  pinMode(RELAY, OUTPUT);
  digitalWrite(RELAY, LOW);

  // Init LED
  pixel.begin();
  pixel.setBrightness(30);

  // Démarrage / attente que le MIDIface soit prêt
  setLed(255, 0, 0); // rouge
  delay(8969);

  // 6 appuis sur le bouton MODE
  for (int i = 0; i < N_PUSH_BUTTON; i++)
  {
    // Bouton pressé
    setLed(0, 0, 255); // bleu
    digitalWrite(RELAY, HIGH);
    delay(264);

    // Bouton relâché
    digitalWrite(RELAY, LOW);
    setLed(0, 255, 0); // vert
    delay(744);
  }

  // Terminé
  setLed(255, 255, 255); // blanc
  delay(7546);

  // Sécurité : relais au repos
  digitalWrite(RELAY, LOW);

  // Eteindre complètement la LED NeoPixel
  pixel.clear();
  pixel.show();

  pinMode(PIN_NEOPIXEL_POWER, OUTPUT);
  digitalWrite(PIN_NEOPIXEL_POWER, LOW);
}

void loop()
{
}

The loop uses N_PUSH_BUTTON to count relay activations. The choice between 5 and 6 is made before uploading; the Midiface USB connection is not detected automatically.

RELAY = A2 ; PIN_NEOPIXEL_POWER = 12 is explicitly declared in this firmware. Adafruit documents setting pin 12 LOW to switch off NeoPixel power on the SAMD21/M0.

Compilation and upload must be checked in the Arduino environment used. Keep the core and library versions that work with this file.

09

Programming the QT Py

The QT Py USB-C connection to a PC is used to program the microcontroller. It does not determine the number of presses: that setting depends on the Midiface USB connection during use.

Program the QT Py before soldering anything to it.

Perform the first upload with the QT Py on its own, then disconnect its USB-C cable before assembling the build.

  1. Connect the QT Py on its own to a PC with a USB-C data cable.
  2. Set up Arduino IDE using the official Adafruit guide : Adafruit SAMD support and the Adafruit NeoPixel library.
  3. Open MidifaceMerger/MidifaceMerger.ino. Keep const int N_PUSH_BUTTON = 5; as the default for an external USB power supply for the Midiface. Change it to 6 only if its USB port will be connected to a computer. Select the Adafruit QT Py M0 (SAMD21) board and the corresponding port; verify, then upload.
  4. Disconnect the QT Py USB-C cable. Perform the power supply checks, then wire and solder the build with all devices powered off.
  5. Connect the MIDI devices, then power the Midiface through its USB port using the chosen source: external USB power for the default 5 presses, or a computer for 6 presses.
  6. Check the complete sequence using the test procedure.

Provide an easily disconnectable +5 V connection inside the enclosure for future reprogramming.

10

Test procedure

Check the power supply before connecting the build, then test the actual assembly before closing the enclosure.

Measure 5 V before connecting the QT Py

  1. With the Midiface powered off, identify the 5V and GND points shown in the photo. Keep the QT Py disconnected.
  2. Power the Midiface through its USB port and use a multimeter in DC voltage mode to measure the voltage and polarity between these two points.
  3. Disconnect Midiface power and wait for it to switch off before soldering and connecting the QT Py.

Wiring checks with power off

  • Check the solder joints, absence of solder bridges and board insulation.
  • Check that COM/NO is open at rest, NC is unconnected and only the two selected SW1 contacts are wired.
  • Check that no USB-C cable connects the QT Py to a PC.
  • Check that the Midiface USB connection matches the programmed number of presses: 5 with an external USB power supply, 6 with a computer.

For each test from a complete startup

  1. Switch off MIDIface power; wait for it to turn off completely before powering it on again.
  2. Observe red for approximately 9 s, then count 5 activations with an external USB power supply, or 6 if the Midiface is connected to a computer, with alternating blue/green indications. The observed number must match N_PUSH_BUTTON.
  3. Check that the mode indicator shows MERGE by referring to the Midiface manual.
  4. Observe white for approximately 7.5 s, then the NeoPixel switching off. The relay must remain released.
  5. Leave the device powered on for at least one minute: no further button presses should occur.
  6. Test MIDI data transmission using the connections described in the Midiface manual, then check that the manual button still works.
  7. Repeat several complete cycles; record any missed press and the resulting mode.

If the result is different

ObservationUseful check
No mode changeCheck the SW1 A1/A2 pair, the use of COM/NO and contact closure during each press.
Incorrect number of presses or wrong modeStart again from a complete power-off; check the Midiface USB connection and N_PUSH_BUTTON setting: 5 with external USB power, 6 with a computer.
Restarts or irregular operationMeasure the supply under load and check grounds, solder joints and mounting.
NeoPixel stays onCheck the exact QT Py SAMD21/M0 model, the uploaded firmware and execution of the end of setup().
11

Final assembly & precautions

  • Secure the QT Py and relay so they cannot touch the MIDIface PCB or any conductive parts of the enclosure.
  • Insulate exposed solder joints and terminals; secure the wires without putting strain on the pads.
  • Keep the MODE button and disconnectable +5 V connection accessible.
  • Label the wires at both ends; clearly distinguish QT Py A2 and SW1 A2.
  • Check the voltage and correct operation during relay activations before closing the enclosure.
  • Work on and change the wiring with power off. Do not accidentally leave NC connected.

Keep this page, the SVG diagram, annotated photos and .ino file with the device. After testing, record the Arduino/core/library versions used and any hardware differences.

Sources & traceability
  • Project brief and photos; measurements and connection points confirmed by Frédéric Delchambre on 18/10/2026.
  • MidifaceMerger.ino : source code by Frédéric Delchambre, dated 18/10/2026, defining the delays and relay control sequence.
  • Number of presses according to the USB connection: clarification from Frédéric Delchambre on 20/10/2026 (5 with external USB power, 6 with a computer).
  • Adafruit · QT Py SAMD21: pins, power, NeoPixel.
  • Adafruit · Arduino IDE setup.
12

3D printed support

The support helps fit the QT Py and relay inside the Midiface 4×4 Thru/Merge enclosure. Its STL file is available below for 3D printing.

Support view

3D render of the support alone, with its two compartments and crosspieces.
3D printed support: view of the STL model.
  • Render generated from the supplied STL file. The material and colour are illustrative.
Enlarge render

360° rotation

Play the video to view the support from every angle. Silent animation, duration: 8 seconds.

Assembly on the Midiface board

Midiface board removed from its enclosure, with the grey 3D printed support, relay and QT Py in place.
Assembly on the Midiface board: printed support, relay and QT Py in place.
  • Actual mechanical integration of the support on the board, removed from its enclosure.
Enlarge photo
13

Liability and trademarks

This tutorial is shared free of charge by Frédéric Delchambre/Nomadly SRL as an account of their own build, with no guarantee of results. Anyone choosing to reproduce it must check the compatibility of their hardware and remains responsible for their own actions. These provisions apply within the limits set by law.

It presents an independent, experimental modification; it is not an official manufacturer procedure.

Modifications and risks

Each person chooses to carry out this modification at their own risk and remains responsible for their checks, choice of hardware and actions. They must have the necessary skills and check their device's compatibility before starting any work.

Opening the enclosure, soldering and electrical modifications can damage the MIDIface or connected equipment, cause malfunctions, data loss or injury. They may also affect the manufacturer's warranty or eligibility for support or repair.

To the extent permitted by applicable law, Frédéric Delchambre and Nomadly SRL guarantee neither the outcome of this modification nor its suitability for another device or a particular use. They disclaim liability for property damage, data loss and repair or replacement costs attributable to wiring errors, inappropriate handling, incompatible components or failure by the person carrying out the modification to follow the safety instructions.

Trademarks and third-party rights

The trademarks, product names and logos mentioned or shown, including Miditech, MIDIface, Adafruit, QT Py, Pololu and Arduino, belong to their respective owners. They are mentioned solely to identify the hardware and tools used. No affiliation, endorsement, certification or warranty by these owners is claimed in relation to this tutorial or build.

This tutorial transfers no intellectual property rights belonging to third parties. The rights of trademark owners and other rights holders remain applicable.

Nomadly SRL legal information and contact details on the home page.

Build photo

100 %