Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
- ten_6044
-
Scratcher
100+ posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
My browser / operating system: Windows NT 10.0, Chrome 156.0.0.0, No Flash versions detected
When you run the following code:
…the “rest” block will be executed, and when waiting, the sprite said a number approximately 100 rather than the expected 200. This is quite misleading because the number of seconds in a 200-beat 60 BPM is actually 200 seconds, not 100 seconds, according to the calculation:
Not sure if this is a bug, but I'm reporting it because I think it can be unintentional.
When you run the following code:
when green flag clicked
set tempo to (60)
reset timer
rest for (200) beats
say (timer)
…the “rest” block will be executed, and when waiting, the sprite said a number approximately 100 rather than the expected 200. This is quite misleading because the number of seconds in a 200-beat 60 BPM is actually 200 seconds, not 100 seconds, according to the calculation:
seconds = beat_count * (60 / bpm)
Not sure if this is a bug, but I'm reporting it because I think it can be unintentional.
- ten_6044
-
Scratcher
100+ posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
Bump
- medians
-
Scratcher
1000+ posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
Why are you using 3.0
Anyway though can replicate in 3.0 but not 2.0 and I've never heard of this, maybe they added a maximum or sth
Anyway though can replicate in 3.0 but not 2.0 and I've never heard of this, maybe they added a maximum or sth
- medians
-
Scratcher
1000+ posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
You might have to use the workaround or do sth like this:
define rest for (beats) beats
repeat ([floor v] of ((beats) / (100))
rest for (100) beats
end
rest for ((beats) mod (100)) beats
- nembence
-
Scratcher
1000+ posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
Why are you using 3.0Yes, they added an arbitrary limit of 100 beats:
Anyway though can replicate in 3.0 but not 2.0 and I've never heard of this, maybe they added a maximum or sth
https://github.com/scratchfoundation/scratch-editor/blob/develop/packages/scratch-vm/src/extensions/scratch3_music/index.js#L703
- sportsball917
-
Scratcher
28 posts
Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+
howd you make the stopwatch :`
- Discussion Forums
- » Bugs and Glitches
-
» Music extension "rest" block waits 100 seconds even if tempo is 60 and beat count is 100+