Pitch Sound_to_Pitch_cc (Sound me, double dt, double minimumPitch, double periodsPerWindow, int maxnCandidates, int accurate, double silenceThreshold, double voicingThreshold, double octaveCost, double octaveJumpCost, double voicedUnvoicedCost, double ceiling) { return Sound_to_Pitch_any (me, dt, minimumPitch, periodsPerWindow, maxnCandidates, 2 + accurate, silenceThreshold, voicingThreshold, octaveCost, octaveJumpCost, voicedUnvoicedCost, ceiling); }
Pitch computePitch(Sound me, double fixedTimeStepStrategy, int method, bool veryAccurate, double floor, double ceiling, long maximumNumberOfCandidates,double silenceThreshold, double voicingThreshold, double octaveCost, double octaveJumpCost, double voicedUnvoicedCost) { return Sound_to_Pitch_any(me, fixedTimeStepStrategy, floor, method == kTimeSoundAnalysisEditor_pitch_analysisMethod_AUTOCORRELATION ? 3.0 : 1.0, maximumNumberOfCandidates, (method - 1) *2 + veryAccurate, ///veryAccurate + 2, silenceThreshold, voicingThreshold, octaveCost, octaveJumpCost, voicedUnvoicedCost, ceiling); }
autoHarmonicity Sound_to_Harmonicity_cc (Sound me, double dt, double minimumPitch, double silenceThreshold, double periodsPerWindow) { try { autoPitch pitch = Sound_to_Pitch_any (me, dt, minimumPitch, periodsPerWindow, 15, 3, silenceThreshold, 0.0, 0.0, 0.0, 0.0, 0.5 / my dx); autoHarmonicity thee = Harmonicity_create (my xmin, my xmax, pitch -> nx, pitch -> dx, pitch -> x1); for (long i = 1; i <= thy nx; i ++) { if (pitch -> frame [i]. candidate [1]. frequency == 0.0) { thy z [1] [i] = -200.0; } else { double r = pitch -> frame [i]. candidate [1]. strength; thy z [1] [i] = ( r <= 1e-15 ? -150.0 : r > 1.0 - 1e-15 ? 150.0 : 10.0 * log10 (r / (1.0 - r)) ); } } return thee; } catch (MelderError) { Melder_throw (me, U": harmonicity analysis (cc) not performed."); } }
Pitch Sound_to_Pitch(Sound me, double timestep, double minimumPitch, double maximumPitch) { return Sound_to_Pitch_any(me, timestep, minimumPitch, 3.0, 15, FALSE, 0.03, 0.45, 0.01, 0.35, 0.14, maximumPitch); }