Wrapping Up

This will be my last post for the foreseeable future. I’d like to wrap up with a brief list of some interesting programs I’ve used in the last few months:

LMMS is a digital audio workstation. I found it reasonably simple to use and it can be completely self-contained (it includes instruments and effects). The JACK support didn’t work reliably in my testing but the default ALSA support worked fine. LMMS seems like a great way to make music without having to learn a lot of technical details.

Rakarrack is a multi-effects processor designed for guitars but it works great with synthesizers as well. ūüôā

Zita-rev1 is a nice standalone reverb (although I didn’t find any way to save its settings). I also like the LV2/VST reverb plugin Mverb.

QMidiRoute and mididings both do MIDI filtering and routing. QMidiRoute is simpler; mididings has a steeper learning curve but is much more powerful.

jack_mixer is an audio mixer for JACK. Its configuration file is per project and is in XML format, meaning that it can be easily edited with a text editor (I created channel strips and set MIDI controller assignments by editing the file). I was able to get creative with the signal routing and create effect send and return channels. You don’t have to connect the master output, and you can connect channel outputs to other channel inputs.

This blog is now on an indefinite hiatus. Happy music-making!

Tagged with: , , , , , ,
Posted in Effects, Tools

Using a2jmidid to Re-Route ALSA MIDI

As I created a larger setup I discovered that my MIDI connections were becoming complicated. Some programs support ALSA MIDI, some support JACK MIDI, and some support both. My MIDI controller hardware is only supported by ALSA.

My version of JACK (0.124.1) handles this reasonably well in many cases by automatically bridging ALSA MIDI ports as JACK MIDI ports. However, I have a case that it doesn’t handle: having multiple devices of the same model. The automatic ALSA-JACK bridge only showed one port when I had three identical devices. Fortunately, I found a2jmidid, which shows all three ports.

I use QjackCtl to control JACK. Here’s how I originally had it configured for MIDI (I stopped JACK and clicked QjackCtl’s Setup button to see the Setup dialog).

On the Settings tab, MIDI Driver (near the lower right corner) was set to seq:

a2j-01

On the Misc tab, Enable ALSA Sequencer support was checked:

a2j-02

With this configuration I started JACK and connected a KORG nanoKONTROL device. The nanoKONTROL appeared on the ALSA tab in the Connections window:

a2j-03

The nanoKONTROL also appeared on the MIDI tab as a sub-device of alsa_midi:

a2j-04

I then connected a second nanoKONTROL unit. The second nanoKONTROL appeared on the ALSA tab:

a2j-05

The second nanoKONTROL didn’t appear on the MIDI tab:

a2j-06

In a terminal, I executed the following:

[steve@audio ~]$ a2jmidid --export-hw

(Option -e can be used instead of —export-hw)

A new entry a2j appeared in the MIDI tab and both nanoKONTROLs were present:

a2j-07

I then stopped JACK, clicked the Setup button, and simplified my QjackCtl configuration with a few simple tweaks.

On the Settings tab, I changed MIDI Driver to none. This will eliminate the alsa_midi entry on the MIDI tab:

a2j-08

On the Misc tab, I unchecked Enable ALSA Sequencer support. This will eliminate the ALSA tab:

a2j-09

On the Options tab, I checked Execute script after Startup and entered a2jmidid –export-hw & in the box (note that there are two dashes before export-hw). This will start a2jmidid automatically after JACK starts:

a2j-10

After clicking OK I saw a message that I needed to restart QjackCtl, which I did. I started JACK and opened the new, simplified Connections window:

a2j-11

One issue I’ve found is that Nano-Basket doesn’t work when connected via a2jmidid; it seems to require regular ALSA MIDI. My workaround is to connect Nano-Basket using a program other than QjackCtl; I tried Patchage, which worked fine (although I also noticed that a2jmidid won’t start if Patchage is already running).

I’m very pleased with how a2jmidid has simplified my setup.

Tagged with: , , , ,
Posted in Tools

Getting Started with Qtractor

In late 2012 I wrote nine blog articles (on my former blog) about my experience getting started with Qtractor. Some of the information might be out of date now (it was for Qtractor version 0.5.4 on Ubuntu Studio 12.04). For example, Qtractor now has a built-in way to convert the session to audio; the method I used in 2012 still works but is no longer necessary.

In any case, I want to preserve these articles for future reference.

A Few Words About Qtractor

Recording MIDI with Qtractor

Converting the Qtractor Session to Audio

Configuring the Qtractor Metronome

Configuring Qtractor Keyboard Shortcuts

Splitting a Clip in Qtractor

MIDI Editing in Qtractor

Qtractor Automation

Send Effects in Qtractor

Tagged with:
Posted in Tools

Hydrogen – Using MIDI Controllers

I’m interested in using buttons on a MIDI controller unit to select patterns in the Hydrogen drum machine software. The process turned out to be fairly straightforward.

First, I defined a row of nine buttons on my MIDI controller (a KORG nanoKONTROL). Each button uses the same MIDI controller number (I used 102). The control value for each button is different, starting with value 0 for the left button and then incrementing by one for each subsequent button, with the ninth button being value 8. The On and Off values must be the same for each button.

I then launched Hydrogen and routed my controller to Hydrogen’s MIDI input. In Hydrogen, I selected Tools > Preferences and then selected the Midi System tab.

hydrogen_midi-01

In the lower half of the Preferences dialog I set the Event drop-down to CC, the first Param. field to 102, and the Action drop-down to SELECT_NEXT_PATTERN_CC_ABSOLUT (that value is currently not documented). I left the second Param. field set to 0. I then clicked OK to close the Preferences dialog. (Note: I believe it’s possible to set the first two columns via MIDI Learn but I didn’t try that.)

Pushing the controller buttons then selected between the first nine patterns as expected. Since that went so well, I also defined buttons for stop/start and mute.

hydrogen_midi-02

Notes

The screen shots show Midi driver set to the default value ALSA. I may change this to JACK later if it makes sense to do so.

The screen shots also show Input set to None, which apparently means “whatever is connected to the input” as opposed to a specific input device.

Tagged with: ,
Posted in Instruments

AlsaModularSynth – Using MIDI Controllers

I’m interested in using MIDI controllers to control AlsaModularSynth (AMS) instruments. I found that setting up the controller bindings was easy.

First, I launched AMS with my desired instrument and connected my controller unit to the AMS MIDI input. I then selected View > Control Center… to open the Control Center window.

Tip: I found out later that it’s a good idea to temporarily check the Follow MIDI check box while binding the controls.

In the right pane, I selected the AMS control to be bound.

ams_bind-01

In this example, I selected Mixer 2 (ID 39), Volume 0.

I moved the desired control on my controller unit. The controller then appeared in the left pane.

ams_bind-02

I then selected the controller in the left pane. This would have been done automatically if I had checked Follow MIDI.

I then clicked the Bind button at the bottom of the Control Center window. The left pane indicated that the control was bound.

ams_bind-03

Notes

AMS allows a single control on the controller unit to affect multiple AMS controls. I find this very useful. For example, I mapped a single knob to an envelope’s Decay and Release controls.

The Toggle MIDI Sign button causes the controller values to be reversed. I created a VCO mix control by first mapping the levels of two VCOs to the same knob. For the first VCO I then clicked the Toggle MIDI Sign button. The knob now works as a “balance” control between the two VCOs.

I used the Set Min and/or Set Max buttons to limit the range of selected AMS controls. For example, if an AMS control has a range of 0 through 2, it can be limited to 0 through 1 by setting the current value to 1 and clicking Set Max.

Tagged with: ,
Posted in Instruments

mda ePiano (LV2 Version)

Back in the 20th century, plugins from Maxim Digital Audio (mda) were among the early VST plugins available for Windows. They have a reputation for being high quality with low CPU usage. Several years ago the source code for these plugins was released and David Robillard ported the mda plugins to LV2 format.

Most of the mda plugins are effects but there are also four instruments: DX10, JX10, Piano, and ePiano. I was interested in ePiano, so I installed package mda-lv2 from the Arch Linux AUR (https://aur.archlinux.org/packages/mda-lv2/). The package contains all of the mda plugins.

After installation I tried ePiano for the first time in many years and found it to sound surprisingly good (to my ears). The LV2 version’s GUI looks like this:

mda_ep-01
Here’s what the Windows VST version looks like (in REAPER):

mda_ep-02
You may notice some differences. Unfortunately, the control values in the LV2 version are all in the range 0.0 through 1.0 with no units or other helpful information specified on the GUI as in the VST version. I suspect that’s a limitation of LV2.

I created the following chart to list differences in the control descriptions between the VST and LV2 versions plus the range and unit for each control of the VST version:

mda_ep-03

I don’t consider the LV2 GUI to be a serious problem for ePiano although some of the other mda plugins are unusable for me in LV2 format. Nevertheless, mda ePiano is the best electric piano for GNU/Linux that I’m aware of and I plan to make use of it.

Additional Note 24 May 2015: Modulation (Pan/Trem) is controlled by CC1 (Mod Wheel).

More Information About mda ePiano

Version: 1.2.2
Author: Paul Kellett (original VST version) / David Robillard (LV2 port)

Web Sites:
http://mda.smartelectronix.com/ (original VST version)
http://drobilla.net/software/mda-lv2/ (LV2 Port)

Tagged with: , ,
Posted in Instruments

Lingot Instrument Tuner

There are several instrument tuner programs available for Arch Linux. I chose Lingot (version 0.9.1).

lingot-01

I’ve found Lingot useful for a couple of tasks. My main use case is tuning an analog synthesizer. I’ve also used Lingot to help me tune some synthesizer patches. In either case, it’s worked well for me.

Additional Notes: 25 July 2015

Today I wanted to tune to note C6, two octaves above middle C. I found that Lingot didn’t go quite that high. I selected Edit > Preferences, and then the Basic tab.

lingot-02

I decreased the divisor in the Effective sample rate calculation from 25 to 20 and was then able to reach C6. I reset the number when I was done, under the assumption that the lower value probably required more processing power.

Tagged with: ,
Posted in Tools

jack-keyboard

jack-keyboard is a program that provides the function of a MIDI hardware keyboard. I don’t recommend it (or any virtual keyboard) for real-time playing but it can be useful for testing and for holding a note while tuning. I tested jack-keyboard version 2.7.1.

jack-keyboard-01
I like the “sustain” feature, which works like a sustain pedal. I press and hold the space bar and then click the desired note. I then release the space bar. To stop the note, I either press and release the space bar a second time, click the Sustain button, or click the note again.

It’s also possible to produce notes via the computer keyboard.

For more information about jack-keyboard, see its man page or the documentation at its web site: http://jack-keyboard.sourceforge.net/

UPDATE 28 JULY 2015: Pressing the Escape key is a “MIDI Panic” button (that presumably sends All Notes Off).

Other Virtual Keyboards

It appears that vmpk (Virtual MIDI Piano Keyboard) may be the most popular virtual keyboard program. I tried vmpk version 0.6.0 but it didn’t work on my system. I saw the following error:

[steve@audio]$ vmpk
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)

I suspect I have a missing indirect dependency.

Another virtual keyboard is vkeybd. I didn’t try it because it appears to be older and more basic than jack-keyboard.

Tagged with: ,
Posted in Tools

No MIDI Devices!

I recently got an unpleasant surprise when I tried to connect the input from a MIDI keyboard. I have a MIDI interface on my sound card plus a USB keyboard, so I was expecting to see something like the following on the ALSA tab of QjackCtl’s Connections window:

no_midi-01

Instead, what I saw was this:

no_midi-02

My MIDI input devices were gone! Where did they go?

I figured out a few things to try. First, I checked my QjackCtl settings. I didn’t see anything unexpected.

Next, I listed the ALSA MIDI devices:

[steve@audio ~]$ amidi -l
Dir Device    Name
IO  hw:0,0    M Audio Audiophile 24/96 MIDI
IO  hw:2,0,0  E-MU Xboard25 MIDI 1

Both MIDI input devices were present.

I then tried receiving ALSA MIDI input from the E-MU Xboard25:

[steve@audio ~]$ amidi -p hw:2,0,0 -d
90 3C 77
90 3C 00
90 3E 74
90 3E 00

(Press Ctrl-C to exit amidi)

That worked, too, but I didn’t know of anything else to try.

I then posted a request for help on the LinuxMusicians forum and got some helpful responses. The first hint was to run aconnect:

[steve@audio ~]$ aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'

My MIDI input devices should have been listed but weren’t.

The next hint was to verify that module snd_seq_midi was loaded.

[steve@audio ~]$ lsmod | grep snd_seq_midi

The command had no output, meaning the required module wasn’t loaded! I loaded it manually:

[steve@audio ~]$ sudo modprobe snd_seq_midi

I then re-ran aconnect:

[steve@audio ~]$ aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'M Audio Audiophile 24/96' [type=kernel]
    0 'M Audio Audiophile 24/96 MIDI'
client 24: 'E-MU Xboard25' [type=kernel]
    0 'E-MU Xboard25 MIDI 1'

The missing devices were back and available in QjackCtl.

I don’t yet have a solution to this problem other than to manually load the snd_seq_midi module. The module appears to be part of the linux kernal package, so I’m hoping the problem will be solved the next time there’s a kernel update.

Note that the MIDI input devices are handled by ALSA and should show up in QjackCtl’s Connections window even if JACK isn’t running.

UPDATE 9 APRIL 2015: This is a known problem with Linux kernel 3.19 (Arch Linux bug 44286).

UPDATE 24 MAY 2015: The problem is not fixed after several kernel updates. I’ve now made a change to automatically load the missing module at startup. As root, I created a new file /etc/modules-load.d/alsa_fix.conf containing one line:

snd_seq_midi

I restarted my system and the module was automatically loaded.

Note: There’s nothing special about the first part of the name alsa_fix.conf. The first part of the name can be anything you like but it needs to end with .conf.

Tagged with: , ,
Posted in Troubleshooting

MIDI Monitors

MIDI monitor software is used to view the flow of MIDI data. This article describes a few of the MIDI monitor programs I’ve tried.

amidi

I found that I had a simple monitor available by using the command amidi that was already present on my system. Note that amidi is limited because it’s for ALSA MIDI only, not JACK MIDI.

First, I used amidi to list the available ALSA MIDI devices:

[steve@audio ~]$ amidi -l
Dir Device    Name
IO  hw:0,0    M Audio Audiophile 24/96 MIDI
IO  hw:2,0,0  E-MU Xboard25 MIDI 1

To monitor the E-MU Xboard25 keyboard, I entered the following command:

[steve@audio ~]$ amidi -p hw:2,0,0 -d

I then pressed middle C (MIDI note 60) and released it. The following output displayed:

90 3C 48
90 3C 00

The output is in hexadecimal.

amidi is not my monitor of choice but it’s useful for verifying that incoming ALSA MIDI is working.

mididings

I already had the mididings MIDI processor software installed and found that it could be used as a simple MIDI monitor. With JACK running I started mididings as follows:

[steve@audio ~]$ mididings "Print()"

I used QjackCtl to route my MIDI keyboard to mididings and then pressed and released middle C:

[ 1,  1] Note On:   60  64  (c3)
[ 1,  1] Note Off:  60  64  (c3)

The output is in decimal.

QMidiRoute

I already had the QMidiRoute software installed, which contains a simple MIDI monitor.

After JACK was started I also started QMidiRoute. I used QjackCtl to route my MIDI keyboard to QMidiRoute. Once again, I pressed and released middle C:

MM-01

midimon

I installed the dedicated MIDI monitor program midimon (version 0.3). With JACK already started I then started midimon. I used QjackCtl to route my MIDI keyboard to midimon. Once again, I pressed and released middle C:

MM-02

midimon has some interesting features. It can log the MIDI stream to a file, which can be useful. It also has checkboxes to control the types of events to be monitored. That’s useful but doesn’t go far enough; I wasn’t able to find a way to disable Active Sensing events. Overall, midimon seems to work OK but it appears to be unfinished.

Other MIDI Monitors

I didn’t look at GMIDImonitor because it appeared to be very basic.

I wanted to look at midisnoop (version 0.1.2) and kmidimon (version 0.7.5) but I was unable to build either of them.

Tagged with: , , , , ,
Posted in Tools