Troubleshooting Linux Audio, Part 3b
In this final section I'll present some MIDI-specific troubleshooting tips, along with a brief description of the setup here at StudioDave, a few closing remarks, and of course some links to the Linux music-maker du jour.
MIDI problems are generally easier to diagnose than audio difficulties. As you might already know, MIDI does not carry audio data, and the tools for troubleshooting MIDI problems are quite simple to use and understand. Your MIDI troubleshooting toolkit should include at least a MIDI monitor program and the ALSA amidi utility. The amidi tool can be used to send an arbitrary MIDI command string to any MIDI device in your system, and the MIDI monitor can watch the data stream to see if your command was correctly sent and delivered. Figure 1 shows off the gmidimonitor at work receiving a program change message sent from amidi.
The problem-solving flowchart remains essentially the same for MIDI as with audio. Check your hardware connections and power-on status, make sure your MIDI devices are actually supported by ALSA and that the correct drivers are installed, and check the virtual connections between your sending and receiving devices.
One special MIDI problem exists for Linux. The default kernel configuration includes a setting (under Processor Type & Features) for the timer frequency resolution, which affects the timing resolution of a MIDI data stream. If this value is set too low your MIDI streams may feel sluggish and unaligned. The resolution should be set to 1000. If it is not you will need to either install a distribution with an optimized kernel or you will have to configure and install your own kernel.
Some MIDI programs require that the kernel include an active realtime clock (RTC). Media-optimized kernels will activate the RTC as a matter of course, but if you're in doubt (or if your application has responded with an error regarding the RTC) you can check its status with the cat /proc combo :
Use this command to check set the clock to its optimal value :
echo 1024 > /proc/sys/dev/rtc/max-user-freq
To permanently add this setting to your boot options, become the root user and run the following command :
echo "dev.rtc.max-user-freq=1024" >> /etc/sysctl.conf
By the way, you should always copy the original file to a back-up location before working on it.
Some Further Tips And Recommendations
Sage advice to the interested reader: Scale your expectations. Some problems are directly due to economic necessity, i.e., what you can and can't afford. For Linux audio people that means hardware (our native software is famously inexpensive), and in this domain hardware means microphones, instruments, amplifiers, speakers, cables, mixing consoles, computers, and of course, soundcards and audio boards.
If you need professional-quality results from your Linux audio work, then your choices are few and clear. The M-Audio Delta systems are popular for serious desktop and project studio production, while the RME Hammerfall is the preferred interface for fully professional recording houses.
If your needs are more modest you might be happy with the Creative Labs SBLive and Audigy cards. Both are available with a break-out box for easy access to their audio and MIDI ports, and both provide a handy S/PDIF digital audio interface.
Standards-compliant USB audio devices should work with the kernel and ALSA USB modules. Some Firewire devices are already supported by the FFADO project; see the project archives and the archives of the Linux Audio Users/Developers mail lists for information regarding specific device support.
On-board audio chipsets are designed for consumer-grade sound support. Their quality varies with the overall quality of the motherboard, but in general you should avoid using on-board sound hardware for serious desktop audio production. This is especially true for laptops, most of which can accept high-quality USB or PCMCIA external hardware alternatives.
I have a small home studio, suitable for good quality project recordings and MIDI composition. It includes three computers, all locally networked. Two AMD64-based machines are used for project audio and MIDI work. The third machine, a PII 366 MHz laptop, is MIDI-capable, but its audio abilities are relatively weak. If needed, a CoreSound PCMCIA card provides a high-quality digital audio input channel for the laptop. All machines are accessible via MIDI. routed through a Yamaha MJC8, an 8-in/8-thru MIDI junction controller. Audio output from the computers and external hardware is routed through a Yamaha DMP11 MIDI-controllable mixer. High-quality audio production is available to both desktop machines (both include an M-Audio Delta 66 digital audio interface).
Problems I've encountered and resolved include crackling JACK, USB interference, mixer channel noises, and of course hardware issues such as bad connectors and poor connections. Fortunately I've also found valuable advice and assistance from the members of various lists, forums, and wikis, and I've been able to resolve happily all the troubleshooting issues I've encountered to date. May your own experience be as fortunate.
Linux Music Makers
Some years ago I found a page named Miki's Music that contained pieces composed with the excellent Rosegarden audio/MIDI sequencer. In the passage of time, Miki has become Wingse, the music collection has grown, but Rosegarden is still the composer's preferred music composition software. Check out the entire collection, but for a sweet taste listen to June Rainy Hill, and if you're up for some undisguised humor in music check out the lively Celtic Dance.
I'll return in a few weeks with news and updates from around the Linux audio world. So much good stuff is happening here, it's hard to decide where to focus. New packages appear, old stalwarts get stronger, and I have some interesting new projects in the works. Let me know what you'd like to see reviewed and profiled here, just add a note to the Comments section and I'll get right on it.
Similis sum folio de quo ludunt venti.
Practical Task Scheduling Deployment
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.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
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