A Basic Text-Based Recording Studio
Before leaping in too far and beginning to record audio, I strongly recommend spending some time getting the various settings and levels right. The good news is that this involves plugging the instrument of your choice in to the mixer or sitting it in front of a microphone and playing.
Begin by getting the average signal coming into the mixer at around the 0VU mark, and try to avoid sending the signal into the red too often. Once the mixer levels are generally okay, connect it to your PC and check that the input level and output level are fine:
ecasound -i jack_auto -o null -ev
The -i jack_auto command-line option tells Ecasound to get its input from JACK. Because we're not running any other JACK-aware applications at the moment, JACK takes this input from the sound device. The -o null tells Ecasound to send output to the great bit bucket in the sky.
The -ev option tells Ecasound to keep track of amplitude statistics, and the -c option starts Ecasound in interactive mode. With a little luck, you should see a few informational messages and no errors or warnings.
Any percussive sounds (such as palm-muting on the guitar) are likely to cause a spike in your audio track. While checking the signal levels, use any of these techniques you intend to record later—it'll save a nasty surprise in the moment of creative genius. To stop, press Ctrl-C. You should be presented with output similar to the following:
.... (audiofx) Peak amplitude, period: pos=0.30495 neg=0.26996. (audiofx) Peak amplitude, all : pos=0.30495 neg=0.26996. (audiofx) Clipped samples, period: pos=0 neg=0. (audiofx) Clipped samples, all : pos=0 neg=0. (audiofx) Max gain without clipping, all: 3.27926. (audiofx) -- End of statistics --------------------------------
First, check that you have no clipped samples (positive or negative). Second, check the maximum gain figure. This gives the percentage that this sample can be amplified (theoretically) before clipping starts to occur. Depending on your hardware, you may never get within a few percentages before you hear audible distortion, so it pays to leave yourself a little room until you're familiar with your hardware. Listen as you test.
Once you have made mixer adjustments, try the previous few steps again.
Once you're happy with the input levels, set the output level to a comfortable level for you to monitor using your headphones.
Ecasound is a command-line tool capable of multitrack recording and more. The basic concept key to using Ecasound is chains. For our purposes, you can consider chains to be similar in function to a patch lead in a patch bay. A signal enters one end of the chain from a sound source and exits the chain into another component. A patch lead has exactly one input source and one output destination, and the same can be said about Ecasound's chain concept.
Sources and destinations for chains in Ecasound are usually audio files or audio controllers. It is quite normal to have a complex set of chains. The first track we will record will see Ecasound take audio from the running JACK instance and write the data back to JACK, as well as keep a copy in a PCM audio file. The two chains we need to perform these tasks are shown in Table 1.
This equates to the following Ecasound command:
ecasound -c -b:64 \ -a:1,2 -i jack_auto \ -a:1 -o jack_auto \ -a:2 -o track1.wav
Once Ecasound has initialised, it prompts you for instructions. Use the t command to start recording/playing and s to stop. If you make a mistake, you can issue a stop (s), the setpos 0 command, and t to start again. The q command quits when you're done. There's no need to issue any kind of command to save the result—that happens as you record.
The above command can be broken down into the following functions:
-c: don't start processing immediately, instead enter interactive mode.
-b:64: set the number of samples buffered to the smallest possible, reducing latency.
-a:1,2 -i jack_auto: create two chains (1 and 2) and set their input to come from JACK.
-a:1 -o jack_auto: set the output of chain 1 to JACK.
-a:2 -o track1.wav: set the output of chain 2 to track1.wav.
The overall result of this particular example is that chain 2 records anything coming in through JACK (and therefore probably the sound card) to track1.wav. Chain 1 allows you to hear the audio signal as it's being recorded.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Google's Abacus Project: It's All about Trust
- Back to Backups
- Secure Desktops with Qubes: Introduction
- Working with Command Arguments
- Fancy Tricks for Changing Numeric Base
- Linux Mint 18
- Seeing Red and Getting Sleep
- The Italian Army Switches to LibreOffice
- Secure Desktops with Qubes: Installation
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide