ready-made glossaries are supplied with BP2: "-gl.D5
and "-gl.GeneralMIDI". The first one contains information relative to Roland
D-50 synthesiser, and the second one information that is common to all
synthesisers. If your synth is neither Roland D-50 nor General MIDI, you may
edit a specific glossary on the basis of supplied examples.
is altogether a grammar and a script... Let us first look at it as a grammar.
to the glossary window for instance:
This glossary defines program changes used to select instruments following
General MIDI specifications.
Note that MIDI programs are numbered 0 to 127 here (following MIDI spec. 1.0)
instead of 1 to 128 as per General MIDI specs.
You may change variable names, but names should remain consistent in all your
projects. (See acceptable variable names under "variable" in the Help menu.)
Beware that program change messages will be sent on the current channel, which
should be the basic channel of the synthesizer (i.e. the one on which it
receives mode messages). This channel (default 1) may be changed by script
instruction: MIDI set basic channel to ...
AcousticGrandPiano --> _script(MIDI program 1)
BrightAcousticPiano --> _script(MIDI program 2)
ElectricGrandPiano --> _script(MIDI program 3)
HonkyTonkPiano --> _script(MIDI program 4)
RhodesPiano --> _script(MIDI program 5)
ChorusedPiano --> _script(MIDI program 6)
Harpsichord --> _script(MIDI program 7)
clearly looks like a grammar (a subgrammar) with its rewrite rules. Because of
speed optimisation it is always taken as a 'SUB1' type subgrammar, i.e. it
performs one single substitution of the start string. Rule syntax is limited:
the left argument should contain a single variable. If that variable already
appears in the left argument of a rul
belonging to the grammar, the compiler warns you that it may be a mistake, but
proceeds anyway. If the same variable is defined twice in the same glossary,
or if the glossary generates undefined variables, then en error message is
does it work practically?
that BP2 has produced an item and is about to play it, or you have selected an
item in the text window. It first scans the item looking for variables that
are used in the glossary. If no such variable is found then the glossary is
not used. Otherwise it uses the glossary as a subgrammar in order to get the
final string, which will then be expanded (as a polymetric expressio
set in time, and then played on the MIDI output.
the glossary makes a single substitution, a variable appearing in the right
argument of a glossary rul
will only be rewritten if it is defined in a following rule. (See for example
variables 'Internal' and 'Expansion' in "-gl.D50".)
us now look at the
as a script
Any rewrite rule may equivalently be put as a "Define" script instruction, e.g.
--> _script(MIDI program 6)
ChorusedPiano _script(MIDI program 6)
addition, script instructions that influence compilation are acceptable in
convention = key numbers
may use glossaries for any other purpose than setting a MIDI device. The good
thing about glossaries is that they can perform transformations on a string
representing a musical item even when no grammar is used to produce it. It
makes sense that the design of device-specific procedures is not part of a
grammar which is only meant to produce symbolic representations of musical items.