A Basic Text-Based Recording Studio
Unless you're recording a live stereo track, you're likely to want to overdub other tracks. It is possible to use Ecasound to listen to tracks you've already recorded while recording (and listening to) a new track.
To listen to an already-recorded track while recording a second track, create three Ecasound chains (Table 2).
Table 2. Chains for Listening to an Already-Recorded Track While Recording a Second Track
| Chain | Input Source | Output Destination |
|---|---|---|
| 1 | track1.wav | JACK |
| 2 | JACK | JACK |
| 3 | JACK | track2.wav |
Creating a chain setup like this causes the contents of track1.wav to be sent to JACK to be played, and any input from JACK is sent back to JACK and saved to a file called track2.wav. track2.wav will contain only the new track—not the new track mixed with the old track. We'll mix them later.
Converting this chain setup to an actual Ecasound command is straightforward:
ecasound -c -b:64 \ -a:1 -i track1.wav \ -a:2,3 -i jack_auto \ -a:1,2 -o jack_auto \ -a:3 -o track2.wav
Recording further tracks is a similar process. We create a chain for each of our already-recorded tracks and set their output to JACK. We also set up two chains to take input from JACK and send it to a file and back to JACK, so we can hear it. The chain setup in Table 3 would suffice.
Table 3. Chains for Recording More Tracks
| Chain | Input Source | Output Destination |
|---|---|---|
| 1 | track1.wav | JACK |
| 2 | track2.wav | JACK |
| 3 | JACK | JACK |
| 4 | JACK | track3.wav |
This chain setup translates into the following Ecasound command:
ecasound -c -b:64 \ -a:1 -i track1.wav \ -a:2 -i track2.wav \ -a:3,4 -i jack_auto \ -a:1,2,3 -o jack_auto \ -a:3 -o track3.wav
I'm not a drummer, but some of the things I record need drums. Although the Hydrogen drum machine is probably the best that I have seen on Linux, it hasn't yet attained the magical 1.0 version number and isn't yet perfect. One feature that's broken in the snapshot I'm running is the ability to export to a PCM audio .wav file. As luck, or rather good design, would have it, Hydrogen can use JACK to output digital audio.
To use JACK and Ecasound to record the output of an audio application such as Hydrogen, we can perform the following steps:
Configure Hydrogen to use JACK for its output.
Configure Hydrogen to play in song mode, as opposed to pattern mode.
Execute the the following command:
ecasound -a:1 -i jack_auto -o drum_track.wav -G jack,ecasound,recv
Click the play button in Hydrogen.
The above command configures a single chain within Ecasound that draws input from JACK and sends output to a file called drum_track.wav. The -G jack,ecasound,recv instructs Ecasound to listen to JACK for a start command, which is sent when we click the Play button in Hydrogen, as a JACK client called ecasound.
It can take a second or so for Ecasound to start and initialise after receiving the start command, so I like to have a pattern of silence at the start of the Hydrogen track.
Unless you have impeccable timing, you would most likely record any software sources first. It is harder to synchronise a software source, such as a drum machine, with an existing human-recorded track than is is to record the human tracks around the machine-created tracks. This includes any MIDI tracks you intend to use.
At this point, we have a series of .wav files that correspond to each of the audio tracks we have recorded. Should we need to, we could use Ecasound, SoX or even Audacity to add effects or make minor corrections or alterations to any of the tracks. Once we're happy with the individual tracks, we can mix a single master track.
The process of turning our multiple tracks into a single stereo master track is straightforward. We create a chain for each track and set the output to be a .wav file.
Table 4. Turning Multiple Tracks into a Single Stereo Master
| Chain | Input Source | Output Destination |
|---|---|---|
| 1 | track1.wav | all_tracks.wav |
| 2 | track2.wav | all_tracks.wav |
| 3 | track3.wav | all_tracks.wav |
Ecasound provides a means to make this particular case easier. The all pseudo-chain name can be used to redirect the output of all of our tracks to a single place, namely a file called all_tracks.wav:
ecasound -a:1 -i track1.wav \ -a:2 -i track2.wav \ -a:3 -i track3.wav \ -a:all -o all_tracks.wav
To listen to the result, enter:
ecasound -a:1 -i all_tracks.wav -o jack_auto
It is also possible to write the master directly to the sound card without writing to a file first:
ecasound -a:1 -i track1.wav \ -a:2 -i track2.wav \ -a:3 -i track3.wav \ -a:all -o jack_auto
You also can attach a series of effects, including reverb, compression and amplification to each chain before it is written to the output destination. It is even possible to add delay and alter the panning of a particular track or even perform noise reduction; however, such topics are beyond the scope of this article.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- What's the tweeting protocol?
- New Products
- Trying to Tame the Tablet
- Dart: a New Web Programming Experience
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




19 min 28 sec ago
17 hours 7 min ago
19 hours 40 min ago
20 hours 57 min ago
21 hours 32 min ago
21 hours 54 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 6 hours ago