Songs are easier to understand when broken into parts, as parts are often repeated within songs. This integral part of songs is featured in 8-Beat using the section syntax. Below is an example of sections.
# Author: Brian Mock # Purpose: Test of song section syntax [ Intro ] duration = 8 C; D; E; F; G; A; B [ Main ] duration = 48 C; C; C; R 16 D; D; D; R 16 E; E; E; R 16 F; F; F; R 16 G; G; G; R 16 A; A; A; R 16 B; B; B; R 16 A; A; A; R 16 G; G; G; R 16 F; F; F; R 16 E; E; E; R 16 D; D; D; R 16 [ Interlude ] duration = 32 +; C; -; C; +; C; -; C [ Loop ] tempo = 240 octave = 3 play Main tempo = 120 octave = 4 repeat 2 Interlude [ Song ] octave = 5 tempo = 480 play Intro; R 8 play Main; R 8 repeat 2 Interlude; R 8 loop Loop
These section names can be any sequence of characters with the exception of
These names are case insensitive, but preserve the original case. So if you
name a section "Chorus", you can later use the command "play chorus" and
8-Beat will realize you actually meant "play Chorus". Also note that the
spacing around the name is irrelevant, e.g.,
[ Riff ], and
[ Riff ]
are all the same.
As shown above, sections may play other sections, thus allowing you to not have to retype as many things by modularizing your song. One possibility is a sequence of notes that needs to be played multiple times at different octaves. An example of this is shown below.
[ Riff #1 ] C; D; F; G F; E; D; C [ Song ] duration = 16 tempo = 120 octave = 3 play Riff #1 +; play Riff #1 +; play Riff #1 tempo * 2 +; play Riff #1 tempo / 1.50 +; play Riff #1
The point of this section system is twofold: (1) Reduce copy–pasting as it leads to errors, and (2) enable infinitely looping songs (as in my above example), which is useful for 8-bit tunes.
For bonus points, note here the
tempo * 2 style
syntax. This scales the tempo. So if the tempo was previously 120, it would
tempo / 1.50 works similarly, except
it divides the tempo.