Has anyone coded a metronome? If so can you please post and example. If not how can this be accomplished? Need some ideas please.
Thank you...
Printable View
Has anyone coded a metronome? If so can you please post and example. If not how can this be accomplished? Need some ideas please.
Thank you...
I'm pretty sure rage's platform engine does it (search for it on forums and/or clickstore)
Thank you, but I'm not looking for that type engine. Just want to know how to handle making a metronome for teaching music. I know there are a ton of them out there to use, but wanted to make my own version. Need it to be able to do 30 to 220 bpm accurately and 1 to 12 beats per measure. Honestly I don't know where to start?
I don't think it would to hard to do even numbers like, 30, 60, 120, 240 since it would based off 60 seconds. But the issue would be if the bpm for example are set to 53, 67, and so on. I guess there would be a lot of math involved to do this, but I was hoping it would be a few lines of code to do this to get the click sound (or what ever sound used) to play.
Example: if the user set the bpm to 53,.the click or sound would be every 1.1320754 seconds, but that can be rounded off to 1.132, I would guess. The math equations is the hard part for me and coding them in the expression editor.
This example is really nice: https://www.flutetunes.com/metronome/
RPM does indeed have a metronome built in. It's not a major feature but it's a little something I wanted to do anyway. :)
Instead of thinking in terms of whole seconds, use milliseconds instead. Divide 60,000 (Ms in a minute) by whatever BPM you want, which will give you the delay between each beat in milliseconds. You can work from an internal timer from there. I have an example on my RPM itch.io page that shows how it functions.
Great news! Thanks Yves!
ragem, that makes sense. Can you post the link to the example please. Thank you.
It's located at the bottom here: https://ragem.itch.io/rpm-rages-plat...ickteam-fusion
Note that the MFA assumes you have RPM with the metronome widget already, but I included an .exe that shows how it follows the music.
Ok,.I'll take a look. Thank you.
I guess this goes on the back burner. I just can't figure out how the math would be to play the tone on each beat. Or how you set the bpm and then play the tone/tones to that bpm.
Here's a very basic example based on what I used in RPM, condensed to about 3 events. You can probably work out something from there. :)