Many of us like to compile our own kernels. In my case, I compile my own kernels for two reasons. First, stock kernels include initrd images that tend to discover my SCSI devices in the wrong order. You can fix the initrd to discover devices properly (I explained how to do that with Ubuntu/Kubuntu in a previous installment of Tech Tips). But, I prefer to avoid the problem by compiling the drivers into the kernel rather than loading them as modules. Second, I just like to run the latest stable kernel available.
I've been playing with synthesizers with a USB/MIDI connection. Much to my dismay, I couldn't seem to make the USB/MIDI connection work with my own compiled kernel. I couldn't find any information on the Web that would point me to the problem, but I eventually stumbled on the answer quite by accident.
The solution turns out to be quite simple and obvious once you look through enough of the kernel configuration options. One problem is that the kernel drivers are organized in such a way that it wasn't obvious (at least it wasn't obvious to me) which drivers to include to make this work. I picked all the MIDI sequencer drivers, so why wasn't it working? The USB driver you need actually resides within the tree for sound drivers, not USB drivers. Select the following from “make menuconfig” (or whichever method you prefer for kernel configuration): Device Drivers→Sound→Advanced Linux Sound Architecture→USB Devices→USB Audio/MIDI driver.
Although, as I said, I generally compile my drivers directly into the kernel, I recommend that you compile this particular one as a module, instead. There's no point in having the module loaded during those times when you're not using the synthesizer keyboard.
Select the above driver as a module, and it creates a module called snd-usb-audio. The module name was the source of my confusion. I found the snd-usb-audio module when I tried to track down what made the stock kernel work, but I dismissed this module as a possible candidate for fixing this problem due to its name. It didn't occur to me that snd-usb-audio had anything to do with MIDI until I stumbled across the label “USB Audio/MIDI” in the kernel configuration. The module name itself makes it seem like the module is meant for an external sound source, not an external MIDI source.
By the way, I was inspired to set this up after getting my daughter a Korg X50, a very affordable and excellent synthesizer keyboard. The latest Korg keyboards don't seem to require any special configuration in order to connect the USB/MIDI port. However, I later discovered that the Yamaha keyboards aren't quite as friendly. You have to change some MIDI settings on the Yamaha Motif ES keyboards to make the keyboard work with the computer via the USB port.
This may seem self-evident, but the trick is to follow the instructions in the Yamaha Motif ES manual for connecting the USB/MIDI to the computer. Well, duh, right? RTFM, or more politely, read the fine manual. But when you encounter problems, it's sometimes tempting to look for tips on the Web to make the keyboard work. Be warned that you should not follow many of the instructions you'll find on the Web. These instructions are generally for Windows and the Mac, and they'll tell you how to configure the Yamaha keyboard to send the MIDI signals through the computer and echo them back to the keyboard. It's probably possible to set up the Linux driver and/or patch dæmons (such as jackd) to make Linux applications work with this configuration, but that's not how Linux behaves by default. So, this is definitely a case where you should avoid the Web and RTFM instead.
Maybe you can't afford even the Korg X50, but you want to try your hand at composing music or even just playing MIDI files. The problem is most soundcards that work with Linux do not come with a very impressive collection of MIDI sounds (such collections are usually referred to as soundfonts). Free soundfonts are available, but they don't sound as professional as some of the ones you can purchase. For example, SONiVOX MI sells a fantastic General MIDI (GM) soundfont, and it's available for just under $100 US. If you want to use a keyboard to record MIDI sequences, you can purchase one of many cheap MIDI keyboards that do nothing but send MIDI signals (they have no synthesizer included). These keyboards sell for well under $100 US depending on the quality that you'll find satisfactory.
Here's how to use the SONiVOX soundfont. First, purchase the font from the URL listed below. It has been too long since I've purchased my copy for me to recall whether the file you download is a ZIP file or a Windows executable. Even if it's a Windows EXE file, you should be able to unpack it with Wine.
Now, download and install fluidsynth and the Qsynth front end (it's as simple as an apt-get install fluidsynth qsynth from Debian and many Debian-based distros). You may have to load the ALSA sequencer drivers manually or specify the module in a file like /etc/modules. The module you want to load is snd-seq, and the command to load it is modprobe snd-seq.
Start up Qsynth, and you'll see a window like the one shown in Figure 1.
Press the Setup button. You may have to configure Qsynth with the MIDI and Audio tabs depending on the distribution and setup you use.
Now, click on the Soundfonts tab (Figure 2), and click the Open button to navigate to the SONiVOX soundfont you downloaded and installed. Click the Open button in the file picker, and you're done. Click OK on the window, and you should be ready to go.
SONiVOX 250MB GM Soundfont: www.sonivoxmi.com/ProductDetail.asp?Item=GMWavetable250Meg
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Doing for User Space What We Did for Kernel Space
- Tech Tip: Really Simple HTTP Server with Python
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide