pyampact.performance.perceived_pitch
- pyampact.performance.perceived_pitch(f0s, sr, gamma=100000)[source]
Calculate the perceived pitch of a note based on Gockel, H., B.J.C. Moore,and R.P. Carlyon. 2001. Influence of rate of change of frequency on the overall pitch of frequency-modulated Tones. Journal of the Acoustical Society of America. 109(2):701?12.
- Parameters:
f0s (np.ndarray) – Vector of fundamental frequency estimates, typically a 1D array representing frequency values over time.
sr (int) – The sampling rate of the f0 estimates in Hertz (Hz).
gamma (float, optional) – A parameter that sets the relative weighting of quickly changing versus slowly changing portions of notes. A high gamma value (e.g., 1000000) gives more weight to slowly changing portions. Default is 100000.
- Returns:
pp1 (float) – The perceived pitch using the entire vector of f0 estimates.
pp2 (float) – The perceived pitch using the central 80% of f0 estimates.