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

Modification of tempo with web interface #330

Closed
theblackhat17 opened this issue Jan 24, 2022 Discussed in #323 · 5 comments
Closed

Modification of tempo with web interface #330

theblackhat17 opened this issue Jan 24, 2022 Discussed in #323 · 5 comments
Labels
enhancement New feature or request

Comments

@theblackhat17
Copy link

Discussed in #323

Originally posted by theblackhat17 January 18, 2022
Hey, I have just configured the entire piano project, everything works perfectly I am delighted!
Today, I would like to add a functionality, it is to modify the tempo of a piano piece using the web interface directly. Indeed, we can do this from the small OLED screen, so I would like to know if I can retrieve the variable from the python program to call it in the html page and let the user modify his piano tempo to play more or less fast.
I will add the speed modes in the web interface directly with the attributes : slow(25%) / medium(50%) / fast(75%) / hard(100%). All this by changing the tempo percentage which is 100% at the beginning.
I saw that there was the function "set_tempo" or "song_tempo" present in the file "learnmidi.py".

self.set_tempo = 100 or self.song_tempo = 500000 or self.ticks_per_beat = 240

In my new page named "songspead.html" and added in the menu, I added the four options in the list like this : <option value="0">Slow</option> <option value="0">Medium</option> <option value="0">Fast</option> <option value="0">Hard</option>

Do you think it would be possible?
Thanks for your help!

Th3_bl@ck_h@t

@onlaj onlaj added the enhancement New feature or request label Jan 24, 2022
@onlaj
Copy link
Owner

onlaj commented Jan 24, 2022

Hello.
What about instead of explaining how to do it, I just add this feature? :D

@theblackhat17
Copy link
Author

Hello.
What about instead of explaining how to do it, I just add this feature? :D

Yes If you want, you can add this feature ;) If you want you can explain me how to do this. Thanks a lot

@onlaj
Copy link
Owner

onlaj commented Jan 27, 2022

Done.
chrome_56sZGZXPPB

If you notice any bugs report them in this thread.

@onlaj onlaj pinned this issue Jan 27, 2022
@theblackhat17
Copy link
Author

Done. chrome_56sZGZXPPB

If you notice any bugs report them in this thread.

You are the BOSS!! Thanks a lot for your Work 🙏 You help me very much

@theblackhat17
Copy link
Author

I will try it tomorrow,
By having created this page, you are unblocking me from a problem. Thank you again for your help.

@onlaj onlaj closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants