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

Clicking Sound #3

Closed
Bewelge opened this issue Jan 18, 2021 · 4 comments
Closed

Clicking Sound #3

Bewelge opened this issue Jan 18, 2021 · 4 comments

Comments

@Bewelge
Copy link
Owner

Bewelge commented Jan 18, 2021

Do you hear the "clicking" sound when notes are turned off? Even in Mozart's Rondo alla Turka that is happening. Maybe the exponential ramp needs to go to a lower value before turning off possibly?

Originally posted by @e7mac in #2 (comment)

I haven't noticed that actually. Can you point to an exact moment when it's happening? Then I can take a closer look.

Maybe try adjusting the lookAhead time in Player.isNextNoteReached(time). The value decides how much in advance the note will be scheduled in the audio-context.

@e7mac
Copy link

e7mac commented Jan 20, 2021

I did some more testing and found that this is happening in Firefox, but works fine in Chrome. If you test on Firefox, it should be pretty easy to hear the clicking with the default midi file.

Also, curious if you know why this doesn't work on mobile Chrome?

@Bewelge
Copy link
Owner Author

Bewelge commented Jan 20, 2021

Noticed the same behaviour yesterday. I managed to get rid of it mostly by replacing the setTargetAtTime with linearRampToValueAtTime but that does seem to change the sound quite a bit, and I haven't checked how it behaves in Chrome then. I'll try to push a fix in the coming days.

@Bewelge
Copy link
Owner Author

Bewelge commented Jan 26, 2021

Replacing the setTargetAtTime seems to have worked. Chrome mobile wasn't working because I used string.replaceAll. Fixed that too. Let me know if you notice anything else.

@Bewelge Bewelge closed this as completed Jan 26, 2021
@e7mac
Copy link

e7mac commented Jan 27, 2021

Thanks! Looking real good now!

It still doesn't work on chrome/safari on iOS, although now android is working!

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

2 participants