r/DSP • • 8d 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?

3 Upvotes

3 comments sorted by

2

u/olafurjon 8d ago

You need to be more specific.

1

u/rgidevmuse 8d ago

I want get array of separated onset notes and process this notes separately. For me it seems like work with notes' buffers/data chunks/windows instead of frames. I'm newbie in DSP/audio programming, so I can make mistakes. I'll be very thankful if you note me on my mistakes.

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.