PyConcat.pyrubberband package

Submodules

PyConcat.pyrubberband.pyrb module

Command-line wrapper for rubberband

PyConcat.pyrubberband.pyrb.time_stretch(y, sr, rate, rbargs=None)

Apply a time stretch of rate to an audio time series.

This uses the tempo form for rubberband, so the higher the rate, the faster the playback.

y : np.ndarray [shape=(n,) or (n, c)]
Audio time series, either single or multichannel
sr : int > 0
Sampling rate of y
rate : float > 0
Desired playback rate.
rbargs

Additional keyword parameters for rubberband

See rubberband -h for details.

y_stretch : np.ndarray
Time-stretched audio
ValueError
if rate <= 0
PyConcat.pyrubberband.pyrb.pitch_shift(y, sr, n_steps, rbargs=None)

Apply a pitch shift to an audio time series.

y : np.ndarray [shape=(n,) or (n, c)]
Audio time series, either single or multichannel
sr : int > 0
Sampling rate of y
n_steps : float
Shift by n_steps semitones.
rbargs

Additional keyword parameters for rubberband

See rubberband -h for details.

y_shift : np.ndarray
Pitch-shifted audio

PyConcat.pyrubberband.version module

Module contents

A python wrapper for rubberband