Next: , Previous: Percussion (File), Up: `.fms' File Examples


6.12 Beats and Measures

6.12.1 Beats

The beat setting specifies what rhythmic value is equal to one durational unit or “beat.” By default this value is 1/4, which means a duration of 1 is notated with a quarter note. beat must always be an integer or rational number whose denominator is a power of two (e.g., 1/8, 1/4, 1/2, 1 and 2 are valid values). The following example shows the effect of changing beat to 1/8 (an eighth note).

beat 1/8

part <id pno, inst piano>

part pno

time 0 dur 4 ||
dur 1
time 0 pitch 60 ;
time + pitch 58 ;
time + pitch 58 ;
time + pitch 55 ;
time + pitch 55 ;
time + pitch 57 ;
time + pitch 55 ;
time + pitch 56 ;

ex065.png

Figure 6.61: Beats Setting

If you change beat in the middle of a passage, FOMUS adjusts by changing the time signature (i.e., FOMUS does not change the times or durations of measures to compensate—it changes the notation).

part <id pno, inst piano>

part pno

time 0 dur 4 |beat 1/2|
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 58 ;
time 1 pitch 58 ;
time 1+1/2 pitch 55 ;
time 2 pitch 55 ;
time 2+1/2 pitch 55 ;
time 3 pitch 55 ;
time 3+1/2 pitch 54 ;

time 4 dur 4 |beat 1/4|
dur 1/2
time 4 pitch 56 ;
time 4+1/2 pitch 57 ;
time 5 pitch 56 ;
time 5+1/2 pitch 55 ;
time 6 pitch 52 ;
time 6+1/2 pitch 54 ;
time 7 pitch 55 ;
time 7+1/2 pitch 54 ;

time 8 dur 4 |beat 1/8|
dur 1/2
time 8 pitch 51 ;
time 8+1/2 pitch 54 ;
time 9 pitch 57 ;
time 9+1/2 pitch 58 ;
time 10 pitch 56 ;
time 10+1/2 pitch 58 ;
time 11 pitch 56 ;
time 11+1/2 pitch 56 ;

time 12 dur 4 |beat 1/2|
dur 1/2
time 12 pitch 54 ;
time 12+1/2 pitch 57 ;
time 13 pitch 56 ;
time 13+1/2 pitch 56 ;
time 14 pitch 57 ;

ex037.png

Figure 6.62: Beats Setting in the Middle of a Passage

6.12.2 Measures

Measures in FOMUS are defined in a way similar to note events by specifying time and duration along with settings and values. Measures only need to be defined when a change occurs (e.g., a change in the time or key signature) or you want to insure that a downbeat occurs at some specific time. FOMUS fills in the remaining measures by repeating the measure defined by you and adjusting any that overlap or don't fit.

// parts
part <id pno, inst piano>

// events
part pno

time 0 dur 3 ||
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 60 ;

time 3 pitch 60 ;
time 3+1/2 pitch 61 ;

time 8 pitch 60 ;
time 8+1/2 pitch 59 ;
time 9 pitch 56 ;

time 14+1/2 pitch 60 ;
time 15 pitch 60 ;
time 15+1/2 pitch 61 ;

ex066.png

Figure 6.63: Specifying a Measure

The duration of this measure is 3+1/2 instead of 3. This is notated as an 7/8 measure:

// parts
part <id pno, inst piano>

// events
part pno

time 0 dur 3+1/2 ||
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 60 ;

time 3 pitch 60 ;
time 3+1/2 pitch 61 ;

time 8 pitch 60 ;
time 8+1/2 pitch 59 ;
time 9 pitch 56 ;

time 14+1/2 pitch 60 ;
time 15 pitch 60 ;
time 15+1/2 pitch 61 ;

ex067.png

Figure 6.64: Specifying a 7/8 Measure

In the following example each small phrase begins on a downbeat. FOMUS begins a new series of 3/4 measures at all of the specified locations while fitting and adjusting the remaining measures in the best way possible.

// parts
part <id pno, inst piano>

// events
part pno

time 0 dur 3 ||
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 60 ;

time 3 dur 3 ||
dur 1/2
time 3 pitch 60 ;
time 3+1/2 pitch 61 ;

time 8 dur 3 ||
dur 1/2
time 8 pitch 60 ;
time 8+1/2 pitch 59 ;
time 9 pitch 56 ;

time 14+1/2 dur 3 ||
dur 1/2
time 14+1/2 pitch 60 ;
time 15 pitch 60 ;
time 15+1/2 pitch 61 ;

ex038.png

Figure 6.65: Measures at Arbitrary Locations

When FOMUS needs to create a new measure or delete one to work around the user's explicitly defined measures, it does so according to the min-measdur setting. min-measdur represents the duration of the smallest measure FOMUS is allowed to create.

min-measdur = 2

part <id pno, inst piano>

part pno

time 0 dur 4 ||
time 3 dur 4 ||
time 6 dur 4 ||
time 12 dur 4 ||

dur 1/2
time 0 pitch 60 ;
time + pitch 62 ;
time + pitch 64 ;
time + pitch 65 ;
time + pitch 64 ;
time + pitch 62 ;
time + pitch 60 ;
time + pitch 59 ;
time + pitch 60 ;
time + pitch 62 ;
time + pitch 64 ;
time + pitch 65 ;
time + pitch 64 ;
time + pitch 62 ;
time + pitch 60 ;
time + pitch 59 ;
time + pitch 60 ;
time + pitch 62 ;
time + pitch 64 ;
time + pitch 65 ;
time + pitch 64 ;
time + pitch 62 ;
time + pitch 60 ;
time + pitch 59 ;
time + pitch 60 ;
time + pitch 62 ;
time + pitch 64 ;
time + pitch 65 ;
time + pitch 64 ;
time + pitch 62 ;
time + pitch 60 ;
time + pitch 59 ;

ex076.png

Figure 6.66: Minimum Measure Duration

6.12.3 Compound Meter

Compound meter is specified by setting comp to ‘yes’. The beat setting is then interpretted as a dotted value. For example, in compound meter a beat setting of 1/4 means a duration of 1 is notated as a dotted quarter note.

// parts
part <id pno, inst piano>

// events
part pno

time 0 dur 4 |comp yes|
dur 1/3
time 0 pitch 60 ;
time 1/3 pitch 57 ;
time 2/3 pitch 60 ;
time 1 pitch 60 ;

time 3 pitch 60 ;
time 3+1/3 pitch 61 ;

time 8 pitch 60 ;
time 8+1/3 pitch 59 ;
time 8+2/3 pitch 56 ;

time 14+1/3 pitch 60 ;
time 14+2/3 pitch 60 ;
time 15+1/3 pitch 61 ;

ex068.png

Figure 6.67: Specifying Compound Meter

6.12.4 Time Signatures

FOMUS automatically calculates the time signature that appears in the score. This calcaulation can be influenced by changing the value of timesig-den. Setting this to 8 (and beat to 1/4), for example, causes measures of duration 2 to be notated with 4/8 time signatures, measures of duration 3 to be notated with 6/8, etc.. FOMUS changes this to a higher multiple of two if necessary. For example, if timesig-den is 4 then measures of duration 4+1/4 are notated with 17/16 time signatures.

part <id pno, inst piano>

part pno
time 0 dur 4 |timesig-den 2|
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 63 ;
time 1 pitch 62 ;
time 1+1/2 pitch 59 ;
time 2 pitch 57 ;
time 2+1/2 pitch 56 ;
time 3 pitch 54 ;
time 3+1/2 pitch 51 ;

time 4 dur 4 |timesig-den 4|
dur 1/2
time 4 pitch 49 ;
time 4+1/2 pitch 52 ;
time 5 pitch 54 ;
time 5+1/2 pitch 52 ;
time 6 pitch 52 ;
time 6+1/2 pitch 52 ;
time 7 pitch 54 ;
time 7+1/2 pitch 52 ;

time 8 dur 4 |timesig-den 8|
dur 1/2
time 8 pitch 53 ;
time 8+1/2 pitch 55 ;
time 9 pitch 53 ;
time 9+1/2 pitch 50 ;
time 10 pitch 51 ;
time 10+1/2 pitch 50 ;
time 11 pitch 47 ;
time 11+1/2 pitch 44 ;

time 12 dur 3+1/2 |timesig-den 4|
dur 1/2
time 12 pitch 47 ;
time 12+1/2 pitch 49 ;
time 13 pitch 47 ;
time 13+1/2 pitch 49 ;
time 14 pitch 48 ;

ex039.png

Figure 6.68: Time Signature Denominator Setting

6.12.5 Explicit Time Signatures

Use the timesig setting if you want to explicitly specify a time signature. When you do this, FOMUS ignores the duration attribute and calculates the duration of the measure from the time signature.

// parts
part <id pno, inst piano>

// events
part pno
time 0 |timesig (2 2)|
dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 55 ;
time 1+1/2 pitch 53 ;
time 2 pitch 52 ;
time 2+1/2 pitch 52 ;
time 3 pitch 54 ;
time 3+1/2 pitch 52 ;

time 4 |timesig (4 4)|
dur 1/2
time 4 pitch 53 ;
time 4+1/2 pitch 55 ;
time 5 pitch 56 ;
time 5+1/2 pitch 56 ;
time 6 pitch 56 ;
time 6+1/2 pitch 57 ;
time 7 pitch 59 ;
time 7+1/2 pitch 60 ;

time 8 |timesig (8 8)|
dur 1/2
time 8 pitch 60 ;
time 8+1/2 pitch 58 ;
time 9 pitch 57 ;
time 9+1/2 pitch 57 ;
time 10 pitch 60 ;
time 10+1/2 pitch 59 ;
time 11 pitch 60 ;
time 11+1/2 pitch 59 ;

time 12 |timesig (5 8)|
dur 1/2
time 12 pitch 59 ;
time 12+1/2 pitch 60 ;
time 13 pitch 62 ;
time 13+1/2 pitch 65 ;
time 14 pitch 67 ;

ex040.png

Figure 6.69: Explicit Time Signatures

6.12.6 Measure Divisions

FOMUS uses two settings, meas-divs and default-measdivs to determine how a measure is split or “divided” up into smaller subdivisions. These subdivisions have a direct influence on how notes are split, tied and beamed, and can be controlled so that the right meter is represented in the score.

meas-divs and default-measdivs both contain lists of durations that specify two or more divisions (one division doesn't make any sense). For example, the list ‘(2 2)’ specifies that a measure with a duration of 4 should be divided in half (this represents a typical duple meter). ‘(3 2)’ specifies that a measure with a duration of 5 be divided into a 3 + 2 measure. In meas-divs you can actually specify one or more of these lists—FOMUS then chooses the division that produces the least complex result (i.e., the least number of tied notes and tuplets). For example, setting meas-divs to ‘((3 2) (2 3))’ tells FOMUS that it may choose to divide 5 beats into 3 + 2 or 2 + 3 depending on which one is most suitable.

time 0 dur 5/2 |meas-divs ((3 2))|
time 5 dur 5/2 |meas-divs ((2 3))|

dur 1/2
time 0 pitch 60 ;
time + pitch 61 ;
time + pitch 62 ;
time + pitch 63 ;
time + pitch 64 ;

time + pitch 65 ;
time + pitch 64 ;
time + pitch 63 ;
time + pitch 62 ;
time + pitch 61 ;

time + pitch 60 ;
time + pitch 61 ;
time + pitch 62 ;
time + pitch 63 ;
time + pitch 64 ;

time + pitch 65 ;
time + pitch 64 ;
time + pitch 63 ;
time + pitch 62 ;
time + pitch 61 ;

ex080.png

Figure 6.70: Measure Divisions

meas-divs should usually be placed in a measure definition and should only specify divisions specific to that measure. To modify all possible divisions for any measure of any duration use the default-measdivs setting.

default-measdivs = ((3 2) (4 3))

time 0 dur 5/2 ||
time 5 dur 7/2 ||

dur 1/2
time 0 pitch 60 ;
time + pitch 61 ;
time + pitch 62 ;
time + pitch 63 ;
time + pitch 64 ;

time + pitch 65 ;
time + pitch 64 ;
time + pitch 63 ;
time + pitch 62 ;
time + pitch 61 ;

time + pitch 60 ;
time + pitch 61 ;
time + pitch 62 ;
time + pitch 63 ;
time + pitch 64 ;

time + pitch 65 ;
time + pitch 64 ;
time + pitch 63 ;
time + pitch 62 ;
time + pitch 61 ;

ex081.png

Figure 6.71: Default Measure Divisions

To change FOMUS's default measure divisions you can also set default-measdivs in your .fomus file located in your home directory.

In most cases, FOMUS uses the same settings to subdivide a measure further after it has initially divided it. For example, once it has divided 5 beats into 3 + 2 beats, it should further subdivide the 3 beats into either 2 + 1, 1 + 2 or 1 + 1 + 1 beats (according to FOMUS's built-in choices). If FOMUS can't find a suitable list of divisions (i.e., the right duration is missing from meas-divs or default-measdivs) it multiplies and/or divides by 2 until it does find one. For example, it might use ‘(3 2)’ to divide 2+1/2 beats into 1+1/2 + 1 if no other list of divisions is provided for a duration of 2+1/2 beats. This allows ‘(3 2)’ to cover measures with 5/8, 5/4 and 5/2 time signatures, for example, regardless of what the value of beat is.

If you are trying to notate any unusual metrical divisions, these features might cause a few subtle quirks. In the first example below, the 1+1/2 + 1+1/2 division specified in meas-divs causes two further 3/4 + 3/4 subdivisions. Since FOMUS does not have a built-in rule for dividing 1+1/2 beats it derives ‘(3/4 3/4)’ from ‘(1+1/2 1+1/2)’ and from this divides each 1+1/2 beat division in half. This is what is causing the strange pattern of rests in the measure below. The problem can be alleviated by providing instructions on how to divide 1+1/2 beats.

// parts
part <id pno, inst piano>

// events
part pno

measdef <id mea meas-divs ((1+1/2 1+1/2))>

time 0 dur 3 |mea|

dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 60 ;

time 3 pitch 60 ;
time 3+1/2 pitch 61 ;

time 8 pitch 60 ;
time 8+1/2 pitch 59 ;
time 9 pitch 56 ;

time 14+1/2 pitch 60 ;
time 15 pitch 60 ;
time 15+1/2 pitch 61 ;

ex078.png

Figure 6.72: Strange Measure Divisions

If there is more than one part, FOMUS tries to divide simultaneous measures the same way. For example, 10 measures starting at time 0 with 5/4 time signatures are all notated as either 3 + 2 or 2 + 3. If you want the possibility of different parts being divided differently, you can assign parts to special metrical groups using the setting divgroup. Basically, all parts with the same divgroup ID are divided the same way, and parts with different divgroup IDs can be divided differently.

TODO: not implemented yet

6.12.7 Measure Definitions

The examples above all use measure “events,” which, like note and rest events, have times and durations. If you place a large number of settings inside them, you might end up cutting and pasting cumbersome measure definitions over and over again. This can be avoided by defining one or more measdef objects, which store settings and values in one location and attach IDs to them. The IDs may then be used when specifying measure events.

// parts
part <id pno, inst piano>

// events
part pno

measdef <id m1 timesig (7 8) meas-divs ((2 1+1/2))>
measdef <id m2 timesig (7 8) meas-divs ((1+1/2 2))>

time 0 |m1|

dur 1/2
time 0 pitch 60 ;
time 1/2 pitch 57 ;
time 1 pitch 60 ;

time 3 pitch 60 ;
time 3+1/2 pitch 61 ;

time 7 |m2|

time 8 pitch 60 ;
time 8+1/2 pitch 59 ;
time 9 pitch 56 ;

time 14+1/2 pitch 60 ;
time 15 pitch 60 ;
time 15+1/2 pitch 61 ;

ex077.png

Figure 6.73: measdef Objects

The measdur setting inside a measure definition overrides the duration attribute (in the same way that timesig does) and fixes the duration of the measure.

TODO: example