Jared

Chromebook, Crostini Linux and MIDI

A few weeks ago I picked up an inexpensive Chromebook. I’m typing this on it now, in fact. This was my first experience with Chromebook, and my first experience thinking about porting McLaren Labs’ tools onto a Chromebook. At first, I was thinking about wiping ChromeOS and putting Debian11 directly on it. But then I learned about native Linux support on Chrome in a VM.

Chromebook Linux

Crostini is the name given to the Linux-on-Chromebook virtual machine support. To enable it on my chromebook, I needed to open chrome://flags and enable Linux. Then I rebooted, and in Settings>>Advanced there was a new section called “Linux”. Voila.

Applications that need the Linux environment cause the Linux VM to start. One application is “Terminal” in the main applications menu. Start it up, and there is a full Debian 11 environment there. You can use “apt-get” and install whatever you desire.

Read More »Chromebook, Crostini Linux and MIDI

Arduino AppleMIDI and McLaren rtpmidi

  • by
SparkFun ESP2866 “Thing Dev” board

One of our customers brought to our attention an implementation of RTP MIDI for Arduino. With this sketch, you can use an Arduino to send and receive MIDI over Ethernet and WiFi. It is compatible with McLaren Labs’ rtpmidi, so you can use it to send MIDI from an Arduino to your Raspberry Pi.

Read More »Arduino AppleMIDI and McLaren rtpmidi

Enabling memlock for rtpmidi on Ubuntu 20.10

  • by

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[2023]: 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

Run rtpmidi as a service on Raspberry Pi

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:

https://www.raspberrypi.org/documentation/linux/usage/systemd.md

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
Read More »Run rtpmidi as a service on Raspberry Pi

The State of Network MIDI (2019)

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)