1
<chapter id="BeatsTop">
5
<indexterm id="IndexBeats"><primary>Beats</primary></indexterm>
6
<emphasis>Beats</emphasis> is an alternative score language that is aimed at
7
specifying simple scores in standard western tunings and
8
rhythms. <emphasis>Beats</emphasis> can be invoked via the
9
CsScore component of a standard .csd score with
10
<emphasis>bin="beats"</emphasis> or as stand-alone
11
program which generates a standard numeric score.
15
As a stand-alone the program reads standard input and writes to
22
The <emphasis>beats</emphasis> language is very simple, having
23
only 5 kinds of statement, and only one of them has any
24
complexity. In general the introductory word for each statement
25
type is case insensitive, so "QUIT", "quit", "QuIt"... are all
26
the same. Comments can be introduced in either ANSI C89 format
27
or C++ (that is either /* ... */ or // to the end of line) or
31
<listitem><emphasis>QUIT</emphasis>
33
Causes beats to exit. For
34
flexibility the command <emphasis>END</emphasis> is also
35
accepted for the identical action.
38
<listitem><emphasis>BEATS</emphasis>=integer
40
Sets the number of beats
41
per minute for the following score until the end or until it is
42
reset. The default value is 60bpm. The token
43
<emphasis>BPS</emphasis> is also acceptable instead of BEATS.
46
<listitem><emphasis>PERMEASURE</emphasis>=integer
49
beats in a bar. The default value is 4.
52
<listitem><emphasis>BAR</emphasis>
57
<listitem><emphasis>BAR</emphasis> integer
59
Start the bar whose number is
64
<emphasis>i</emphasis> integer attributes
66
Specified a note event for the numbered instrument. The
67
attributes may be any of a pitch, duration or dynamic, or a
68
positioning of the note to a beat or measure, and can be in
72
Pitches are specified with a conventional note name (English
73
form) in upper case optionally followed by a #, x (for
74
double sharp), b (for flat) or bb (for double flat).
75
A note of Z is a rest (think zzzz). All notes except rests
76
must be followed by an octave number, with A4 being
77
international A (440Hz). Pitches are passed to Csound in
78
Hertz in the parameter p4, and are twelve tone equal temprament.
81
Durations are coded in lower case with the initial letter of the
85
<emphasis>ed</emphasis> Dotted eighth note (three
89
<emphasis>et</emphasis> Triplet eighth note (third of a beat)
92
<emphasis>e</emphasis> Eighth note (half a beat)
95
<emphasis>hd</emphasis> Dotted half note (three beats)
98
<emphasis>ht</emphasis> Triplet half note (one and a third beats)
101
<emphasis>h</emphasis> Half note (two beats)
104
<emphasis>qd</emphasis> Dotted quarter note (one and a half beats)
107
<emphasis>qt</emphasis> Triplet quarter note (two thirds of a
111
<emphasis>q</emphasis> Quarter note (one beat)
114
<emphasis>sd</emphasis> Dotted sixteenth note (Three eighths
118
<emphasis>st</emphasis> Triplet sixteenth note (sixth
122
<emphasis>s</emphasis> Sixteenth note (quarter of a beat)
125
<emphasis>th</emphasis> Thirty-second note (an eighth of a beat)
128
<emphasis>w</emphasis> Whole note (four beats)
131
Durations can be added together by giving more that one
132
duration. To make this more intuitive a + sign can be used
133
instead of white space.
136
The dynamics are written in conventional notation, that is fff,
137
ff, f, mf, mp, p, pp, ppp. These are passed to the instrument
138
as p5 as 0 for fff, and one less dB for each step below. The
139
default dynamic is fortissimo.
142
If any of these attributes is missing it carried forward from the
143
previous note, with beat position being incremented to the end
144
of the previous note.
147
In addition an event can be directed to a particular measure with
148
an m attribute or a particular beat with a b.
154
<section id="Example">
156
The opening of Bach's Goldberg variation number 3 can be coded
159
; Bach - Goldberg Variations - Variato 3
160
; by Brian Baughn 3-14-05
161
; bbaughn@berklee.net
165
i101 m1 b1 B4 mp qd+s
206
i101 Z e // Z is a rest (zzzzz..)
217
;;;setting bpm=120.000000
218
;;;setting permeasure=6
219
i101 0.000000 0.875000 493.883621 -4
220
i101 0.875000 0.125000 523.251131 -4
221
i101 1.000000 0.125000 587.329536 -4
222
i101 1.125000 0.125000 523.251131 -4
223
i101 1.250000 0.125000 587.329536 -4
224
i101 1.375000 0.125000 659.255114 -4
225
i101 1.500000 0.875000 440.000000 -4
226
i101 2.375000 0.125000 493.883621 -4
227
i101 2.500000 0.125000 523.251131 -4
228
i101 2.625000 0.125000 493.883621 -4
229
i101 2.750000 0.125000 523.251131 -4
230
i101 2.875000 0.125000 587.329536 -4
231
i101 3.000000 0.750000 391.995436 -4
232
i101 3.750000 1.000000 783.990872 -4
233
i101 4.750000 0.125000 880.000000 -4
234
i101 4.875000 0.125000 783.990872 -4
235
i101 5.000000 0.125000 739.988845 -4
236
i101 5.125000 0.125000 783.990872 -4
237
i101 5.250000 0.250000 880.000000 -4
238
i101 6.250000 0.125000 587.329536 -4
239
i101 6.375000 0.125000 523.251131 -4
240
i101 6.500000 0.125000 493.883621 -4
241
i101 6.625000 0.125000 440.000000 -4
242
i101 6.750000 0.250000 493.883621 -4
243
i101 7.000000 0.125000 523.251131 -4
244
i101 7.125000 0.125000 493.883621 -4
245
i101 7.250000 0.125000 440.000000 -4
246
i101 7.375000 0.125000 493.883621 -4
247
i101 7.500000 0.250000 391.995436 -4
248
i101 7.750000 0.250000 659.255114 -4
249
i101 8.000000 0.250000 587.329536 -4
250
i101 8.250000 0.250000 523.251131 -4
251
i101 8.500000 0.250000 739.988845 -4
252
i101 8.750000 0.250000 880.000000 -4
253
i101 9.000000 0.500000 493.883621 -4
254
i101 9.500000 0.250000 783.990872 -4
255
i101 9.750000 0.500000 783.990872 -4
256
i101 10.250000 0.250000 739.988845 -4
257
;;rest at 10.500000 for 0.250000
258
;;rest at 10.750000 for 0.250000
259
i101 11.000000 0.250000 987.767243 -4
260
i101 11.250000 0.500000 880.000000 -4
261
i101 11.750000 0.250000 587.329536 -4