A method of measuring the instantaneous period of a quasi-periodic signal, the method comprising: obtaining a quasi-periodic signal; determining an initial template of a determined size and shift; performing a cross-correlation between the quasi-periodic signal and a template segment of the quasi-periodic signal, the template segment being of a pre-determined size and a pre-determined shift, to obtain a selection coefficient; incrementing the pre-determined size and the pre-determined shift of the template segment to create an incremented template segment; repeating the cross-correlation between the quasi-periodic signal and the incremented template segment through a plurality of increments to obtain selection coefficients for each of a plurality of incremented template segments; selecting the incremented template with the maximum selection coefficient; performing a cross-correlation between the initial template and the quasi-periodic signal to obtain an initial correlation signal; establishing a first correlation threshold; selecting portions of the quasi-periodic signal that correspond to peaks of the initial correlation signal greater than the first correlation threshold; counting a number of peaks in the initial correlation signal greater than the first correlation threshold; averaging the selected portions to create a second template; performing a cross-correlation between the second template and the quasi-periodic signal to obtain a second correlation signal; establishing a second correlation threshold; and counting the number of peaks in the second correlation signal greater than the second correlation threshold; characterized in that if the number of peaks counted in the initial correlation signal is greater than or equal to the number of peaks counted in the second correlation signal, measuring the instantaneous period between the peaks in the second correlation signal, and wherein if the number of peaks counted in the initial correlation signal is less than the number of peaks counted in the second correlation signal: selecting the portions of the quasi-periodic signal that correspond to the peaks of the second correlation signal greater than the second correlation threshold; averaging the selected portions of the quasi-periodic signal to create a third template; performing a cross-correlation between the third template and the quasi-periodic signal to obtain a third correlation signal; wherein the third correlation signal is used to measure the instantaneous period. obtaining a quasi-periodic signal; determining an initial template of a determined size and shift; performing a cross-correlation between the quasi-periodic signal and a template segment of the quasi-periodic signal, the template segment being of a pre-determined size and a pre-determined shift, to obtain a selection coefficient; incrementing the pre-determined size and the pre-determined shift of the template segment to create an incremented template segment; repeating the cross-correlation between the quasi-periodic signal and the incremented template segment through a plurality of increments to obtain selection coefficients for each of a plurality of incremented template segments; selecting the incremented template with the maximum selection coefficient; performing a cross-correlation between the initial template and the quasi-periodic signal to obtain an initial correlation signal; establishing a first correlation threshold; selecting portions of the quasi-periodic signal that correspond to peaks of the initial correlation signal greater than the first correlation threshold; counting a number of peaks in the initial correlation signal greater than the first correlation threshold; averaging the selected portions to create a second template; performing a cross-correlation between the second template and the quasi-periodic signal to obtain a second correlation signal; establishing a second correlation threshold; and counting the number of peaks in the second correlation signal greater than the second correlation threshold; characterized in that if the number of peaks counted in the initial correlation signal is greater than or equal to the number of peaks counted in the second correlation signal, measuring the instantaneous period between the peaks in the second correlation signal, and wherein if the number of peaks counted in the initial correlation signal is less than the number of peaks counted in the second correlation signal: selecting the portions of the quasi-periodic signal that correspond to the peaks of the second correlation signal greater than the second correlation threshold; averaging the selected portions of the quasi-periodic signal to create a third template; performing a cross-correlation between the third template and the quasi-periodic signal to obtain a third correlation signal; wherein the third correlation signal is used to measure the instantaneous period. selecting the portions of the quasi-periodic signal that correspond to the peaks of the second correlation signal greater than the second correlation threshold; averaging the selected portions of the quasi-periodic signal to create a third template; performing a cross-correlation between the third template and the quasi-periodic signal to obtain a third correlation signal; wherein the third correlation signal is used to measure the instantaneous period.