1

I use Audacity to pre-process sound before mixing the takes. I have found good settings for the relevant effects (noise reduction at 24 dB, compressor at 6:1, soft limiter at -10 dB) and the rest is mindless manual clicking through about 100 takes.

I like Audacity because of noise reduction learned from a profile; otherwise I can change to another tool. I tried scripting Audacity with pipes and it crashes (question: Scripting crashes Audacity).

How can I automate these pre-processing steps before mixing?

2
  • Now that Audacity has a new 3.0.0 release, you should try your script again with it to see if the issue has been corrected. Always good to have options. Apr 2, 2021 at 0:02
  • @DataProcessing Audacity 3 also crashes and I added an update in the original question: sound.stackexchange.com/questions/48751/… Apr 9, 2021 at 16:33

1 Answer 1

1

For lack of answers, I programmed an AppleScript that controls the Audacity Graphical User Interface and achieves the same result. It loads a track with the noise and gets the noise profile, loads the track with the voice, removes the noise with that profile and the saved settings, and does the same with a limiter and a compressor.

set noise_track to "/path/to/noise/track.wav"
set voice_track to "/path/to/voice/track.wav"
set export_name to "voice-clean"

set short_delay to 1
set middle_delay to 5
set long_delay to 10

tell application "System Events"
    
    tell application "Audacity" to activate
    
    tell application "Audacity" to open noise_track
    
    delay short_delay
    keystroke "a" using command down
    
    
    tell process "Audacity"
        click menu item "Noise reduction..." of menu "Effect" of menu bar 1
    end tell
    delay short_delay
    
    repeat 2 times
        key code 48
        delay short_delay
    end repeat
    key code 49
    delay short_delay
    
    tell application "Audacity" to open voice_track
    delay short_delay
    
    --------------------
    -- Noise reduction
    --------------------
    
    keystroke "a" using command down
    delay short_delay
    
    tell process "Audacity"
        click menu item "Noise reduction..." of menu "Effect" of menu bar 1
    end tell
    delay short_delay
    
    key code 36
    
    delay long_delay
    
    --------------------
    -- Limiter
    --------------------
    
    tell process "Audacity"
        click menu item "Limiter..." of menu "Effect" of menu bar 1
    end tell
    delay short_delay
    
    key code 36
    delay long_delay
    
    --------------------
    -- Compressor
    --------------------
    
    tell process "Audacity"
        click menu item "Compressor..." of menu "Effect" of menu bar 1
    end tell
    delay short_delay
    
    key code 36
    delay long_delay
    
    keystroke "e" using {command down, shift down}
    delay middle_delay
    keystroke export_name
    delay short_delay
    key code 36
    
    delay long_delay
    
    --------------------
    -- Close two projects
    --------------------
    repeat 2 times
        keystroke "w" using command down
        delay short_delay
        key code 48
        delay short_delay
        key code 49
        delay 2 * short_delay
    end repeat
end tell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.