From Test-Scratch-Wiki

演奏休息 () 拍
演奏休息 (0.2) 拍
类别 音效类积木
形狀 条形积木
加入於 1.2.1

The Rest for () Beats 积木 is a 音效类积木 and a 条形积木. The block pauses its 程式 for the specified amount of beats, which can be a decimal number. To change the length of beats, the 演奏速度改变 () block and the 演奏速度设为 () bpm block can be used.


Note Note: Some musical knowledge may be needed to fully understand this article.

用法示例

As the block will pause its script with beats instead of seconds, it is widely used in music scripts where there must be pauses that fit the beat.

Some example uses for the Rest for () Beats block:

Notation

Unlike sheet music, the block uses number values to determine the beats. This table shows the beat number values for the most common rests in the most common time signatures, interpreted in the most basic ways.

WholeRest.png HalfRest.png QuarterRest.png 8thRest.png 16thRest.png
TimeSig4.png 4 2 1 0.5 0.25
TimeSig8.png 8 4 2 1 0.5
TimeSig2.png 2 1 0.5 0.25 0.125

应用

Main article: List of Block Workarounds

This block can be replicated with the following code:

等待 (((60) / (演奏速度)) * (number of beats)) 秒

However, this freezes the sprite and should be avoided in 一角色一脚本类专案.[factually inaccurate?]

参见

Cookies help us deliver our services. By using our services, you agree to our use of cookies.