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

Added setVolume(), setTempo(), mute() and loop mode features #7

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

Conversation

fredzo
Copy link

@fredzo fredzo commented Nov 12, 2023

Hi Fabiano,

I'm working on a Tetris game for Awtrix/Ulanzi desktop clock (https://github.com/fredzo/awtris) and I've been in need of some new features in your great melody-player library !
Here is a PR with this new features :

  • new playAsync() parameters to allow loop mode on current melody and callback function to be called at the end of the melody
  • new setVolume() method to change piezo duty-cycle on ESP32 platform to adapt music volume
  • new setTempo() method to change the tempo of current melody
  • new mute() method that allows muting the melody while playing a sound effect, for example, with another player (on the same pin) and go back to the melody afterwards

Please let me know if you have any comment or need any change.

Best regards,

Frederic.

@fabianoriccardi
Copy link
Owner

Great work! I have given a look to the code, and it is well integrated in the rest of the library. Note that the CI tests doesn't pass on ESP32 v1.0.6 (there is a re-order issue). However, before merging, I would test it on hardware.

@fredzo
Copy link
Author

fredzo commented Nov 12, 2023

OK great, thank you for you feedback !
Let me know if I can help, I'm not familiar with the re-order issue you mentioned on ESP32 v1.0.6...
I've tested all the modifications on an Ulanzi Desktop Clock (ESP32) in async mode.

@fabianoriccardi
Copy link
Owner

Ok that's fine, I will fix it.

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