Have you ever wanted to use MIDI commands to control electrical lights or appliances? This article will tell you how using a Raspberry Pi, the GPIO pins controlled by some open-source software from McLaren Labs on GitHub, and a nifty device called the IOT Relay. Using the Relay is an affordable and SAFE way to control 120 VAC sockets and it makes this project a breeze.Read More »MIDI to GPIO for 120 VAC Control
In version 0.5.2 of McLaren Labs’
rtpmidi, we made the use of locked memory the default. Locked memory dedicates fixed RAM to the rtpmidi process, and prevents it from being swapped to disk. The use of locked memory (through the mlockall() function call) can be a benefit to realtime applications like MIDI and Audio, but its use can be to the detriment of other processes. So it should be used carefully.
On Ubuntu 18.04 and 20.04 enabling memlock as the default option seemed benign enough. On Ubuntu 20.10, however, this default caused problems. With memlock enabled, the process printed strange errors and aborted. Example:
***MEMORY-ERROR***: rtpmidi: GSlice: failed to allocate 8176 bytes (alignment: 8192): Cannot allocate memory
Ubuntu 20.10 (Groovy Gorilla) accounts for locked memory pages differently, and even though the memory limit is higher, with all things accounted for, it is not enough.Read More »Enabling memlock for rtpmidi on Ubuntu 20.10
When you use our rtpmidi tool to connect two devices you have created a “session.” The session has an “initiator” side that started the connection, and “listener” side that accepted the invitation. Some devices, however, do not make good “initiators” and iPhones are a great example. An iPhone cannot initiate a network MIDI session.
But sometimes you want an iPhone to join the MIDI network of a stationary computer … without going back to the computer screen. McLaren Labs’ “favorite” option was created to handle this case.
A “favorite” is the name of a device that that rtpmidi automatically initiates a session with whenever the favorite appears on the network. This new feature takes advantage of the properties of Bonjour (Avahi). A Listener advertises its availability using Bonjour. When rtpmidi detects a Bonjour name matching a favorite, it automatically initiates a session with that name.
Use the “favorite” option from the command line like this.
$ rtpmidi gui -F 'myiPhone' -t Organ-Synth:0
Now, whenever rtpmidi sees the iPhone named “myiPhone” it will automatically call it and route MIDI information to “Organ-Synth”.
The video below shows how this works.Read More »Use the ‘favorite’ Option to Automatically Initiate a MIDI Session
A service is a program that the operating system automatically starts when it boots. On the Raspberry Pi “buster” operating system, the daemon that starts and stops services is called “systemd.” You can read about creating services here:
McLaren Labs rtpmidi can be run as a service so that whenever you start your Raspberry Pi rtpmidi can be ready to go. This is especially useful in a headless system where you want rtpmidi to route incoming RTP MIDI sessions to a specific MIDI destination.
One of our customers wanted to know how to do this, so we wrote up this HOWTO guide. Here we will show how to create a service that
- listens for incoming RTP-MIDI connections
- connects to MIDI Alsa port 128
- announces itslef on UDP Port 5006
- logs its output to Syslog
Along with the recent release of McLaren Labs rtpmidi version 0.5.0, we have new ports to Raspberry Pi 4 Raspbian OS “Buster” and also Ubuntu… Read More »New releases – Raspberry Pi 4 and Ubuntu 19
This month McLaren Labs releases
rtpmidi version 0.5.0 for Ubuntu and Raspberry Pi. This release brings some great new features, and also provides a few performance and installation improvements.
More MIDI message types … including SysEx
rtpmidi has always supported the following message types with full Journal capability for sending and receiving. (Note: The Journal is part of the error correction mechanism that recovers lost messages that occur when sent over a network.)
- Note On, Note Off
- Control Change
- Program Change
- System Reset
With this release, we also add the following to provide a complete set of MIDI message types including System Exclusive.Read More »McLaren Labs rtpmidi Version 0.5.0
Network MIDI was invented sometime around 2004 to send MIDI messages over an IP network. To handle network loss, a protocol known as RTP-MIDI was created and documented as RFC-4695. Network MIDI is built into OSX computers and iOS devices. Apple music creators think nothing of connecting MIDI equipment using Ethernet and WiFi, instead of MIDI cables.
Sometime around 2009, Network MIDI was built into iPads and iPhones. This made building touch-based control surface Apps easy, and ensured they integrated with MIDI Workstations over WiFi. While this capability created many cool demos, the unpredictable latency and jitter of WiFi made MIDI-over-WiFi not attractive where timing is important. MIDI-over-Bluetooth became a standard in the last few years, and seems to be the preferred method for sending MIDI over wireless links.
But Network MIDI persists, and new implementations of the protocol as software pop up, as do new hardware products implementing the protocol. This article is a round-up of some of the implementations available in 2019.Read More »The State of Network MIDI (2019)
Remote musical MIDI collaboration has been an interesting academic research area for years, but has not been explored by many casual musicians. One reason is that the complexity of software that brings MIDI and Networking together makes it a little bit of a daunting endeavor. We think it’s time to open exploration to more people and make remote MIDI collaboration as easy as joining a Hangout.
What is Network MIDI?
Back in 2001, a group of researchers at Berkeley began to experiment with remote musical collaboration . The idea was see if musicians separated by some distance could collaborate in real time over a high-speed network. Rather than sending real-time audio signals, MIDI events were transmitted between instruments at two different locations.