iracema.harmonics¶
This module contains the implementation of a harmonic extraction model for monophonic audio.
- 
iracema.harmonics.extract(fft, pitch, nharm=16, minf0=24, maxf0=4200, perc_tol=0.04)[source]¶
- Extract the harmonics of an audio signal, given its fft and pitch curve, using nharm harmonics. The pitch detection method will search for a a fundamental frequency in the interval between minf0 and maxf0. - Parameters
- fft (FFT) – FFT time series. 
- pitch (TimeSeries) – Pitch time series. 
- nharm (int) – Number of harmonics to extract. 
- minf0 (float) – Minimum fundamental frequency. 
- maxf0 (float) – Maximum fundamental frequency. 
- min_mag_cand (float) – Minimum amplitude to be candidate, relative to the frame’s peak. 
- noisiness_thresh (float) – Upper noisiness limit for each frame. If the noisiness exceeds this value, the algorithm will consider that the frame has no fundamental frequency. 
- perc_tol (float) – Frequency tolerance used to search for peaks in the region around the expected frequency of each harmonic. 
 
- Returns
- harmonics – A dictionary containing the results of the harmonics extraction, composed of three TimeSeries objects, which can be accessed using the following keys: ‘frequency’, ‘magnitude’and ‘phase’. 
- Return type
- dictionary