[feature request] Sample fade out attribute
-
I usually use the auto-trim tool for tidying up my samples but I noticed on some of them if I'm holding down my sustain pedal or have a long release time it will hit the end of the sample and just cut off the sound. It would be nice if there is a fade out parameter like we have for loop xfade.
While it's possible to do a 100ms fade with the gain envelope I don't see a way to apply this to multiple samples at once and it can be manipulated by scripting. Also 100ms isn't always long enough.
-
My new solution, use a bash script!
#!/bin/bash input_folder="$1" output_folder="$input_folder/processed" fade_time=${2:-200} # Create the output folder if it doesn't exist mkdir -p "$output_folder" # Process each WAV file in the input folder for input_file in "$input_folder"/*.wav; do if [ -f "$input_file" ]; then file_name=$(basename "$input_file") output_file="$output_folder/${file_name%.wav}.wav" # Trim silence from the start and end and add a 200ms fade out sox "$input_file" "$output_file" silence 1 0.1 0.1% reverse silence 1 0.1 0.2% fade p 00:00:00.$fade_time reverse echo "Processed: $input_file" fi done echo "Processing complete. Output files saved to: $output_folder"
-
@d-healey Does SoX produce better results than ffmpeg? What made you change that up?
-
@aaronventure SoX is faster as it doesn't have to re-encode the audio. I'm also more familiar with using it than I am with ffmpeg and found I could fine tune the trimming and fading more easily - I don't think that's a limitation of ffmeg though, just my knowledge.