Note that there are some explanatory texts on larger screens.

plurals
  1. POFilter design to find energy at specific audio frequencies
    primarykey
    data
    text
    <p>I'm adapting and extending the Matlab "<a href="http://www.mpi-inf.mpg.de/resources/MIR/chromatoolbox/" rel="nofollow">Chroma Toolbox</a>" by Meinard Müller and Sebastien Ewert to python. It aims to detect what musical pitches are present at each analysis frame for an audio recording. </p> <p>The first step is to determine the tuning of the music, and the Chroma Toolbox tests whether the music is tuned at the standard A=440Hz, or down a quarter, third, half, two-thirds, or three-quarters of a semitone. That's ok, but in my application, I need more resolution in the tuning detection. </p> <p>Once the tuning is selected from one of those choices, a corresponding filterbank is chosen, which is used to find how much energy there is at each musical pitch over the range of the piano. (Also, the waveform is resampled to 22050, 4410, and 882 Hz) </p> <p>The coefficients for the filterbanks are stored in .mat files, given by the Chroma Toolbox. For example, the coefficients for detecting energy at standard-tuned middle C (261.63 Hz) are b = [ 1., -7.43749873, 24.72954997, -47.94740681, 59.25189976, -47.77885707, 24.55599193, -7.35933913, 0.98601284] and a = [0.00314443, -0.02341175, 0.07794208, -0.15134062, 0.18733283, -0.15134062, 0.07794208, -0.02341175, 0.00314443], and the sample rate for middle C is 4410 Hz.</p> <p>These coefficients are used in a call to filtfilt: I use scipy.signal.filtfilt(b, a, x) where x is the waveform at an appropriate sampling frequency, low for the low notes, high for the higher ones. This step is done in the file "audio_to_pitch_via_FB.m".</p> <h3>the question:</h3> <p>Because I want to allow for different tuning levels than those designed into the Chroma Toolbox, I need to make my own filterbanks, and so need to know how to compute the filter coefficients. To do so, I need a function <em>coeffs(freq, fs)</em> that will find the right coefficients to find the energy at a given frequency <em>freq</em>, for a signal at sample frequency <em>fs</em>. How do I do it?</p> <p>Here's the name of one of the .mat files, in case it contains a useful clue. "MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat"</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload