Run
a script
(You
can send your brother back to his video game now. Here comes some substantial
stuff.)
Quit
BP2 and double-click the "+sc.TryM
e"
file. BP2 will run this demo script which plays a short burst of music on the
MIDI device (channel 1) or the loudspeaker (via QuickTime music) and prompts
the user to hit a key of the MIDI keyboard or click the mouse.
You
may skip the rest of this section if you are not enthusiastic about AppleScript
and any programming stuff. Instead you might try working with simple notes (see
§1.4), performance controls (§1.5), sound-objects (§2) or
grammars (§3-4).
Type
cmd-– or select "Script" in the "Windows" menu. The following script is
displayed:
//
This is a script for Bol Processor BP2
Show
messages OFF -- avoid useless display
Note
convention = English
Show
graphics ON
Play
{2,G4,E4,C4,- C5 - C5 {C5_-,A#4_ _}}
Show
messages ON
Activate
window Scrap
Type
Welcome to Bol Processor BP2...
Type
<return>
Type
<return>
Type
Hope you enjoyed the music!
Type
<return>
Type
<return>
Type
If you didn't hear anything, select 'QuickTime Music' for the output in 'OMS
input-output', then 'Modify -se.startup' in the 'File' menu. If Opcode OMS is
not installed, or you don't know what OMS stands for, read the documentation...
Type
<return>
Type
<return>
Type
The documentation is in the 'bol-processor-xxx-doc' folder, and examples in
'bol-processor-xxx-data'. ('xxx' is the version number) You must download
these folders to use BP2.
Type
<return>
Type
<return>
Type
<return>
Type
BP2 is now waiting for you to play 'C4' on the MIDI keyboard, or click the
mouse...
Wait
for C4 channel 1
Script
instructions can be created in three ways:
• typing
them directly into the "Script" windo
w;
• "pulling
down" an instruction from the "Script" men
u
and filling arguments between « quotes » with acceptable values.
(Use sticky menus in MacOS 8.0 to facilitate the selection)
• recording
actions in script form while they are being performed in BP2, a feature similar
to AppleScript. To set the script manager to recording mode, check the "RE
C"
button on top of the "Script" dialo
g.
Instructions
obtained by pulling down the "Script" men
u
are hilited below. The remaining instructions were recorded in the "REC" mode.
//
This is a script for Bol Processor BP2
Show
messages OFF
-- avoid useless display
Note
convention = English
Show
graphics ON
Play
{2,G4,E4,C4,- C5 - C5 {C5_-,A#4_ _}}
Show
messages ON
Activate
window Scrap
Type
Welcome to Bol Processor BP2...
Type
<return>
Type
<return>
Type
Hope you enjoyed the music!
Type
<return>
Type
<return>
Type
If you didn't hear anything, select 'QuickTime Music' for the output in 'OMS
input-output', then 'Modify -se.startup' in the 'File' menu. If Opcode OMS is
not installed, or you don't know what OMS stands for, read the documentation...
Type
<return>
Type
<return>
Type
The documentation is in the 'bol-processor-xxx-doc' folder, and examples in
'bol-processor-xxx-data'. ('xxx' is the version number) You must download
these folders to use BP2.
Type
<return>
Type
<return>
Type
<return>
Type
BP2 is now waiting for you to play 'C4' on the MIDI keyboard, or click the
mouse...
Wait
for
C4
channel 1
The
first line is a comment preceded by the double slash // familiar to C
programmers. The first instruction (second line) contains a remark preceded by
"--", as in AppleScript or HyperTalk. The next instruction tells BP2 that
simple
notes
shall be notated in the English convention. (See other conventions §1.11)
The
instruction "Play..." tells BP2 to play a musical item on the selected output.
Here the item is polyphonic and notated as a
polymetric
expression.
You will learn more about polymetric expressions in §4.2 of this
introduction, or §4.10 of the reference manual. In brief, the digit "2"
indicates that the expression's length is 2 beats, while other
fields
separated with commas denote the four "voices". We have a chord {G4, E4, C4}
sustained throughout the entire item, as well as a more complex melodic phrase
"- C5 - C5 {C5_-, A#4_ _}" which contains another polymetric expression.
Symbols '-' and '_' indicate
silences
and
note
prolongations
respectively. Thus, "C5_" could be worth a half-note and "C5" a quarter-note.
Other
instructions in this script are self-explanatory.