animal-crossing-music-extension / ac-music-extension

Google Chrome extension that plays hourly Animal Crossing music and more while browsing!
https://acmusicext.com
zlib License
343 stars 57 forks source link

Some notes are silent when the town tune plays #102

Closed PikaDude closed 4 years ago

PikaDude commented 4 years ago

The E3 note appears to be silent when the town tune actually plays.

Julian-MJK commented 4 years ago

Perhaps the frequency is too high to be audible when mixed with the oscillator of the instrument that plays at the hour? Does the frequency exist in frequencies[], or does availablePitches and frequencies have different lengths?

PikaDude commented 4 years ago

It may be because the town tune editor ranges from F3-E3, when it should really only range from G3-E3. The games themselves only range from G3-E3. The bell sound effect doesn't actually have enough notes to support such a wide range of sounds, hence causing this issue.

Julian-MJK commented 4 years ago

That could be exactly the issue, I'll try changing this in a local branch to see if it works

Julian-MJK commented 4 years ago

Simply shrinking the availablePitches[] and frequencies[] arrays by removing the first pitch (F1, freq 350) does indeed make E3 audible when the TT is played that the hour, so that was the problem, however I'm not sure if just removing the first frequency (350) which belonged to F1 is right, perhaps the entire frequency array is skewed?

Because when I look at comparison charts between pitches and frequencies, the current frequencies seem to be off, so they may have been guessed at. Do you have any way of knowing the correct frequencies in hertz of each pitch?