Dear Anthony,
We will need a "play" command reproducing the behaviour of "Play
selection" on BP2.9.8. The difference will be that instead of capturing
a selection from the Finder it will pick up the same from a "startup" file.
The startup expression will be a polymetric structure containing simple
notes, sound-objects and variables. The command may therefore require a
grammar to derive variables, an alphabet to identify sound-objects, and
a '-mi' file to instantiate these sound-objects. The code in the console
is already able to do all this…
When the "play" command is invoked from the sound-object protoype
editor, the expression will not contain variables. Only sound-objects
belonging to the '-mi' file one is working on. (In BP2.9.8, if the
selection contains variables, the machine asks you whether these should
be derived in the grammar or simply ignored. We take the second option
by default if a gramar is absent.)
Since the prototype page does not remember the alphabet file in which
these sound-objects were listed, the "objects.php" page creates a
simplified alphabet file with the names of all sound-objects and the
name of the '-mi' file at its top.
The "play" command only needs to interpret the expression as a correct
polymetric structure containing these terminal symbols — plus "simple
notes" if one wishes so. The "-ho.alphabet" file would be for instance:
-mi.abc1
*
a'
a
b'
b
c'
c
chik
cycle1
cycle2
d
f
sync
On the "prototype.php" page, clicking button "PLAY THIS EXPRESSION" will
pick up the expression to be played — by default, the name of the
sound-object on which one is working — and save a "startup.txt" file
containing that expression. Then it will call the server with the
following command:
path_to_bp/bp play --startup path_to_startup/startup.txt -ho
path_to_alphabet/-ho.alphabet.txt -d --midiout
Here is an example of the call in a real environment, using absolute paths:
/Applications/MAMP/htdocs/try/bolprocessor/bp play --startup
/Applications/MAMP/htdocs/try/bolprocessor/ctests/-mi.abc1_copy_d517edf03284d25719133dc14504f999_temp/startup.txt
-ho
/Applications/MAMP/htdocs/try/bolprocessor/ctests/-mi.abc1_copy_d517edf03284d25719133dc14504f999_temp/-ho.alphabet.txt
-d --midiout
Later we may need to play startup expressions containing variables
(among which "S"). In this case the command will be:
path_to_bp/bp play --startup path_to_startup/startup.txt -gr
path_to_grammar/grammarfile -ho path_to_alphabet/alphabetfile -d --midiout
Since the alphabet file contains the name of the '-mi' file, BP will
automatically load the relevant '-mi' file.
When time permits you may include a "--settings" option, although
normally settings are declared in the grammar file.
Bernard
|