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

Add 'start_time' and 'end_time' parameters to multiply_volume FX #1572

Merged
merged 8 commits into from
May 24, 2021

Conversation

mondeja
Copy link
Collaborator

@mondeja mondeja commented May 21, 2021

This introduces the optional arguments start_time and end_time for multiply_volume FX. The volume multiplication, if these parameters are not None, is only applied to the seconds in the range from start_time to end_time. Note that after this, is a lot easier to introduce silences in a clip: clip.multiply_volume(0, start_time=5, end_time=10). The code is totally backwards compatible. I've also properly documented the function and rewritten the tests parametrizing them.

Closes #1571

  • I have provided code that clearly demonstrates the bug and that only works correctly when applying this fix
  • I have added suitable tests demonstrating a fixed bug or new/changed feature to the test suite in tests/
  • I have properly documented new or changed features in the documentation or in the docstrings
  • I have properly explained unusual or unexpected code in the comments around it

@mondeja mondeja added enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. audio Related to AudioClip, or handling of audio in general. fx Related to advanced effects applied via clip.fx(), or effects in general. labels May 21, 2021
@coveralls
Copy link

coveralls commented May 21, 2021

Coverage Status

Coverage increased (+0.2%) to 69.492% when pulling ecd43d6 on mondeja:multiply_volume-start-end into 978c328 on Zulko:master.

@mondeja mondeja force-pushed the multiply_volume-start-end branch from 265ddb4 to ecd43d6 Compare May 24, 2021 10:35
@mondeja mondeja changed the title Add 'start' and 'end' parameters to multiply_volume FX Add 'start_time' and 'end_time' parameters to multiply_volume FX May 24, 2021
@mondeja mondeja merged commit 776e739 into Zulko:master May 24, 2021
@mondeja mondeja deleted the multiply_volume-start-end branch May 24, 2021 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Related to AudioClip, or handling of audio in general. enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. fx Related to advanced effects applied via clip.fx(), or effects in general.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to specify time range in multiply_volume effect
3 participants