This page was edited more than a year ago (2012-01-30), content might not be relevant or accurate anymore.

Audio recording in Linux

Please note that I am only amateur. Also this is not of much use for someone seeking tutorial, just few tips for Ardour:

  • turn on editor mixer strip (Shift-E) and there you can access input selection for Track (for recording) or Bus (for real-time monitoring) and also add effects or external inserts just underneath it
  • Busses are apparently useful also for track which share same effects (or sharing same settings for monitoring with effects while recording clean track and using the output for (re)recording another track with effects applied)
  • you can also turn on Click (metronome) as needed but you have to set output in Preferences
  • notice No Grid/Grid/Magnetic setting (Grid will snap to beats by default)
  • you can change Tempo by right clicking on first tempo marker (affects snap to grid and metronome)
  • use Mute/Solo settings for track when recording as needed
  • shortcut for recording is Shift-Space (will start recording on all tracks with enabled recording)
  • there are also tricks like destructive tape mode or looping and recording over and over again on some region until you achieve your best take… but I don't know much about that yet (the first one is probably useful for rerecording hydrogen or synth tracks).

Before you start recording

  1. Tune your instrument (some recommend to do this before every take)
  2. Prepare your sound – check pickup switch and tone on guitar
  3. Adjust volume level to avoid any possible clipping in the loudest part

Hardware

You should get decent hardware which should support 24-bit recording. Duplex. I have M-Audio Fast Track Pro which has patch for this and since Linux version 3.1 should be working out of the box.

You can get 24-bit duplex mode with maximum 48 kHz on my card. Which is fine. You should use 44.1 kHz for music production (audio CD) or 48 kHz for movie production (DVD). Recording at 24-bit means 256-times more precise recording than recording 16-bit, which means you can have better sound even with lower volume levels (and lower risk of clipping). That is why 48kHz @ 24-bit is better than 96kHz @ 16-bit. Higher sampling frequency also needs more space to store without much added value.

Just a little example:

  • 1 minute of 44.1 kHz @ 16-bit mono recording is a little over 5 MiB (10 MiB for stereo)
  • 1 minute of 44.1 kHz @ 24-bit mono recording is almost 7.6 MiB (15.2 MiB for stereo)
  • double the size for 88.1 kHz and double again for 176.2 kHz

You have tracks of this size for each instrument and also unused instrument recordings, clean track and with applied effect. My first simple multitrack recording used almost 500 MiB and had only 3 final tracks under 3 minutes. I really didn't record much, samples were reused quite heavily.

You shouldn't care much about latency for mixing in Ardour but for real-time monitoring with effects it's important to achieve unnoticable delay. Latency of 5.8 ms is fine but I've seen XRUNs (causing nasty clicks) with VST effect on normal kernel, otherwise it seems to be really stable.

M-Audio Fast Track Pro USB

For specific information you should look at this howto: M-Audio Fast Track Pro for Debian Linux @ 24 bit with RT Kernel.

You can get:

  • 24-bit duplex up to 48 kHz
  • 24-bit playback or recording only up to 96 kHz

You won't get 96kHz 16-bit duplex, at least not with this driver. But as I explained, that should not bother you.

If it's not working out of the box add this to /etc/modprobe.d/fast-track-pro.conf (make sure you unload driver after changing any settings or they will not be applied):

options snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x09

Sometimes the card is not added to ALSA, turning it off and on again and sometimes modprobe -r snd-usb-audio; modprobe -r snd-usb-audio will fix it. If you get noise from inputs you will have to do it too.

I didn't do much testing on realtime kernel but these are my experiences:

  • Minimum buffer size for this card is 64 (1.5ms latency) – works only with real-time kernel (no XRUN).
  • Buffer size for normal kernel is 256 (5.8ms latency).
  • Number of buffers is 2 (there are some general recommendations to use 3 for USB cards, this will add to latency).
  • HW monitoring and HW metering are supported.

Software

This is a list of preferred software for recording and related tools.

Basics (you don't have to have real-time kernel but it's better):

  • Real-time Linux – included in Debian wheezy (I tried versions 3.1 and 3.2)
  • jackd – you absolutely need this for low-latency audio and routing
  • qjackctl – I also use this to control Jack routing but various applications may let you do it too
  • chrt – you can set real-time priority of process

In Debian you should automatically get appropriate settings in /etc/security for audio group which will allow Ardour to start jackd with real-time priority.

Applications:

  • Ardour – DAW for multitrack recording
  • Hydrogen – drum machine
  • audacity and rezound for editing sound files (or to check for clipping in exported files)
  • jamin for mastering final mixed track (you can also plug it to Master bus via insert in Ardour or externally via Jack routing) – I have no tips whatsoever for mastering but you can compress or equalize track
  • synth stuff (I'm not really using these): zynaddsubfx, rosegarden, lmms (it is said to be like FL Studio) and also Ardour 3 should start to support MIDI stuff directly

Effects:

  • guitarix 0.18 and newer
  • rakarrack (includes some crazy presets)
  • dssi-vst – you can even run 32-bit VST plugins (vsthost plugin.dll) but I was having problem with XRUNs (real-time priority probably helped), it should be even be possible to run automatically from Ardour as LADSPA but it just makes loud noise here
    • Juicy77 guitar distortion and amp simulation
  • check packages under ladspa-plugin and lv2-plugin in Debian and there is also fil-plugins package with another LADSPA plugin
  • there is also dssi-plugin but this is not directly usable from Ardour

More software on Wikipedia: List of Linux audio software

Various tips

  • Record 2 guitar tracks and pan them to the left and right for better sound (I am skeptical about using different recordings, probably works only for distorted guitar, but panning should really make some room in the center for vocals or bass or something else…) (discussion)
  • Don't reuse samples, it degrades quality of song (maybe less if you have perfect take but generally if it repeats a lot it can be noticable).

Mixing tips

Again, keep in mind that I am amateur:

  • Always think about what instrument sound you are aiming for but focus on how the final mix is sounding – to know precisely how to do that will probably come with experience.
  • Set your speaker volume high, don't increase track volume to hear what's going on (or you're going to get clips in the final mix – it all adds up).
  • If you're recording 24-bit then really don't record with volume too high – this is good for avoiding clips and should help mixing and mastering.
  • You probably want subwoofer to hear what's going on in the lows – you won't hear that in earplugs (also boosted bass can sound ok in the earphones but will be muddy on the subwoofer – try to compare with recording you like). Don't be afraid to cut down low frequencies.
  • Record kick drum separately even if you use Hydrogen (use solo and mute) – you can then treat it separately as bass instrument.
  • Use high-pass filters on all non-bass instruments to make room for bass instruments – generally try to cut down frequencies which are not characteristic to the instruments so they don't interfere, not only with bass instruments (this can be also applied to bass at very low frequencies if you're target genre is not dub with added subharmonics).
  • Use equalization (EQ) mainly to cut down unwanted frequencies, not boost other frequencies to cover them up.
  • Think about higher harmonic frequencies (I've seen mentioned boosting 900Hz for bass guitar).
  • There's also tip to cut down 400 Hz on drums to separate a bit the kick drum and the rest.
  • Keep bass instruments in center, pan guitar left and right.
  • You can pan highs, mids and lows of final track in Jamin – it's very easy to preview the immediate result.

So most of this is high-pass filter and EQ plugins. There is LV2 Invada plugin for monitoring frequencies which you can do in Ardour. You can also monitor frequencies via Jamin.

Links

 
Back to top
howto/audio_recording_in_linux.txt · Last modified: 2012/01/30 20:32 by disorder
 
 
disorder's homepage Valid CSS Valid XHTML 1.0 Recent changes RSS feed