benjaminran / GetGreen

An Android application to detect patterns in a musician's intonation on his or her instrument
1 stars 0 forks source link

PitchFilter isn't optimized or thoroughly tested #2

Open benjaminran opened 8 years ago

benjaminran commented 8 years ago

Each detected pitch sample is run through a low-pass filter that sets the (filtered) current pitch to be the average of the previous 16 raw pitches detected, or however many pitches are available in the buffer. If no pitch has been detected 16 times in a row, the buffer is cleared and the filtered pitch is set to null. This works but isn't great.

The most important future work item for this is to develop a way to measure how well the filter is performing. That way I can figure out whether it should be changed, left alone, or even removed (leaving just the raw pitches).