Sunday, October 7, 2012

Creating an almost free music recording studio.

If you have ever considered creating your own music recording studio at home, you might have some misconceptions about what it actually takes. One of the purposes of this blog is to dispel these myths.

As my previous posts point out, even a 10 year old computer can be turned into an audio workstation capable of producing high quality stereo audio. (hint, the secret is LINUX!). Using an open source operating system like Ubuntu Studio, not only do you get all the tools an audio engineer might need, you have access to a growing collection of music recording software, that would otherwise cost thousands of dollars.

Much of this free audio software replaces the need to purchase expensive hardware, for example, 2 programs, called guitarx and rakarrack act as virtual amplifiers and effect racks. Negating the need for actual effect racks and stomp boxes. Rakarrack alone easily replicates thousands of dollars worth of effect pedals if you were to purchase them separately.

Guitarists in particular will have a lot of fun with just those 2 programs, but it certainly doesn't end there, not by a long shot. There is really software to cover any need you might have when it comes to creating and producing your own music. Virtual synthesizers, pitch correction, mixing.. you name it.

Ok, so what about the things that you simply can't replicate on a computer. When it comes to the physical elements of your studio, there are areas that can be done cheaply, and then a few you should absolutely not skimp on.

For example, I use an old 4 track cassette recorder as a 4 channel mixer, and have it's line out plugged into the line in jack of my sound card. The recorder was destined for the junk yard, so it was free, I did however spend about $25USD on some high quality shielded audio cable and 4 adapters, the male stereo headphone to 2 mono female kind. Eg; skrimp where you can, but not where it matters. Excessive line noise is a killer.

If you'll be recording vocals or acoustic instruments like saxophones, you will need to invest in at least one recording microphone. As high quality as you can afford. If you'll be recording something like drums, or groups of acoustic instruments you may need anywhere from 3 to 12 microphones.

UPDATE: I'm going to get on e of these.. http://www.bluemic.com/snowball/

Luckily, microphone technology is such that even bottom end products from the major manufacturers will provide quality results. The choices can be a bit daunting, but it really boils down to what your specific needs are. DO be cautious of microphones that require phantom power, if you don't have powered XLR jacks, they will be useless to you.

Once the software side is handled ala Linux, and the hardware side is handled, ala re purposed hardware, quality cables, microphones and studio monitors. All that is left are some tips to ensure your recordings are as good as they can be, but I'll post all that soon. Promise :D

Friday, October 5, 2012

Getting a free audio workstation for you home recording studio

Greetings fellow netizens!

My first post here talked.. er rambled about how the Windows operating system isn't really ideal for use as an audio work station, unless you have very current hardware, and have optimized the operating system, as much as it will let you at least.

Linux based operating systems are much more suited to the task, and can transform an otherwise outdated collection of hardware into a very usable system. Actually I am amazed with what I am able to do using a lowly 2GHz CPU and 1GB of RAM. 2GB now :D

The crux of that assertion is due to Windows inability to get under the hood. Compared to Linux, Windows is extremely limited on what you can do to effect how the OS uses system resources. There is also tons of free open source software that negates the need for expensive audio apps & hardware.

Even still, a fresh install of a Linux based operating system will likely need some tweaking, both to free up as much resources as possible, and optimized for real time audio work. Since my previous post talked about installing Ubuntu, and then transforming it into Ubuntu Studio, I thought maybe I should provide a bit more detail on that process.

  1. Install Ubuntu, I used the handy Windows installer found here
    http://www.ubuntu.com/download/desktop/windows-installer
  2. Using the "Ubuntu Software Center" install the "Synaptic Package Manager"
    You'll thank me later for this tip

  3. Follow the directions here...
    https://help.ubuntu.com/community/UbuntuStudioPreparation
    Particularly the "Real-Time Support" section which will walk you through steps to optimize the system for audio work.

  4. To free up a bit of RAM, I recommend changing the window manager from the default to a lightweight version like XFCE or maybe FVWM
    See https://help.ubuntu.com/community/Installation/LowMemorySystems#Adding_a_Window_Manager

  5. My next step was to use Ubuntu Software Center to remove a bunch of software I wouldnt be using, but that is optional of course.
  6. Finally, check out all the goodies in the Multimedia section of your applications menu (and just think, it was all FREE !)

As mentioned in my previous post, at this point I used 3 programs to "dial in" in the setup. Namely Qjackctl, Hydrogen and SooperLooper.

QjackCTL is a GUI to help you configure the Jack audio service. Using it's Setup menu, you can try various sampling rates, frame and buffer sizes until you find the optimal settings for your unique hardware setup. After every change, I'd restart the jack server, play a simple drum track with Hydrogen which is connected to SooperLooper via Qjackctl's "Connections" panel. I also had the output of a guitar plugged into the LINE IN jack of my sound card (using the microphone jack is not recommended)

Once I had a basic loop created, I'd overdub it 3 to 4 times and then listen for a few minutes, keeping an eye on the overruns (aka XRUNS) counter. Once I was able to do that with no audible pops or clicks, and zero overruns, I knew my settings were pretty close to optimal.

I wound up with a sampling rate of 48000, 64 frames, 2 period buffers, and 128 port maximum. Oh, and full duplex too. That gives me an estimated latency of just 2.67msec. Well under the 8msec boundary where delays start causing noticeable timing problems. Not bad for a 10 year old computer eh?

I could likely bump things up a bit, but I'm satisfied with the responsiveness and the quality of the audio at this point. So now time to play with all those marvelous toys under the multimedia menu.. OOoh Rackarrack is fun too !

Wednesday, October 3, 2012

Meet my freind Jack

Howdy and thanks for checking out my blog's first post ! \o/

My name is... uh, not Jack. My friends call me Dewed (rhymes with food) but I'll introduce Jack in a little bit.
There are a lot of musicians out there and while I certainly say hey to you all, I'll mainly be talking to those that are recording their original music at home, or would like to start their own home recording studio.

I thought my first post should be about dispelling common misconceptions about what it actually takes to produce CD quality stereo audio.

I'd guess the most prevalent misconception is ...
A typical home computer just isn't fast enough.

In actuality, most off the shelf computers made since the year 2000 or so could be transformed into a decent audio workstation. Of course a faster CPU and more RAM will improve the experience and in turn, the end result, but my point is, if properly optimized, even a lowly 1 Ghz Pentium cpu, with a decent amount of RAM can be used to record single tracks, and mix those tracks into a stereo audio file with acceptable quality.

Of course the manufacturers of the computers and audio specific hardware won't tell you this. It's bad for sales.

As far as audio hardware goes, they often hype things like sampling rates. Touting numbers like 96KHz or 192KHz. The truth is, the human ear can not tell the difference. Furthermore any perceivable difference that might exist will likely be lost in the mix down/playback stage, where audio hardware often re-sample the signals internally, and speakers without extremely flat frequency responses send the sound to your ears. As a final point on the topic, 44.1KHz is commonly referred to as "CD quality", and even 32KHz is still a higher rate than your FM radio gets. eg; Don't believe the hype.

The other number commonly slung around as a marketing ploy is something called bit depth. Fortunately for the layman there are fewer choices, and as a result, less marketing hype on that topic. Suffice it to say, recording audio with a bit depth of 16 bits will provide good results, 24 bits might be better. but again, any perceivable differences in the audio will likely be lost during the mix down/playback stage. 32 bit, for typical home recording scenario is overkill.

Basically you want a computer than can handle recording at 16bit, and 44.1Khz minimum, and if you are reading this, there is a good chance you have one.

My computer *should* work, but I get bad results

A couple of paragraphs ago I used the phrase "properly optimized". In most cases I've found even 10 year old hardware is perfectly capable of doing what I want it to. It's the software that causes problems, especially when using an older "hand me down" computer. Likely the biggest contributor to bad audio performance is the operating system itself, this is especially true if you use Microsoft Windows© Windows simply isn't optimized for any single task like audio production, and worse, you have almost no direct control over how the operating system allocates system resources.

So, to those trying to get started using a windows system, my best advice, use a Linux based OS instead.

OH NOES LINUX !! ? wait, whats that?
Linux is a free operating system that has hundreds of varieties. Many of the various distributions (called "distros") are often designed with a specific task in mind. Anything from network security, software development to, you guessed it, multimedia production, which of course includes audio.

So how do I get Linux on my computer? There are a lot of ways, but the easiest I've found is by using a Windows system to download an installer. And as luck would have it, Ubuntu, one of the more popular Linux distros has one you can grab from here http://www.ubuntu.com/download/desktop/windows-installer

Downloading it, and launching it will let you install Linux to coexist with your existing Windows install so when you boot your system, you'll get a choice of which OS you want to use.

Ok, I have Ubuntu installed, now what?

You are off to a good start, but if your computer is a bit out of date, an out of the box Ubuntu install isn't going to perform very well, again it isn't optimized for audio, but unlike Windows, you can "get under the hood" and rip out anything that you don't need that could potentially hog your RAM and CPU.

I've taken a couple of approaches to address this and thus far the best I've found is to convert a stock Ubuntu install into a "Ubuntu Studio" install. You'll find info on doing that here, https://help.ubuntu.com/community/UbuntuStudioPreparation

After following the steps there, most likely you are done. Now its just a matter of figuring out what software does what you want it to do, which brings us to Jack..

Jack (Jack Audio Connection Kit) is a collection of programs that run on Linux (and Mac OSX) that allows you to "Jack" one audio program into another, so you can for example launch an app called Hydrogen to create a drum beat, and using Jack, connect the audio output into another app, like SooperLooper (a very fun sampling looper app) Likewise you'd use Jack to connect the output of SooperLooper to your sound card for playback. Jack can also handle MIDI routing, but admittedly, I'm a bit of a MIDI nub. Other than scratch drum tracks, I don't really use it.

You've already installed Jack at this point, but you can read all about it here http://jackaudio.org

So .. my first suggested task to you. Launch qjackctl (Jack ConTroL), setting it for a 44.1KHz sampling rate. Use the "Connections" button to connect your sound cards line in into SooperLooper's input, and SooperLooper's output to your playback method. Try making some basic loops with your chosen instrument. I typically make the initial loop by creating a beat with Hydrogen, and connecting its output to SooperLooper. A timely click on the record button, and another 4, or maybe 8 bars later and I have my first loop. Then I switch back to Hydrogen, and stop the play back there. Now I can go back to SooperLooper and overdub to my hearts content.

If the sound is good, try the next higher sampling rate 48KHZ (you usually need to restart JackD when making these types of changes.) You should also see if enabling the "real time" option improves matters.

Note as you change frame and sampling rate values, the setting panel shows the estimated latency. A high latency will result in excessive over runs. Ideally, latency will be 5ms or less, somewhere around 8-10ms the effects of high latency become noticeable, resulting in clicks and pops and occasionally crashes.

Ok, I made a basic loop, but I hear pops and or my computer crashed

Well that is a shame, but don't worry. Chances are there is one or more things that need to be tweaked a bit. First you'll want to ensure that your soundcard actually supports the sampling rate you've chosen. Another common cause is something called over runs, where the system simply can't keep up. If you find the problem is due to over runs, there are basically 2 approaches, both aimed at decreasing latency.

1. Freeing up as much system resources as possible, RAM and CPU.
2. Lowering the frame/buffer rates and if you absolutely must, the sampling rate.

So, step one. I suggest swapping out the Windows manager, the software responsible for how your desktop looks and behaves. The stock Ubuntu window manager is a little challenging to run for older hardware, so you can replace it with a "lightweight" version like Xfce to free up a bit of RAM and put less strain on the CPU.

Another common resource issue is motherboards with integrated video cards. Often they use a portion or your computers RAM as video RAM. You should be able to reduce the amount of RAM allocated for video in your system BIOS. Since this is an audio work station, 32MB allocated to video should be fine, but ideally the built in video card should be disabled and a standard video card installed to ensure all of your RAM is being used for the task at hand, audio.

Well.. I guess I've rambled long enough. Soon I'll be posting more stuff related to using Linux based systems as audio workstations, and reviewing the plethora of open source audio software out there.

Till then \m/