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.
|Contrast Security's Contrast Enterprise||Aug 30, 2016|
|illusive networks' Deceptions Everywhere||Aug 29, 2016|
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
- Contrast Security's Contrast Enterprise
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- illusive networks' Deceptions Everywhere
- Happy Birthday Linux
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- Tech Tip: Really Simple HTTP Server with Python
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- All about printf
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide