-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qm shift 1/3 #3
base: master
Are you sure you want to change the base?
Qm shift 1/3 #3
Conversation
The 1/3 bin shift seems like a sensible idea - I'll take a look, thanks. With regard to style fixes, please refer to the |
OK, the style fixes where all included in the codestyle-and-tidy branch. |
It was probably not too sensible. |
Use double value for waveform generation and move a multiplication out of loop.
OK, I have only tricked myself and tested a version without the first commit. only the first commit. The 440 Hz signal is almost centered.
Both commits. The 440 Hz is shifted by one bins and still almost centered.
First commit removed: The 440 Hz is off pitch.
|
An update about this fix: I submitted two versions of the QM Key Detector Vamp plugin to the MIREX 2019 evaluation of music analysis methods. The first was the same version as had been submitted in previous years. The second was "v5" of the plugin, which is not yet an officially released version of the plugin, but which was built against the current qm-dsp code with this fix in it (rev 9b18a22). I acknowledged your fix in the submission notes. The results have just been published, and can be found here: https://www.music-ir.org/mirex/wiki/2019:Audio_Key_Detection_Results. The two versions are labelled as submissions CN1 and CN2 respectively in that page. As you can see, the version with your fix performs substantially better than the previous one in all datasets - a nice real-world validation. Thank you again for reporting and working on this. |
Good news. Thank you for the update. Did the comment and close button strikes you? I think this PR is still relevant. |
Oh sorry - I did close it, but I think I had probably lost track of what was in the PR. Re-opening, will try to take another look. |
Ping. We already hoped we could drop our custom patches when 1.8.0 landed, but then we saw that this has not been merged yet. |
There are two problems here - neither insurmountable but both real. The first is that I left QM in 2020, and so can't really make an official release. I have continued to maintain some stuff voluntarily, e.g. things you can find within the sonic-visualiser Github organisation, most of which I wrote. But this library is something that I worked on maintaining while at QM but that was largely written by other people, so it feels rather different. That said, I am fairly sure that nobody else is about to make an official release either, and I can of course commit to this repo, so I could create a not-quite-an-official-release tag here if that would be good enough for your purposes. The second problem - and the reason I didn't get around to merging these before - is testing. The other (more substantial) set of fixes from Daniel that preceded this PR did get merged and tested, but when it came to looking again at this one I could no longer remember what its test status was. I'm wary (having made mistakes before) of merging even obviously correct patches without checking that they don't make the results worse - especially of course when it's not my name on the code. Sometimes a patch will fix something in one place that another patch already fixed somewhere else, undoing the fix. Sometimes (as was my concern for #6 in the tempo tracker) the code works by accident and a fix breaks it, etc. So while acknowledging that these patches look sensible and are "probably right", it's sadly not just a case of hitting the merge button. I would like to get this dealt with though... Do you still happen to have test cases for the key detector lying around that you can use to check that this PR (when applied against the current head, rather than the code it was originally written against) improves matters? |
Merging these commits would be a first step, but the problem is, that all the package managers (Linux-Distributions, VCPKG, Homebrew, etc.) ship always the last official release. And until then, a project that uses qm-dsp needs to use a vendored local copy with these bug-fixes. |
Testing your patches, I have noticed that the lower border frequency of C3 has no Gauss bell form, because the lower 1/3 bin is missing.
Now the detection starts one bin earlier. This makes the code also easier to understand IMHO.