From Test-Scratch-Wiki

Translate: - English - 中文 
This zho is about the block. For more information on the value this block reports, see Tempo (value).
演奏速度
演奏速度
类别 音效类积木
形狀 椭圆形积木
加入於 1.2

The Tempo 积木 is a 音效类积木 and a 椭圆形积木. The block holds the Scratch 专案's 演奏速度. This block can be displayed as a 舞台监控视窗.

用法示例

As this block holds how long drums and notes will be played, it is useful in music projects where they must sense how long an instrument will be playing.

Some common uses for the Tempo block:

  • Speed controls on projects that play music made with the 音效类积木
當 @greenflag 被點擊
重複無限次 
  如果 <滑鼠鍵被按下?> 那麼 
    面朝 [滑鼠游標 v] 向
    演奏速度設為 (((方向) 除 (181) 的餘數) + (20)) bpm
    變數 [universal tempo v] 設為 (演奏速度)
  end
end
  • Loops that must stop once the tempo is at a certain amount
重複直到 <(演奏速度) = [20]> 
  演奏速度改變 (-1)
end
  • Sensing how fast something is being played
當 @greenflag 被點擊
重複無限次 
  說出 (演奏速度)
  面朝 (演奏速度) 度
end
  • Synchronizing with notes with adjustable tempo
當 @greenflag 被點擊
詢問 [Tempo?] 並等待
演奏速度設為 (詢問的答案) bpm
演奏音階 (60) (1) 拍
演奏音階 (62) (1) 拍
演奏音階 (63) (1) 拍

當 @greenflag 被點擊
等待直到 <<(詢問的答案) = []> 不成立>
說出 [C] ((60) / (tempo)) 秒
說出 [D] ((60) / (tempo)) 秒
說出 [E!] ((60) / (tempo)) 秒

参见