Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use multiple command padding and mixing? #19

Open
sy0514 opened this issue Aug 27, 2020 · 1 comment
Open

How to use multiple command padding and mixing? #19

sy0514 opened this issue Aug 27, 2020 · 1 comment
Assignees

Comments

@sy0514
Copy link

sy0514 commented Aug 27, 2020

How to use multiple command padding and mixing?
like this : > sox longTimeAutio.wav -p pad 5 0 | sox - -m shortTimeAudio.wav combined.wav

@igece igece self-assigned this Aug 27, 2020
@igece
Copy link
Owner

igece commented Aug 27, 2020

Command piping is not supported by SoxSharp. However, I think you can get the same result using the command sox.exe -m shortTimeAudio.wav longTimeAudio.wav combined.wav delay 5, which will mix the two files, starting shortTimeAudio.wav with a delay of 5 seconds into longTimeAudio.wav.

This can be coded using SoxSharp as:

using (var sox = new Sox("sox.exe"))
{
  sox.CustomEffects = "delay 5";
  sox.Process(new string[] { "shortTimeAudio.wav", "longTimeAudio.wav" }, "combined.wav", CombinationType.Mix);
}

(The delay effect is not currently implemented in SoxSharp, so it needs to be entered through the CustomEffects property).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants