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

Beat notes #591

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

Conversation

tbgitoo
Copy link

@tbgitoo tbgitoo commented Oct 4, 2021

Dear Ultrastar-Deluxe development team,

This is a follow-up of an older pull-request (#579), which I closed to split it into two following GaryCXJk's suggestion.

To recapitulate, in order to be able to have my children do their rhythm music exercises in a game setting, I wrote an extension to the UltraStar-Deluxe game that would evaluate individual beats. It is very useful in our context and so I wanted to share this if it can be of help, or also just fun, for other people.

This pull request focuses on the audio detection of clapping sounds. The implementation is now an extension of the rap notes, and beat instead of singing analysis can be triggered by including the song header tag RAP:BEAT in the song lyrics file.

@GaryCXJk: I removed the keyboard playing part to simplify things, and if appropriate, would do another pull request specifically for this; and as you can see I also removed the extra note types and based everything on the rap notes (thanks also s09bQ5 for a comment along similar lines, I now understood better, I hope).
@basisbit: This pull request still contains an implementation of a specific beat detection as short loud sound as you suggested. I also updated the screenshots.
@s09bQ5: I tried as much as I could to stay away from inadvertent changes, I hope it is better than last time.

Implementation-wise, the tricky part is to have evaluation at rhythmic beat timing, rather than the default pitch evaluation in the middle of the notes. This is done by checking at every cycle, and by having a separate handler BeatNoteTimerState that determines at every round which beat (that is rap note in beat mode) note is playing if any. In this implementation, the player is expected to clap centered on the first beat of the note, with a time interval depending on the difficulty level, missed timing giving resulting in some points being subtracted.

Screenshots.pdf

@tbgitoo tbgitoo marked this pull request as draft October 5, 2021 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants