Percussion instruments appearing on the same staff can be assigned notes and voices. The percussion instrument ID is then specified instead of a pitch to place a note in the proper location.
To set up a group of percussion instruments for a part, you must create an inst
object
that contains one or more percinst
objects. The following example shows a simple setup using the
perc-note
setting in each percussion definition to assign to it a specific note on the staff.
Percussion instruments are defined separately and are included in the ‘pinst’ instrument by referencing their IDs.
process myproc () for o from 0 to 20 by 1/2 fms:note(time: o, dur: 1/2, pitch: odds(.5, "wb1", "wb2")) end begin with percinsts = {{:id "wb1" :template "low-woodblock" :perc-note 57} {:id "wb2" :template "high-woodblock" :perc-note 64}}, insts = {{:id "pinst" :template "percussion" :percinsts {"wb1" "wb2"}}}, parts = {{:id "perc" :name "Percussion" :inst "pinst"}} sprout(myproc(), *filename*, percinsts: percinsts, insts: insts, parts: parts) end |
|
Figure 8.50: High/Low Woodblocks
The percussion instrument definitions are changed in this example so that the woodblocks are notated in separate voices.
process myproc () for o from 0 to 20 by 1/2 fms:note(time: o, dur: 1/2, pitch: odds(.5, "wb1", "wb2")) end begin with percinsts = {{:id "wb1" :template "low-woodblock" :perc-note 57 :perc-voice 2} {:id "wb2" :template "high-woodblock" :perc-note 64 :perc-voice 1}}, insts = {{:id "pinst" :template "percussion" :percinsts {"wb1" "wb2"}}}, parts = {{:id "perc" :name "Percussion" :inst "pinst"}} sprout(myproc(), *filename*, percinsts: percinsts, insts: insts, parts: parts) end |
|
Figure 8.51: Percussion with Voice Assignments
The following uses inlined percinst
and inst
definitions but is otherwise equivalent to the example above:
process myproc () for o from 0 to 20 by 1/2 fms:note(time: o, dur: 1/2, pitch: odds(.5, "wb1", "wb2")) end begin with parts = {{:id "perc" :name "Percussion" :inst {:template "percussion" :percinsts {{:id "wb1" :template "low-woodblock" :perc-note 57 :perc-voice 2} {:id "wb2" :template "high-woodblock" :perc-note 64 :perc-voice 1}}}}} sprout(myproc(), *filename*, parts: parts) end |
|
Figure 8.52: Inlined Percussion and Instrument Definitions
If perc-name
is set inside a percussion instrument definition, FOMUS places this name above the staff whenever there
is a change from one percussion instrument to another.
process myproc () for o from 0 to 20 by 1 fms:note(time: o, dur: 1, pitch: #?(o < 12, "bdr", "cym")) end begin with percinsts = {{:id "bdr" :perc-note 60 :perc-name "B. Drum"} {:id "cym" :perc-note 60 :perc-name "Cymbal"}}, insts = {{:id "pinst" :template "percussion" :percinsts {"bdr" "cym"}}}, parts = {{:id "perc" :name "Percussion" :inst "pinst"}} sprout(myproc(), *filename*, percinsts: percinsts, insts: insts, parts: parts) end |
|
Figure 8.53: Percussion Changes
If you find yourself reusing the same percussion instrument definitions, you could insert something resembling the following in your .fomus file located in your home directory (make sure you use ‘+=’ instead of ‘=’ to append the values to FOMUS's default list).
percinst-defs += (<id cym, perc-note c4, perc-name "Cymbal"> <id bdr, perc-note c4, perc-name "B. Drum">)
All of FOMUS's built-in percussion instruments are contained in the file fomus.conf
, which is located in /install_prefix/shared/
(install_prefix is most likely /usr/local or /usr).