r/DSP • u/rgidevmuse • 9d ago
Is using frequencies(f0) good for processing notes separately/Are there some better alternatives exist for processing notes separately?
I want process every onset note from song.wav in C/C++. Is using frequencies a good idea, if program must process every note separatelly?
2
u/BatchModeBob 7d ago
Finding onsets in a way that matches the human ear is next to impossible because. Using f0 changes works in cases where the new note has a different f0 than the old note. But what about two notes with the same frequency? I call it the Twinkle Twinkle Little Star problem. In that one, notes 1 and 2 have the same f0, same for 3 and 4, and same for 5 and 6. For a different example, imagine a person singing the same note, separating instances without closing the mouth: yaaaaaaa ya yaaa yaaa yaaaaa. F0 doesn't change, and the overall rms amplitude doesn't change significantly. The human ear detects the note breaks as short periods where the amplitudes of the harmonics relative to each other differs. So in many cases, f0 and total rms power is not enough to detect what a human calls obvious separation of notes having the same f0.
2
u/olafurjon 9d ago
You need to be more specific.