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

play move sound everytime a new move is received or a move is selected #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

0Xero7
Copy link

@0Xero7 0Xero7 commented Nov 25, 2024

Plays the Lichess move sound when:

  • we receive a move for the currently selected game
  • user moves to a different move

Uses the Lichess move sound found here.

@0Xero7
Copy link
Author

0Xero7 commented Nov 26, 2024

@mooskagh could you review this please? Would be great if it gets in before/during today's match.

@mooskagh
Copy link
Member

Thanks for the PR!

I did see it, but I'm not sure it would play sounds at the correct times. I didn't have time to comment it in more details unfortunately.

E.g. it clicks when you browse previous moves, while it only should do it if you advance in the movelist.

Also it appears to play the sound twice (when the move is received, and when the move has changed in the UI).

Also I couldn't quickly look up the license for the sound file (i.e. whether I need to credit the author and if so, who would it be), so I considered remaking the sound myself -- but again didn't have time.

@mooskagh
Copy link
Member

For now you can open Lichess at https://lichess.org/broadcast/fide-world-championship-2024/game-2/YL0LEwAL/AljZUNDm in another tab and it will have a move sound. :-P

live.lczero.org takes the moves from lichess, so the moves will be synchronized.

@0Xero7
Copy link
Author

0Xero7 commented Nov 26, 2024

I have fixed when the sound plays and verified it locally. As on Lichess, it now only plays the sound if we move forward by 1 ply. I've also made it easy to add other sound effects (for checks, captures, etc) later, if needed.

For the sound license issue, looks like all the standard sounds are classified as non-free 😔.

I did however, find this sound effect, which is CC0 but needs a little editing.

PS: While testing, I noticed that selecting move[index+1] plays move[index] on the board. For example, if the moves are 1. e4 e5, then you have to select e5 on the movelist to see e4 played on the board. Is this intentional?

@0Xero7
Copy link
Author

0Xero7 commented Dec 1, 2024

Fixed the licensing issue by using the previously mentioned CC0 move sound.

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

Successfully merging this pull request may close these issues.

2 participants