I'm analysing the frequencies of something I'm recording (whistling), which is resulting like this (yes, it's super mario bros' beginning song:

enter image description here

I'd like to filter it to make it remain like:

enter image description here

in order to convert them as MIDI notes after the processing.

How could I do it ?

I've tried with a simple low-pass filter but it doesn't work very well.



I'm already rounding it when passing to MIDI:

enter image description here

and sometimes it goes on + - 1 note.

  • $\begingroup$ Oh, I'm implementing it in Java. $\endgroup$ – Rafael Ruiz Muñoz Aug 23 '14 at 13:36
  • $\begingroup$ There's no such filter for the standard meaning of filter (as in, linear time invariant system), but you could start with rounding to the nearest note on the scale. $\endgroup$ – Jazzmaniac Aug 23 '14 at 13:46
  • $\begingroup$ Wait, I'm going to edit it $\endgroup$ – Rafael Ruiz Muñoz Aug 23 '14 at 13:49
  • 1
    $\begingroup$ A good start would be a voiced/unvoiced detector that allows you to create segments. Then you can use some form of predictive filtering to process the segments and decide if the pitch has changed. Divide into constant pitch segments again and find the average pitch for each. $\endgroup$ – Jazzmaniac Aug 23 '14 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.