performance

performance

pyampact.performance.estimate_perceptual_parameters(f0_vals, pwr_vals, M, SR, hop, gt_flag)[source]

Estimates a range of performance parameters from the inputted fundamental frequency (f0_vales), power (pwr_vals), and spectrum estimates (M)

Parameters:
  • f0s – Vector of fundamental frequency estimates

  • sr – 1/sample rate of the f0 estimates (e.g. the hop rate in Hz of yin)

  • gamma – Sets the relative weighting of quickly changing vs slowly changing portions of notes. - a high gamma (e.g., 1000000) gives more weight to slowly changing portions.

Returns:

  • pp1: perceived pitch using the entire vector of f0 estimates

  • pp2: perceived pitch using the central 80% of f0 estimates

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 – Vector of fundamental frequency estimates

  • sr – 1/sample rate of the f0 estimates (e.g. the hop rate in Hz of yin)

  • gamma – Sets the relative weighting of quickly changing vs slowly changing portions of notes. - a high gamma (e.g., 1000000) gives more weight to slowly changing portions.

Returns:

  • pp1: perceived pitch using the entire vector of f0 estimates

  • pp2: perceived pitch using the central 80% of f0 estimates