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

Upgrade to RubberBand v3.3.0 and expose extra options in time_stretch. #251

Merged
merged 4 commits into from
Sep 20, 2023

Conversation

psobot
Copy link
Member

@psobot psobot commented Sep 20, 2023

This PR upgrades Pedalboard to use RubberBand v3.3.0 (still GPL licensed) and exposes a large number of additional RubberBandStretcher::Options as Python function arguments:

  • high_quality (the default) enables a higher quality time stretching mode. Set this option to False to use less CPU power.
  • transient_mode controls the behavior of the stretcher around transients (percussive parts of the audio). Valid options are "crisp" (the default), "mixed", or "smooth".
  • transient_detector controls which method is used to detect transients in the audio signal. Valid options are "compound" (the default), "percussive", or "soft".
  • retain_phase_continuity ensures that the phases of adjacent frequency bins in the audio stream are kept as similar as possible. Set this to False for a softer, phasier sound.
  • use_long_fft_window controls the size of the fast-Fourier transform window used during stretching. The default (None) will result in a window size that varies based on other parameters and should produce better results in most situations. Set this option to True to result in a smoother sound (at the expense of clarity and timing), or False to result in a crisper sound.
  • use_time_domain_smoothing can be enabled to produce a softer sound with audible artifacts around sharp transients. This option mixes well with use_long_fft_window=False.
  • preserve_formants allows shifting the pitch of notes without substantially affecting the pitch profile (formants) of a voice or instrument.

@psobot psobot added the enhancement New feature or request label Sep 20, 2023
@psobot psobot merged commit fe40ea6 into master Sep 20, 2023
25 checks passed
@psobot psobot deleted the psobot/time-stretch-options branch September 20, 2023 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants