Next: , Previous: Mark Events (SAL), Up: SAL Examples


8.8 Grace Notes

8.8.1 Specifying Grace Notes

Grace notes are created by supplying a value to the grace parameter. The time, grace and duration parameters together determine where the grace note appears and how it is spelled rhythmically. time indicates the time of the event before which the grace note appears (grace notes with the same time are beamed together as a group). grace can be thought of as a pseudo-time “within” the normal time specified by time. For example, grace notes with earlier grace values appear before grace notes with later grace values, and grace notes with equivalent grace values are grouped into chords. duration in the context of a grace note is interpreted in a manner consistent with normal note durations. For example, if a duration of 1/2 is normally notated as an eighth note (the default behavior), a grace note with a duration of 1/2 is also notated as a (small-sized) eighth note.

In the example below, the time values of the grace notes determine which quarter notes they appear in front of. grace values in each group begin at 0 and increment by the value of duration, which in this case is always 1/4 (a sixteenth note).

process myproc-notes (n)
  repeat n
  fms:note(dur: 1, pitch: between(48, 73))
  wait 1
end

process myproc-gracenotes (n)
  repeat n
  loop repeat random(3)
    for g from 0 by 1/4
    fms:note(grace: g, dur: 1/4, pitch: between(48, 73))
  end
  wait 1
end

sprout(list(myproc-notes(20), myproc-gracenotes(16)), *filename*)

sal019.png

Figure 8.38: Grace Notes

The following example includes slash marks, and also shows that FOMUS still outputs consecutive grace notes despite the different grace values given (they don't begin at 0 and increment by 1). (The slashes only appear on the single grace notes.)

process myproc-notes (n)
  repeat n
  fms:note(dur: 1, pitch: between(48, 73))
  wait 1
end

process myproc-gracenotes (n)
  repeat n
  loop repeat random(3)
    for g from 1
    fms:note(grace: g, dur: 1/4, pitch: between(48, 73),
             marks: {"/"})
  end
  wait 1
end

sprout(list(myproc-notes(20), myproc-gracenotes(16)), *filename*)

sal052.png

Figure 8.39: Grace Notes with Slashes

Grace note chords are shown in the following example:

process myproc-notes (n)
  repeat n
  fms:note(dur: 1, pitch: between(48, 73))
  wait 1
end

process myproc-gracenotes (n)
  repeat n
  loop repeat random(3)
    for g from 0 by 1/4
    loop repeat between(1, 3)
      fms:note(grace: g, dur: 1/4, pitch: between(48, 73))
    end
  end
  wait 1
end

sprout(list(myproc-notes(20), myproc-gracenotes(16)), *filename*)

sal053.png

Figure 8.40: Grace Note Chords