alf45tar / Pedalino

Smart wireless MIDI foot controller for guitarists and more.
GNU General Public License v3.0
112 stars 17 forks source link
applemidi bluetooth controller esp32 esp8266 expression-pedal footswitch iot-device ipmidi media-converter midi midi-controller mtc osc osc2midi pedal routing rtp-midi wifi wireless

Pedalino™ has been superseed by PedalinoMini™.

Pedalino™ (discontinued)

I know. You are thinking: "yet another MIDI controller with Arduino". Pedalino™ is something new from any previous DIY projects and even better of commercial alternatives at a fraction of the cost.

Right now the hardware is just a working well prototype. It will be boxed when the hardware will be frozen.

Build Status Codacy Badge Source Line of Code

Smart wireless MIDI foot controller for guitarists and more.

Applications

Features

iOS and Android App

The app made with Blynk is on the way. Final version will be released later this year. Here some sneak preview images.

Bill of materials

The rest is not mandatory but it depends of which features you want to support.

Pedalino™ Breadboard Prototype

MODEL A - WiFi only

Fritzing

MODEL B - WiFi and Bluetooth MIDI

Fritzing

Model A and B use HM-10 Bluetooth LE module to connect the app.

MODEL C - Arduino UNO R3 + ESP8266 - WiFi only

Due to memory limit of Arduino Uno R3 some of the features cannot be supported. We eliminated the superfluous ones and kept the most interesting ones.

Fritzing

First prototype

Firmware update

Pedalino is using 2 boards and 3 microcontrollers. All of them need to be flashed with the right firmware before using Pedalino.

Model Board Microcontroller Firmware Flashing software Flashing hardware Instructions
Both Arduino Mega 2560 ATmega2560
ATmega16U2
Pedalino
MocoLUFA
Arduino IDE/PlatformIO IDE
Atmel's flip programmer
None Click here
Click here and here
A ESP-01S 1M ESP8266 PedalinoESP Arduino IDE/PlatformIO IDE Arduino Mega Click here
B DOIT ESP32 DevKit V1 ESP32 PedalinoESP Arduino IDE/PlatformIO IDE None Click here

Pedal Wiring

Pedalino is designed to work with the majority of expression pedals on the market, but there are a few popular pedal types which are incompatible and need to use adapters in order to work with Pedalino.

There is no recognized standard for footswitch and expression pedal inputs. Effects and amp manufacturers use whatever variations are appropriate for their particular application. This can cause problems for the consumer needing to find a footswitch or an expression pedal that will work well with particular devices.

Pedals connector is usually a 1/4" TRS jack. Each stereo TRS socket should be connected as follow.

Pedal TIP - Digital Pin RING - Analog Pin SLEEVE - Ground
1 23 A0 GND
2 25 A1 GND
3 27 A2 GND
4 29 A3 GND
5 31 A4 GND
6 33 A5 GND
7 35 A6 GND
8 37 A7 GND
9 39 A8 GND
10 41 A9 GND
11 43 A10 GND
12 45 A11 GND
13 47 A12 GND
14 49 A13 GND
15 52 A14 GND
16 53 A15 GND

Foot switches

Pedalino supports the following wiring:

Switches per port Connector Wiring Example
1 Mono 1/4" TS
TS
1 switch between T and S Boss FS-5U
Boss FS-5L
2 Stereo 1/4" TRS
TRS
1st switch between T and S
2nd switch between R and S
Boss FS-6
Boss FS-7
3 Stereo 1/4" TRS
TRS
3-Button Schematic Digitech FS3X
5 Stereo 1/4" TRS
TRS
Voltage Ladder LCD Keypad Shield

Momentary and latch type switches are supported.

Normally open (NO) and normally closed (NC) is always supported and configurable by software if your foot switch do not have a polarity switch.

Expression pedals

An expression pedal is more or less a pot with a 1/4" TRS jack plug.

Most potentiometers have three connectors; Clockwise, Counter-clockwise, and Wiper. Amazingly, there are multiple different ways these can be wired, all achieving largely the same result, which means yet more variations for expression pedals. The most common expression pedal wiring is to connect the pot to a 1/4″ stereo (TRS) instrument jack as follows:

Standard Connector Wiring Example
Roland Stereo 1/4" TRS
TRS
CW —> Sleeve
Wiper —> Tip
CCW —> Ring
Roland EV-5
M-Audio EX-P (switch in "M-Audio")
Yamaha Stereo 1/4" TRS
TRS
CW —> Sleeve
Wiper —> Ring
CCW —> Tip
Yamaha FC7
M-Audio EX-P (switch in "Other")
Technics SZ-E1/SZ-E2

Using a pedal with incompatible wiring can result in limited range, jumping or notch like response, or the pedal just won’t function at all, so make sure you check the requirements.

Calibration

Pedalino like some of the more sophisticated effects and controllers incorporate a calibration utility that can mitigate some of the issues with pot rotation. There is a software option that allows the user to match the device to a specific expression pedal. This involves moving the pedal between it’s maximum and minimum settings and the device measuring the result. It then sets it’s internal parameters so that it recognizes where the maximum and minimum settings are of that particular pedal. This can often resolve problems of limited range. It’s important to calibrate all expression pedals. If the pedal is ever replaced, even with the same model, calibration should be run again.

Auto Sensing

Most of the foot switches and expression pedals are plug-and-play because Pedalino will recognize via auto-sensing feature.

Auto-sensing will also enable automatic calibration. After each power on cycle move the expression pedal to its full range and Pedalino will calibrate it. During the first full movement of the pedal MIDI events could be not precise because Pedalino is still learning the full range of the pedal.

USB MIDI

An USB class-compliant MIDI firmware for Arduino Uno/Mega (ATmega16U2) is required for using USB MIDI. Pedalino is tested with mocoLUFA because it supports dual mode boot (USB-MIDI or Arduino-Serial) and high-speed mode (1 Mbps). HIDUINO can works with minimal changes.

More information can be obtained in the following links:

mocoLUFA dual boot

mocoLUFA firmware boots in USB MIDI mode by default.

Arduino-Serial mode is required to upload a new sketch into main Arduino ATmega2560 microcontroller.

To enable Arduino-Serial, add a jumper to PIN 4 (MOSI PB2) and PIN6 (GND) on ICSP connector for ATmega16U2. Power on cycle is required to switch the firmware mode.

ArduinoSerialJumper

mocoLUFA high speed mode

mocoLUFA default speed is 31.250 bps but an undocumented high speed mode is in the code. A jumper between PIN 1 (MISO) and PIN 3 (SCK) on ICSP connector for ATmega16U2 enable the 1 Mbps speed. Pedalino USB MIDI works at 1 Mbps (1.000.000 bps).

HighSpeedJumper

How to connect Pedalino to a WiFi network

AppleMIDI, ipMIDI and Open Sound Control (OSC) protocol requires a network connection. Pedalino support IEEE 802.11 b/g/n WiFi with WPA/WPA2 authentication (only 2.4 GHz).

Pedalino implements Smart Config technology via Espressif’s ESP-TOUCH protocol to help users connect embedded devices to a WiFi network through simple configuration on a smartphone.

Tested apps for configure SSID and password are:

Boot procedure

You can reset the last know access point via Options->WiFi Reset menu.

MIDI Network - AppleMIDI - RTP-MIDI

RTP-MIDI (also known as AppleMIDI) is a protocol to transport MIDI messages within RTP (Real-time Protocol) packets over Ethernet and WiFi networks. It is completely open and free.

Pedalino is a session listener over WiFi. It does not support session initiation functionalities, which requires the use of an external session initiator on the network to open a RTP-MIDI session with the Pedalino. This session initiator can be a macOS computer (Audio MIDI Setup->MIDI Studio->MIDI Network Setup) or a Windows computer with the RTP-MIDI driver, an app on your iOS device (for example MIDI Network) or an embedded RTP-MIDI device.

Pedalino is designed to be compatible with:

ipMIDI

Pedalino can route MIDI over your Ethernet or WiFi network, using ipMIDI protocol to send and receive MIDI data between computers connected to your LAN.

Pedalino is designed to be compatible with:

I prefers mnet MIDIhub for both RTP-MIDI and ipMIDI protocols. It is free and it works very well under Windows.

Open Sound Control (OSC)

Open Sound Control (OSC) is an open, transport-independent, message-based protocol developed for communication among computers, sound synthesizers, and other multimedia devices. Although the OSC specification does not enforce any particular type of transport, OSC is nowadays mostly used over traditional networks known as IP (Internet Protocol).

The OSC protocol uses the IP network to carry messages from a source to a destination. Sources of OSC messages are usually called OSC Clients, and destinations OSC Servers.

Pedalino is both able to receive (as a server), and send to several destinations (as multiple clients).

UDP and TCP are network protocols used for communicating OSC messages between two devices. UDP is the most widely used at the moment.

Pedalino supports UDP protocol only for transmitting and receiving OSC messages because TCP has more latency than UDP.

Pedalino will listen for OSC messages on UDP port 8000 and broadcast OSC messages on UDP port 9000 on the same WiFi LAN segment it is connected.

OSC namespace

OSC specification does not define any namespace. There is no de-facto standard too.

Pedalino OSC namespace for incoming and outcoming MIDI events is:

MIDI Event OSC Address OSC Arguments Min Max Note
Note On /pedalino/midi/note/# float velocity
int channel
0
1
1
16
# is the MIDI note number 0..127
Note Off /pedalino/midi/note/# float velocity
int channel
0
1
0
16
# is the MIDI note number 0..127
Control Change /pedalino/midi/cc/# float value
int channel
0
1
1
16
# is the MIDI CC number 0..127
Program Change /pedalino/midi/pc/# int channel 1 16 # is the MIDI PC number 0..127
Pitch Bend /pedalino/midi/pitchbend/# float bend 0 1 # is the MIDI channel 1..16
After Touch Poly /pedalino/midi/aftertouchpoly/# float pressure 0 1 # is the MIDI note number 0..127
After Touch Chennel /pedalino/midi/aftertouchchannel/# float pressure 0 1 # is the MIDI channel 1..16
Song Position Pointer /pedalino/midi/songposition/# int beats 0 16383 # is song position in beats (1/16 note)
Song Select /pedalino/midi/songselect/# int number 0 127 # is song number 0..127
Tune Request /pedalino/midi/tunerequest/
Start /pedalino/midi/start/
Continue /pedalino/midi/continue/
Stop /pedalino/midi/stop/
Active Sensing /pedalino/midi/activesensing/
Reset /pedalino/midi/reset/

OSC-to-MIDI and MIDI-to-OSC

Pedalino is able to converts incoming OSC messages to MIDI events and outgoing MIDI events to OSC messages.

The bottom line is you can connect MIDI devices (or software) that does not suport OSC natively with OSC enabled software (or device) without any hard to configure software bridge.

Pedalino articles

Commercial alternatives

ToDo

Copyright

Copyright 2017-2018 alf45tar