I have a large set of voice .wav files with varying length and I want to mix a single sound fx file (fixed length) to them in a batch using Audacity’s Macros system. Further, that sound fx file being applied to all those voice wav files should fade in then fade out at the end while the voice wav files being processed stay the same volume.
So workflow looks like…
Load a batch of varying length voice .wav files
Copy single sound fx to clipboard
Fade in #2 and loop it (if its length were less than #1)
When near the end of #1 Fade out #2
Trim and save as new file
This would then move onto next voice .wav file to repeat.
Any help is VERY appreciated as I need all this automated via the macros. Thank you community!
A “normal” Macro can’t do things conditionally. A normal Macro just runs a list of commands.
“IF” is a “conditional statement”. A normal Macro can’t do that (“Nyquist-Macros” and scripting via an external language with mod-script-pipe can do this, but these approaches are much more complex and unnecessary in this case).
The approach I would take:
Manually loop the “sound fx” so that it is at least as long as the longest voice file.
Manually fade-in the start of the “sound fx” (only need to do this once).
Then create a Macro to import the “sound fx”, trim it to the same length as the first track, fade out the end, (normalize?), export.
Thank you Steve (and everyone else in the community)! Appreciate this help.
This is what I have so far in my Macro…
Command Parameters
Import2 [path to my single fixed length sound fx .wav]
Mix and Render to New Track
Export as WAV
What this does is grab the fixed length sound fx and mix it with any multi-length sound file I wish.
Problem is it does not trim the output based on the random length of the sound files that pass through.
I have faded in the fixed length sound fx .wav so that part is done but my current challenge is now:
Mix the fixed length sound fx to each incoming variable length sound file and trim it to those (not to the fixed length sound byte) and
Fade out only the fixed length sound fx based on the trim of #1.
I get a feeling #2 is gonna be a challenge if I cannot get the macro to dynamically fade in the fixed length sound fx based on when each variable length sound file starts.
Any help is appreciated especially at each stage but I’ll need actual Macro Commands, applicable parameters, and where in the sequence to place them to figure this out.
Command Parameters
Select RelativeTo="SelectionEnd" Tracks="1"
Import2 [path to my single fixed length sound fx .wav]
Cursor To Track End
Select Tracks Mode="Set" TrackCount="2"
Selection to End
Delete
Mix and Render to New Track
Export as WAV
I’m hoping this is somewhat close at least so it can properly trim first before I figure out the fade out of the sound fx.
If possible, please correct the above: I am very sure this will be used by others as I’ve never found another Audacity macro which does this.
Command Parameters
Select End="0" RelativeTo="SelectionEnd" Track="0"
Select RelativeTo="SelectionEnd" TrackCount="2"
Select End="-10" RelativeTo="SelectionEnd" Track="0"
Fade Out Use_Preset="<Factory Defaults>"
Import2 [path to my single 14sec sound fx .wav]
Delete
Mix and Render to New Track
Export as WAV
So the above will cut back -10 seconds from the end of the fixed length sound FX but that only works for voice files passing that fit correctly so this is not a solution to properly cut/trim each sound file that passes. Its also not fading out the sound fx still.
Can one see what is incorrect with the above Macro?
Fade in the background sound fx for 0.5 second from the start (we got the end one now working but if I Select Time at Project Start it will cut off the sound fx within a second) and…
Change the decibel level of the fixed length sound fx itself (taking into account the fade in and out at the ends).
Thank you so very much Steve!!
Edit: Re-evaluated your original logic and got the Fade in 0.5 at the start of the sound FX to work perfectly… Here is my update…
So essentially the new tweak is at Project Start to Fade In the fixed length Sound Fx in 0.5 seconds. Also made it 1sec (instead of 2) for the Fade Out on the fixed length Sound Fx .
So final question is if one can change the volume of either the Sound FX (Project?) or the different length sound files being shuttled through (Selection)?
Edit: ok I think I figured how to isolate the fixed-length sound fx and not the different length sound files. Here is the final Macro…