fillmaster / fillMaster

FillMaster: A drum idea generator / improvisation trainer! - Open Source, always looking for more contributors :)
https://fillmaster.app/
GNU General Public License v3.0
31 stars 7 forks source link

Improved randomizer logic #26

Closed Loeffeldude closed 2 years ago

Loeffeldude commented 2 years ago

This should resolve #11. I am not sure what default time it should be so I settled on 1000. I also added a pauseDuration argument that determines how long it should hold on one option.

If you are not happy with the defaults I can change them.

You could make the animation look nicer later by increasing the pause duration the closer to the end we are to give it a kind of slot machine effect. Let me know what you think about that.

dcallus commented 2 years ago

This is great. I love it. The code is really nice. It seems to run smoother than mine too. My code was a little janky but it worked, but this is much nicer to read and seems more correct. Thank you for the comments in the code. It's helped me understand what's going on and will help others.

I think the speed and duration are perfect by the way and I definitely like the ability to change the overall duration as well as the duration of each item. This is more than I could have hoped for.

By the way that slowing down slot machine idea sounds super cool. Would you like to give that a try and add it to this PR? Or should I just merge this and maybe you can try that in a separate branch, it's up to you?

Also, you have a typo, the word DEFAULT in line 4 and 55. Obviously I can easily fix this, no bother, but in case you're going to add to this file anyway I thought I'd let you know.

:) Really appreciate the help. Just with that slot-machine style idea though, I think you 'get it'.

Good work 👍 👍 👍

Loeffeldude commented 2 years ago

I can add the slot machine mechanic right now and fix the typo too. Thanks for all the kind words.

dcallus commented 2 years ago

I can add the slot machine mechanic right now and fix the typo too. Thanks for all the kind words.

legend!

Loeffeldude commented 2 years ago

Ok the slowdown was a lot more complicated then I thought it would be but I think I got it feeling right. Let me know what you think. No hard feelings if you don't end up using it in the end.