Playing Asynchronously

Suppose that I have a project that has four tracks in it. These tracks are not meant to be played together (i.e., they are different songs). I know I can play each of them individually by muting all but the one to play. But, as far as Audacity is concerned, these tracks appear to be synchronously “connected” within the project. So if I unmute 2 tracks and play, they are played synchronously on top of each other.

Is there a way to play more than one track asynchronously? That is, start playing track 1 (which is 20 seconds in duration) and then, after 5 seconds, start playing track 2 on top of track 1?

Could generate 5 seconds of silence at the start of track 2.
Or use Audacity’s time-shift tool

to shift track 2 forward by 5 seconds.

That brings us to a very old feature request. If I Time Shift Tool a song to the right, does that one song export automatically assume I want the silence with the export (like most people want).

Koz

If two tracks are present and track two is muted, can I start playing then use scripting to shift track 2 to the current position, un-mute track two and then play both? Think about it as two buttons - button one plays the first track and button 2 plays the second track. I push button 1, track one starts, then I push button two - programmatically, button two shifts track two to the current play head position and un-mutes it. Is that possible, or can I only shift tracks when the project is NOT playing?

Not in Audacity. DJ Mixer software may be what you’re looking for, e.g. … https://youtu.be/53sjKsFMgVw?t=4m20s

It turns out that you can turn on ALSA’s dmix plugin which allows software mixing of files played with ALSAs toolkit (e.g., aplay). Since the audio out of my soundcard goes to my mixer and then is sent back to the audio in, I can use aplay to play the clips (bumpers, really) and mix it back into Audacity for recording.

This is the simplest solution and since ALSA operates at the kernel level, I think this method incurs less overhead. I just have to create an interface to control the files played.

The (mod-script-pipe) scripting interface in Audacity 2.3.0 will allow you to mute and unmute tracks. This may not be available in earlier versions.
Audacity cannot play two tracks from different time positions at the same time, and track audio cannot be moved to a different time during playback.
Mixxx is able to play two different files with different play positions simultaneously (https://www.mixxx.org/)