(See Also: ru interwiki)
 
(45 intermediate revisions by 22 users not shown)
Line 1: Line 1:
 
{{block
 
{{block
|name      = Rest for () Beats  
+
|name      = Rest for () Beats
|image      = File:Rest_for_()_Beats.png
+
|image      = File:2.0 Rest_for_()_Beats.png
|imagewidth = 112
 
 
|category  = [[Sound Blocks|Sound]]
 
|category  = [[Sound Blocks|Sound]]
 
|type      = [[Stack Block|Stack]]
 
|type      = [[Stack Block|Stack]]
 +
|default    = 0.2
 +
|argType    = number
 +
|added      = 1.2.1
 
}}
 
}}
The '''Rest for () Beats''' [[Blocks|block]] is a [[Sound Blocks|Sound block]] and a [[Stack Block|Stack block]]. The block pauses its [[Script|script]] for the specified amount of beats - the amount of beats can be a decimal number. To change the length of beats, the [[Change Tempo by () (block)|Change Tempo by ()]] block and the [[Set Tempo to () bpm (block)|Set Tempo to () bpm]] block can be used.
+
The '''Rest for () Beats''' [[Blocks|block]] is a [[Sound Blocks|Sound block]] and a [[Stack Block|Stack block]]. The block pauses its [[script]] for the specified amount of beats, which can be a decimal number. To change the length of beats, the [[Change Tempo by () (block)|Change Tempo by ()]] block and the [[Set Tempo to () bpm (block)|Set Tempo to () bpm]] block can be used.
==Behind the Scenes==
+
 
The block can be replicated with the following code:
+
{{note|Some musical knowledge may be needed to fully understand this article.}}
 +
 
 +
==Example Uses==
 +
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:
 +
* Pauses in songs made with the "play [[Play Note () for () Beats (block)|note]]/[[Play Drum () for () Beats (block)|drum]]" blocks
 +
<scratchblocks>
 +
play drum (8 v) for (0.25) beats
 +
rest for (0.2) beats
 +
</scratchblocks>
 +
* A pause in sound effects made with the [[Sound Blocks]]
 +
* A music generator
  
[[File: ReplacementForRestBlock.gif]]
 
 
==Notation==
 
==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 way.
+
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.
{| class="wikitable" border="1"
+
 
|-
+
{| class="wikitable" border="1"
|<!--col1-->
+
|-
|<!--col2-->[[File:WholeRest.png]]
+
|<!--col1-->
|<!--col3-->[[File:HalfRest.png]]
+
|<!--col2-->[[File:WholeRest.png]]
|<!--col4-->[[File:QuarterRest.png]]  
+
|<!--col3-->[[File:HalfRest.png]]
|<!--col5-->[[File:8thRest.png]]
+
|<!--col4-->[[File:QuarterRest.png]]
|<!--col6-->[[File:16thRest.png]]
+
|<!--col5-->[[File:8thRest.png]]
|-
+
|<!--col6-->[[File:16thRest.png]]
|<!--col1-->[[File:TimeSig4.png]]
+
|-
|<!--col2-->4
+
|<!--col1-->[[File:TimeSig4.png]]
|<!--col3-->2
+
|<!--col2-->4
|<!--col4-->1  
+
|<!--col3-->2
|<!--col5-->0.5
+
|<!--col4-->1
|<!--col6-->0.25
+
|<!--col5-->0.5
|-
+
|<!--col6-->0.25
|<!--col1-->[[File:TimeSig8.png]]
+
|-
|<!--col2-->8
+
|<!--col1-->[[File:TimeSig8.png]]
|<!--col3-->4
+
|<!--col2-->8
|<!--col4-->2  
+
|<!--col3-->4
|<!--col5-->1
+
|<!--col4-->2
|<!--col6-->0.5
+
|<!--col5-->1
|-
+
|<!--col6-->0.5
|<!--col1-->[[File:TimeSig2.png]]
+
|-
|<!--col2-->2
+
|<!--col1-->[[File:TimeSig2.png]]
|<!--col3-->1
+
|<!--col2-->2
|<!--col4-->0.5  
+
|<!--col3-->1
|<!--col5-->0.25
+
|<!--col4-->0.5
|<!--col6-->0.125
+
|<!--col5-->0.25
|-
+
|<!--col6-->0.125
|}<!--end wikitable-->
+
|-
==Common Uses==
+
|}<!--end wikitable-->
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.
+
 
 +
==Workaround==
 +
{{main|List of Block Workarounds}}
 +
This block can be replicated with the following code:
 +
 
 +
<scratchblocks>wait (((60) / (tempo)) * (number of beats)) secs</scratchblocks>
 +
However, this freezes the sprite and should be avoided in [[One Sprite One Script Project|1s1s projects]].{{fact}}
 +
 
 +
==See Also==
 +
* [[MIDI]]
 +
* [[Play Drum () for () Beats (block)|Play Drum () for () Beats]]
 +
* [[Play Note () for () Beats (block)|Play Note () for () Beats]]
 +
{{Sound Blocks}}
  
Some common uses for the '''Rest for () Beats''' block:
 
*Delays in songs made with blocks
 
*A pause in sound effects made with the Sound blocks
 
*A music generator
 
{{Scratch Blocks}}
 
 
[[Category:Sound Blocks]]
 
[[Category:Sound Blocks]]
 +
[[de:Pausiere () Schläge (Block)]]
 +
[[ja:() 拍休む (ブロック)]]
 +
[[ru:Подождать () тактов]]

Latest revision as of 14:14, 12 July 2018

Rest for () Beats
2.0 Rest for () Beats.png
Category Sound
Type Stack
Introduced in 1.2.1

The Rest for () Beats block is a Sound block and a Stack block. The block pauses its script for the specified amount of beats, which can be a decimal number. To change the length of beats, the Change Tempo by () block and the Set Tempo to () bpm block can be used.

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

Example Uses

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:

  • Pauses in songs made with the "play note/drum" blocks
play drum (8 v) for (0.25) beats
rest for (0.2) beats
  • A pause in sound effects made with the Sound Blocks
  • A music generator

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

Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

wait (((60) / (tempo)) * (number of beats)) secs

However, this freezes the sprite and should be avoided in 1s1s projects.[problematic]

See Also