Skip to content
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

pm.flute_ui_MIDI is not in tune #79

Open
prithviKantanAAU opened this issue May 1, 2021 · 0 comments
Open

pm.flute_ui_MIDI is not in tune #79

prithviKantanAAU opened this issue May 1, 2021 · 0 comments

Comments

@prithviKantanAAU
Copy link

While experimenting with this function, I found that the synthesized fundamental frequency is only correct at 440 Hz and shows increasing error with increasing frequency input.

I managed to manually tune it by adding the following transformation using some crude polynomial fitting, so it is approximately in tune from 440 Hz to 1320 Hz. It would be great if a more robust fix were possible.

// f_Hz is the original input frequency
// freqFactor is a transformation applied to correct the final output
freqDiff = f_Hz - 440;
freqFactor = 0.999999999999 + freqDiff * 0.0080951 - freqDifffreqDiff * 0.00002777 + freqDifffreqDiff*freqDiff * 0.00000004097;
tubeLength = 440 + (f_Hz - 440) * freqFactor : pm.f2l; // from original function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant