Skip to content

signal.PitchDetectionHarm.Function.findPitchSalienceFunctionArgMax

Christian d'Heureuse edited this page Jun 7, 2026 · 2 revisions

dsp-collection / signal/PitchDetectionHarm / findPitchSalienceFunctionArgMax

Function: findPitchSalienceFunctionArgMax()

function findPitchSalienceFunctionArgMax(
   salienceFunction, 
   f0Min, 
   f0Max, 
   scanFactor?): number;

Defined in: signal/PitchDetectionHarm.ts:216

Searches the argument for the maximum of a given pitch salience function.

First it scans over the F0 range to find the approximate position of the maximum. Then it uses golden-section search to improve the result.

Parameters

salienceFunction

(f0) => number

A pitch salience function.

f0Min

number

Lower pitch frequency limit.

f0Max

number

Upper pitch frequency limit.

scanFactor?

Optional constant for the the scan for the maximum.

absTolerance?

number = 0.05

relTolerance?

number = 1E-3

scanFactor?

number = 1.005

Returns

number

The estimated pitch frequency.

Clone this wiki locally