pyampact.performance.calculate_vibrato
- pyampact.performance.calculate_vibrato(note_vals, sr)[source]
Calculate the vibrato depth and rate from a note’s frequency signal.
- Parameters:
note_vals (np.ndarray) – The time-domain signal values of the note, typically a 1D array representing the amplitude of the sound wave over time.
sr (int) – The sampling rate of the signal in Hertz (samples per second).
- Returns:
vibrato_depth (float) – The depth of the vibrato, calculated as twice the amplitude of the dominant frequency component.
vibrato_rate (float) – The rate of the vibrato, in Hertz (Hz), derived from the position of the dominant frequency in the Fast Fourier Transform (FFT).