Archive

Posts Tagged ‘jack’

Linux Multimedia Studio on Ubuntu 10.04

July 31st, 2011 1 comment

Recently, Tyler linked me to Linux Multimedia Studio, a Fruityloops-type application for Linux. Since I’m big into music recording and production, he figured that I’d be interested in trying it out, and he was right. Unfortunately, the developers of same were not as interested.

To start off, I installed the application from a PPA with the following terminal commands:

sudo apt-add-repository ppa:dns/sound
sudo aptitude update
sudo aptitude install lmms

After the install process finished, I tried to launch the application from the command line, only to see a bunch of nasty error messages:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Segmentation fault

I dumped the errors into Google, and found a helpful thread on the Ubuntu forums that suggested that I uninstall Bluetooth Audio Services from my machine. Since I don’t use bluetooth audio in any capacity, I happily obliged. When finished, my list of installed items with Bluetooth in the name looked like this:

A list of installed software matching the search term "bluetooth" in Ubuntu Software Centre

Unfortunately, I didn't think ahead enough to note down the names of the packages that I uninstalled.

After ridding myself of Bluetooth audio support, I tried to launch the application again. Unfortunately, I got another Segmentation fault error:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
Segmentation fault

Reading on in the thread, I saw somebody suggest that I check the dmesg tail for messages pertaining to the crash:

jonf@THE-LINUX-EXPERIMENT:~$ dmesg | tail
[  233.302221] JFS: nTxBlock = 8192, nTxLock = 65536
[  233.314247] NTFS driver 2.1.29 [Flags: R/O MODULE].
[  233.343361] QNX4 filesystem 0.2.3 registered.
[  233.367738] Btrfs loaded
[ 2233.118020] __ratelimit: 33 callbacks suppressed
[ 2233.118026] lmms[10706]: segfault at 7f241c7fdd80 ip 00007f241c7fdd80 sp 00007f24187f8a38 error 14 in zm1_1428.so[7f241ca01000+1000]
[ 2523.015245] lmms[10808]: segfault at 7fd80e9bcd80 ip 00007fd80e9bcd80 sp 00007fd80a9b7a38 error 14 in zm1_1428.so[7fd80ebc0000+1000]
[ 2671.323363] lmms[10845]: segfault at 7fbe39a77d80 ip 00007fbe39a77d80 sp 00007fbe35a72a38 error 14 in zm1_1428.so[7fbe39c7b000+1000]
[ 2836.885480] lmms[11246]: segfault at 7f885b71ed80 ip 00007f885b71ed80 sp 00007f8857719a38 error 14 in zm1_1428.so[7f885b922000+1000]
[ 3039.773287] lmms[11413]: segfault at 7ff83056ed80 ip 00007ff83056ed80 sp 00007ff82c569a38 error 14 in zm1_1428.so[7ff830772000+1000]

On the last few lines, you can see that the error was thrown in a module called zml_1428.so. A bit of Googling turned up the fact that this module is a part of the LADSPA (Linux Audio Developers Simple Plugin API) stack, which provides developers with a standard, cross-platform API for dealing with audio filters and effects.

Scrolling down in the aforementioned thread, I found a post that suggested that I kill all PulseAudio activities on my system before attempting to run the application. PulseAudio is another part of the Linux audio layer that allows user-land applications to talk to your sound hardware via a simple API. It also provides some effects plugins and mixdown capabilities. I went ahead and killed the PulseAudio server on my machine with the following command:

jonf@THE-LINUX-EXPERIMENT:~$ killall pulseaudio

After executing this command, I still got a Segmentation fault when starting LMMS under my user account, but did actually get to a Settings panel when running it with Sudo:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
Home directory /home/jfritz not ours.
ALSA lib pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave
Playback open error: Device or resource busy
Expression 'snd_pcm_hw_params_set_buffer_size_near( self->pcm, hwParams, &bufSz )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1331
Expression 'PaAlsaStreamComponent_FinishConfigure( &self->playback, hwParamsPlayback, outParams, self->primeBuffers, realSr, outputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1889
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Couldn't open PortAudio: Unanticipated host error
Home directory /home/jfritz not ours.
Home directory /home/jfritz not ours.

Although the output appeared to be riddled with audio layer errors, and the Audio Settings tab of the Setup panel gave me a clue as to why:

Notice how the Audio Interface setting in that image says “Pulse Audio (bad latency!)”. I would hazard a guess that the latency issues with PulseAudio have something to do with the fact that I killed it just prior to getting this damned thing to launch. When I hit the OK button, I was able to see the application, but there was no sound.

Figuring that sound was a necessary component of an audio production application, I booted back to the Setup menu, and told the app to funnel its audio through JACK instead of PulseAudio. The JACK Audio Connection Kit is another sound subsystem, kind of like PulseAudio, that provides an API that developers can use to interface with a machine’s audio hardware. Because of its low latency performance, JACK is often considered to be the standard API for high-quality audio recording and production apps. Unfortunately, it doesn’t work worth a damn in LMMS:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
jackd 0.118.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

no message buffer overruns
JACK compiled with System V SHM support.
loading driver ..
SSE2 detected
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
SSE2 detected
all 32 bit float mono audio port buffers in use!
cannot assign buffer for port
cannot deliver port registration request
no more JACK-ports available!
No audio-driver working - falling back to dummy-audio-driver
You can render your songs and listen to the output files...
Home directory /home/jfritz not ours.
Home directory /home/jfritz not ours.
the playback device "hw:0" is already in use. Please stop the application using it and run JACK again
cannot load driver module alsa
Home directory /home/jfritz not ours.

Having dealt with JACK on a previous install, I had one more trick up my sleeve in my effort to get this bastard application to make a sound. I installed the JACK Control Panel from the Ubuntu Software Centre. It’s a QT app that interfaces with the JACK server and allows you to modify settings and stuff.


With it installed, I pressed the big green (or is it red – I’m colour blind, and hate when developers use these two colours for important status messages) Start button, only to encounter some nasty errors:


That might be a problem. I hit the messages button and found a message advising me to make a change to the /etc/security/limits.conf file so that JACK would be allowed to use realtime scheduling:

JACK is running in realtime mode, but you are not allowed to use realtime scheduling.
Please check your /etc/security/limits.conf for the following lines
and correct/add them:
@audio - rtprio 100
@audio - nice -10
After applying these changes, please re-login in order for them to take effect.
You don't appear to have a sane system configuration. It is very likely that you
encounter xruns. Please apply all the above mentioned changes and start jack again!

I figured that it was worth a shot, considering how far I’ve already gone just to try out a piece of software that I don’t really even need. I made the requested changes in the config file, restarted my machine and tried again… only to be greeted by the same damned error message.

At this point, I decided to give up on LMMS. It’s too damned complicated, and ultimately not worth my time. Perhaps when they release a version that I can install and start using without an hour of troubleshooting, I’ll come back and give it another shot. In the mean time, if you’re looking for a decent drum machine with more than a few tricks up its sleeve, check out Hydrogen Drum Machine. It works very well, and I’ve created some neat stuff in it.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

My Search for the Best Audio Editing Software

October 6th, 2010 7 comments

Lately, I’ve been doing some audio recording. In addition to a couple of podcasts that I work on, I occasionally like to record my own musical compositions. While there seems to be no shortage of high-end audio editing applications on either Windows or Mac, the situation on Linux is a bit more sparse. Faced with some frustration, I went out and downloaded a number of linux-based audio editors. I used Wikipedia to find the software in the tests below, and following are my totally subjective and highly biased reviews of each.

Each piece of software was used to edit some raw recordings from a podcast that I have been involved with lately. This source material is almost 100% spoken word, with some music and sound effects sprinkled throughout. It’s important to note these details, as your needs may vary drastically depending on the type of audio project that you’re working on.

Audacity:

The Audacity Project is kind of the Linux standard for non-professional audio editing. It was the first application that I tried to use, mainly because I was familiar with earlier versions of the program that I had once used back in my Windows days. Audacity includes a great number of features that make it ideal for post-processing of any audio project, including a wide array of effects, some great noise generators, and a few analysis tools that make it perfect for cleaning up your finished file before publication.

Audacity audio editor with a demo project loaded

Audacity audio editor with a demo project loaded

Unfortunately, I found that it lacked a usable GUI for editing podcast material. In particular, it seems to be missing the ability to edit a single track in a multi-track project without unduly affecting the other tracks.By default, if you use the selection tool to grab a portion of audio that ought to be deleted from one track in the project, it seems to delete that portion of audio from all tracks in the project.

I found this out the hard way when I played back the master track that I had assembled my finished podcast on, only to find out that significant portions of the audio had mysteriously gone missing at some point during the editing process.

To make matters worse, I closed the application, lost the undo record for the project, and had to start the editing process from the beginning.

This lack of GUI polish also exhibits itself in the way that you can interact with the audio tracks themselves. Unlike in most DAW solutions, a portion of audio that has been clipped out of a larger track cannot seemingly be moved around in the project by clicking on it and dragging it across the stage with the mouse. At least I couldn’t figure out how to do it, and ended up relying heavily on my cut, copy, and paste functions to edit my project. This is a poor way to work on a project of any kind of complexity, and makes projects that rely on audio loops a pain to assemble.

Ardour:

Where Audacity is suited more towards hobbyist recording setups, Ardour aims to be a professional audio solution that is capable of competing with mainstream software like ProTools. It is a fully featured audio suite that can allegedly do most everything that you may require, but as such, can also confuse the hell out of first-time users with its complicated GUI and lengthy manual.

Granted, this is hardly a slight to the project, because it really isn’t suited to my needs. It is a pro-level audio environment that can be used as the centrepiece to a full recording studio or stage

Ardour wants sole control of my audio interface

Ardour wants sole control of my audio interface

show. If you just want to edit a podcast, it may not be the tool for you. As such, if the GUI seems challenging and you find the documentation to be long-winded, you may just be using the wrong tool for the job.

The biggest issue that I had with this piece of software was getting it to run at all on my machine. It uses JACK to attach itself to your audio interfaces in the name of providing a perfect sampling environment that doesn’t get slowed down by having to share the interface with other pieces of software.

Unfortunately, this means that in order to use it, I had to quit all other processes that are capable of generating sound, including this web browser. This is a pain if you are trying to run Ardour in a multi-application environment, or need to reference the internet for anything while working.

After reading the introductory documentation and adjusting the settings in the startup dialog for about 15 minutes, I simply gave up on Ardour without ever managing to get into a workspace. It seems to be far too complicated for my needs, and doesn’t seem worth my time. Your mileage may vary.

Jokosher:

From the moment that I started reading about this project, I like the sound of it. Jokosher is a multi-track recoding and editing environment built on top of Python and GStreamer that was

Jokosher may look cartoony, but it may be exactly what you need for small projects

Jokosher may look cartoony, but it may be exactly what you need for small projects

created by a podcaster who was unsatisfied with the audio editing tools that were available on Linux. The application focuses on being easy enough to use that non-technical people like musicians can pick it up and get their ideas down with minimal hassle. Think of it as Garage Band for Linux.

Indeed, just as the website promised, I was able to get a working environment set up in a matter of minutes. The editing tools allow for splitting the audio, grabbing it and moving it around, and non-destructively editing multiple tracks at the same time (I’m looking at you, Audacity). The GUI also has a beautiful polish to it that, although a tad cartoony, really makes the program look and feel simple. For editing something like a podcast, I’m not sure that this application can be beat.

The only issue that I encountered in my short time using Jokosher was with its support of LADSPA plugins. These are free audio plugins that can be used to apply effects to the different tracks of your audio project. When I tried to use them from within the application, it instructed me to download some from my repositories. Upon checking Synaptic, I saw that I already had a number of them downloaded. Even after installing more, the program did not seem to pick them up.

All in all, this project lived up to its hype, and I will most certainly take some time to break it in, and may write a more in-depth review once I get used to it. If you’re doing podcasting, you owe it to yourself to check this app out.

In Conclusion:

Each of the three applications that I tried to work with while writing this piece deserve your respect. The underlying audio framework of most Linux systems is a veritable rats’ nest of subsystems, platforms, daemons, plugins and helper applications. I would wager a significant amount of money on this situation as the reason that we don’t have ProTools and its ilk on our platform of choice. I’ve done a little bit of work with GStreamer, and even it, as perhaps the prettiest and best supported of all audio libraries on the platform, left me scratching my head at times.

When choosing audio software, it’s important to keep in mind that you need a tool that’s uniquely suited to your project. Since I’m editing podcasts and fooling around with drum loops and samples of my guitars, Jokosher does just about everything that I need and more. I may use Audacity for post-production, or to record my source audio (simply because I haven’t tried recording in Jokosher yet – I know that Audacity works), because it falls somewhere in between a simple editing tool and an advanced platform. Ardour, meanwhile, is probably suited towards the more hard-core audio engineer slash system administrator types who are so fanatic about recording quality that they are willing to sacrifice an entire box for running their DAW software. It’s simply more power than the majority of hobbyist enthusiasts really needs.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.