Dear Anthony,
I notice that you created a vocabulary of "actions" such as 'produce',
'compile' etc. This is a very good idea. On the PHP interface I will
create a template containing syntactic rules for creating correct line
commands. Thus it will be eay to adapt the interface to modified/new
rules without fiddling with PHP code.
I am now half-way on the editor of sound-object prototypes. The editor
is already able to interpret a ‘-mi’ file, identify soud-objects,
display their properties and modify a few parameters. Displaying
parameters requires lengthy programming because they are all stored as
integer numbers and need to be handled with checkboxes, radiobuttons etc.
Graphic display will be missing but I started thinking about a HTML
display that might be as informative as the old display (see attached
picture of the old display).
On the interface we had buttons ‘Play object alone’ and ‘Play
expression’. We'll keep them. To this effect we need a ‘play’ command.
In BP2.9.8 all ‘play’ actions were handled by PlaySelection(). You can
use this procedure, replacing the selection with the content of a data
file. Basically the call would be:
./bp play somepath/somedatafile
However, to play the content of a data file, the machine needs an
alphabet and optionaly a sound-object prototype file. So, unless these
are identified on top of the datafile (which we agreed is not a good
idea) the command would be:
./bp play somepath/somedatafile somepath/somealphabetfile
somepath/somesoundobjectprototypefile
There is more than that: PlaySelection() will analyze the selection and
possibly find variables. If variables are found, it requires a grammar
to derive them. In fact, it takes the selection (or the input) as a
start string and runs the "produce" command. So we may have a more
detailed command such as:
./bp play somepath/somedatafile somepath/somegrammarfile
somepath/somealphabetfile somepath/somesounsobjectprototypefile
Plus perhaps options to play in real midi or create a MIDI or Csound file…
You can decide that the ‘play’ command always takes data as a
startstring and sends it to the grammar for computation. If there is no
grammar or no variable in the string, then computation will return the
startstring. So you don't need to bother whether the string contains
variables or not.
I am certainly anticipating your agenda but it is safe to include these
expressions in syntax rules.
Bernard
|