Wednesday, 18 September 2013

Music production with Linux (part I). Routing sound with Pulseaudio & JACK

I have decided to document some of the stuff that one needs to know in order to make music with Linux and the idea is to write a number of posts covering different aspects of music creation.

The platform I'll be using throughout these posts is Ubuntu Studio 13.04 (64 bits), and first of all I wanted to write here the settings to properly and easily route all the sound generated in the computer.

Many standard applications use Pulseaudio, and only the more musically oriented ones (and not all) use JACK (JACK Audio Connection Kit), so it is interesting to know how to mix all of them together, so let's see some examples:

* Route pulseaudio stuff to JACK, so that we can, for example, listen to YouTube videos while making music with JACK-aware applications.

In UbuntuStudio, JACK Sink and JACK Source module are already installed, so the whole thing is very simple. We can start the JACK server with QJackCtl, and we will see that by default a connection from PulseAudio JACK Sink to system is already done, so JACK will route the audio of any application that goes to PulseAudio JACK Sink to the system for playback.

So now we just have to make sure that PulseAudio application will send their audio to the JACK Sink and all should be set. We do this with pavucontrol (PulseAudio Volume Control), and just select PulseAudio JACK Sink as the fallback output device.

With that in place, we both PulseAudio and JACK applications can live together happily.

 * Routing audio input, for example to record a Skype call

In order to record a Skype call we also need to change the fallback input device in pavucontrol to be PulseAudio JACK Source. With the system -> PulseAudio JACK Source connection in QJackCtl, the microphone data will be sent to JACK Source, and after setting JACK Source as the fallback input device, Skype will get that as the input for the Microphone. At the same time we can record the whole conversation for example with Audacity by also connecting JACK Sink -> JACK Source (JACK Sink will give us the audio coming from skype, otherwise we would only record what is coming from our microphone). As an example:

When this is correctly set, we can add all sorts of extra routing to our audio. For example, in the previous example with Skype, perhaps we would like to add some filters to our voice? We only need to change the routing in QJackCtl, so we do not send the system directly to JACK Source, but we route it through some other module. In the following example, I route it through the application jack_rack in order to apply some basic distortion to it.

I think you get the idea by now...

By the way, in order to get the previous screencasts, I just used Kazam, and again selecting JACK Sink and JACK Source as the devices to record from, as can be seen below:

Thursday, 12 September 2013

Rooting and unlocking my new Android mobile phone: LG-E400

Last week I got an LG-E400 for free because her owner was not really taking advantage of all its features. The phone was locked to her phone network, so I had to unlock it and root it in order to make it usable. Since I will likely need again this information in the future, I write down some of the resources used.

First thing was to hard reset it, thanks to this page, and then root it. To root it I tried with SuperOneClick, but I was having troubles. As it turns out the firmware of my phone was V10P, and so the version of SuperOneClick I was using was not able to root it. But thanks to this post by AlexPS I got it rooted without problems (it didn't work using "mono" in Linux or in a Windows virtual machine, so I had to borrow a real Windows PC just for this). 

To unlock the phone from its network, I was looking at pages like and, but the method in the second link didn't work, and the first one was for another model and I was not sure it would work, so in the end I went the easy way: just went to CodesIMEIS page, and by using the promotional code "GSM" (I got that info from some Forum I can't remember anymore), the phone was unlocked for 1€ in about 10 minutes. Then to access the Internet, I followed the instructions from my network provider to configure the phone properly.

The next thing was to increase the very small system memory (157MB, where all the applications would go by default), so that I could install more applications. For some reason the installed SuperUser app was giving me trouble, so I updated it before continuing. The next thing was to prepare a MicroSD card to hold the installed apps. Despite what it is said in some guides, I had to partition my 2GB card as 999MB FAT32 (Logical) and 898MB ext2 (Primary), following the advice at  (pictures, etc. go to the FAT32 partition, and the installed applications go to the ext2 partition).

Then, the next thing was to download Link2SD, so I followed Part C of the instructions at

After that, I installed a number of applications (Angry Birds, Endomondo K-9 Mail, ...), and the internal memory status is quite healthy, while I see that 181MB of application data have gone to the MicroSD card. Bingo!

Classical guitar progress logging (September'13)

August was too hot to play, so I skipped that recording. In September instead of a guitar recording I present this little exercise that I had to do for the Coursera course "Survey of Music Technology" (here I'm not really playing the guitar at all, but learning to mix audio (July's recording and some other sound clips) with MIDI in a DAW, this time Reaper).

Classical guitar progress logging (July'13)

I forgot to update it in July, but this was the piece for July: Summer Souvenir (by Giorgio Signorile):

Summer Souvenir (by Giorgio Signorile) from Angel de Vicente on Vimeo.