Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Notes are always 10-20 cents sharp #100

Open
music-game opened this issue Jul 8, 2022 · 0 comments
Open

Notes are always 10-20 cents sharp #100

music-game opened this issue Jul 8, 2022 · 0 comments

Comments

@music-game
Copy link

Love the library. My only issue is that whenever I play any instrument sound, it always ends up being about 10-20 cents sharp when I measure the pitch with a pitch analyzer app. The analyzer is perfectly in tune when I play the same note on an electric keyboard.

In order to compensate, I've been having to call the play function with the note number minus 0.15.

Here is the code I am using that is resulting in the slightly sharp sounds. I can just run this from the browser console on a page where I've included the soundfont-player.js file, and I get the too-sharp notes. Am I missing anything? Thanks!

ac = new AudioContext();
sfPiano = await Soundfont.instrument(ac, "acoustic_grand_piano");
sfPiano.play("C4");
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant