Next: , Previous: Grace Notes (SAL), Up: SAL Examples


8.9 Tuplets

8.9.1 Tuplet Durations

You can set the minimum and maximum duration a tuplet is allowed to span with min-tupletdur and max-tupletdur. They are set here as part of the measure definitions because they can't be set at the note level.

define process myproc ()
  for i from 0 below 24
  fms:note(dur: 1/3, pitch: between(60, 73))
  wait 1/3
end

define process meass ()
  with sets = make-cycle({:min-tupletdur :max-tupletdur}),
       vals = make-cycle({2               1})
  for i from 0 below 2
  fms:meas(dur: 4, sets: list(next(sets), next(vals)))
  wait 4
end

sprout(list(myproc(), meass()), *filename*)

sal061.png

Figure 8.41: Minimum and Maximum Tuplet Durations

8.9.2 Forcing Tuplets

The tup.. and ..tup marks force FOMUS to begin and end a tuplet at those locations, even if it breaks FOMUS's rules determining where tuplets are allowed to occur. The example below uses begin marks to force FOMUS to only begin tuplets at those locations.

define process myproc ()
  with m = make-cycle({{"tup.."} {} {}})
  for i from 0 below 24
  fms:note(dur: 1/3, pitch: between(60, 73), marks: next(m))
  wait 1/3
end

sprout(myproc(), *filename*)

sal021.png

Figure 8.42: Tuplet Begin and End Marks

You can also use the tupletdur and tupletrat settings to fix the duration or ratio of the tuplet:

process myproc ()
  repeat 24
  fms:note(dur: 1/3, pitch: between(60, 73),
           tupletdur: #?(elapsed() < 4, 1, 2))
  wait 1/3
end

sprout(myproc(), *filename*)

sal020.png

Figure 8.43: Tuplet Durations

It's best to include tupletdur and tupletrat in all note events that might fall underneath the tuplets. Specifying these settings in only a single event, for example, might cause FOMUS to overlook them.

This example shows tuplets being explicitly defined using the marks and settings introduced above:

define process myproc ()
  repeat 8 * 5
  for tupcnt from 0
  fms:note(dur: 1/5,
           pitch: between(60, 73),
           marks: append(#?((tupcnt % 10) = 0, {"tup.."}, {}),
                         #?((tupcnt % 10) = 9, {"..tup"}, {})),
           sets: {:tupletdur 2 :tupletrat 5/4})
  wait 1/5
end

sprout(myproc(), *filename*)

sal062.png

Figure 8.44: Explicitly Defined Tuplets