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
Add flanger to functional.py #651
Conversation
Signed-off-by: Bhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
Signed-off-by: Bhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
Thanks, looks like there is something not working for 2D input. The tests are failing. Could you take a look at it? |
Signed-off-by: Bhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
@mthrok , Fixed the issue , now all checks passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, LGTM. Minor comments below.
torchaudio/functional.py
Outdated
|
||
References: | ||
http://sox.sourceforge.net/sox.html | ||
Scott Lehman, Effects Explained, http://harmony-central.com/Effects/effects-explained.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link does not work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original link is not longer working . Found this Archive link on google ( https://web.archive.org/web/20051125072557/http://www.harmony-central.com/Effects/effects-explained.html) , Will submit a separate pull as it referenced in many functions
torchaudio/functional.py
Outdated
sinusoidal (bool): If ``True``, uses sinusoidal modulation | ||
If ``False``, uses triangular modulation | ||
(Default: ``True``) | ||
linear_interpolation (bool): If ``True``, uses linear interpolation for delay-line interpolation | ||
If ``False``, uses Quadratic interpolation | ||
(Default: ``True``) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In sox, these flags are passed as strings. I can't find a link with a description of the flags, can you point me to one? Are there more than two possibilities that could happen here? In any case, I may find the flags more explicit. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vincentqb Only two possbilities for wave shape and interpolation mentioned in sox source code for flanger (https://github.com/rbouqueau/SoX/blob/master/src/flanger.c) ( check at bottom of file for function arguments description )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though there are only two choices, let's use a string with only two values. This will be more explicit. We'll need to raise an error if the parameter is not either.
modulation (str): Use either "sinusoidal" or "triangular" modulation. (Default: ``sinusoidal``)
interpolation (str): Use either "linear" or "quadratic" for delay-line interpolation. (Default: ``linear``)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vincentqb , Made the changes , all checks passed
Signed-off-by: Bhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
Signed-off-by: Bhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #651 +/- ##
=========================================
Coverage ? 89.09%
=========================================
Files ? 21
Lines ? 2284
Branches ? 0
=========================================
Hits ? 2035
Misses ? 249
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! LGTM!
…orial Torchtext translation tutorial
Hi ,
Regarding the issue ( Reducing dependency in Sox - #260 ),
This pull request is new version of existing pull request #629
@mthrok I have made the changes to batch and torch script test .
Now taking random input generated from a seed