I went on checking all examples of command-lines handled by the new
version of the console. The PHP interface was updated accordingly and
its new version uploaded to https://leti.lt/bolprocessor
Some comments :
../bp64 templates -gr.checktemplates --traceout trace.txt
In the PHP environment the "-traceout" option is automatically appended
to the command, so "trace.txt" does not need to be specified because the
interface is using the trace file created in the session.
The editor looks for a "TEMPLATES:" statement in the grammar. If it is
there, a button "CHECK TEMPLATES" is created.
It would take time explaning what these templates are used. They are
required for analysing items via a grammar instead of creating them.
This is the "modus tollens" process of the expert system in contrast
with "modus ponens" that produces musical items. It was explained in our
earlier publications on modelling tabla improvization. I will create a
simple tutorial to explain the method in the context of emulating the
BP1 version on Apple II…
> # the next two commands will generate some compilation errors
> ../bp64 compile symbols.bpgr
> ../bp64 compile symbols.bpgr --traceout trace.txt
In fact they don't, in the PHP interface environment, because the
grammar contains "-ho.:symbols.bpho" and the interface automatically
inserts the option calling the alphabet.
Again, I agree with Anthony that restoring the ability to auto-load
related files would be a good idea instead of expecting that the
interface will do the job. In both cases it is assumed that related
files are found in the same folder as their calling file. In case they
are not, the console could search for them higher in the tree structure.
../bp64 produce symbols.bpgr symbols.bpho -o out.txt --traceout
trace.txt --show-production
../bp64 produce symbols.bpgr symbols.bpho -o out.txt --traceout
trace.txt --trace-production
"-o out.txt" means that the output file must be set to "BP data file",
otherwise the console will complain that no sound-object prototypes file
is available for playing 'a', 'b', 'c' etc.
"show-production" and "trace-production" are not set by the PHP
interface. To activate these options we need a settings file. Thus, for
instance, we write "-se.:symbols.bpse" at the top of grammar
"symbols.bpgr". After saving it, a button EDIT ‘symbols.pbse’ appears at
the bottom of the grammar page. Cliking the button prompts a dialog
suggesting the creation of "symbols.pbse". The file is created with
default options based on a template stored in the "php" folder.
Once "symbols.pbse" has been created, options
"show-production" or/and "trace-production" can be activated, yielding
traces that will be visible in the Trace window. In fact,
"trace-production" also forces "show-production".
Evidently, "Step-by-step produce" does nothing else than
"trace-production". This option was meant to display steps of production
waiting for a key press after each step.
../bp64 produce produce-all.bpgr
../bp64 produce-all produce-all.bpgr
The PHP interface does not call "produce-all" because the "produce all
items" option is found in "produce-all.bpse" and the interface tells the
console to read "produce-all.bpse".
../bp64 produce produce-all.bpgr -d --midiout out.mid
The "--midiout" option is set by choosing a MIDI file for the output.
../bp64 produce produce-all.bpgr -d --midiout out-type-0.mid --seed 0
--midiformat 0
../bp64 produce produce-all.bpgr -d --midiout out-type-1.mid --seed 0
--midiformat 1
../bp64 produce produce-all.bpgr -d --midiout out-type-2.mid --seed 0
--midiformat 2
The format of the MIDI file is set by "produce-all.bpse".
The "seed for randomization" is also picked up in "produce-all.bpse".
../bp64 compile -gr.Nadaka --traceout Nadaka-errors.txt
Since "-gr.Nadaka" calls "-se.Nadaka" which contains the note
convention, no error will be found in the compilation or production.
../bp64 produce -gr.Nadaka -se.hamsad --midiout Nadaka.mid
"-se.hamsad" is not necessary on the interface because "-gr.Nadaka"
calls "-se.Nadaka" which provides the note convention.
"--midiout" is automatically set by choosing a MIDI file as the output
format.
Checking all these commands helped me to fix details in the interface.
For example, "produce-all.bpgr" would write "Fb" instead of "E". I
discovered that the Settings page was not correctly interpreting
modifications of the names of notes…
I also decided that the "extension format" — e.g. "produce-all.bpgr"
instead of "-gr.produce-all" — should be proposed as the default format
for Bol Processor files. Thus, for instance on Mac, the Finder can be
instructed that "bpgr" is an extension for Bol Processor, which later
will launch the new integrated interface.
Indeed both name formats are taken care of, including a mixed format:
"-gr.produce-all.bpgr".
Previously I had claimed that the "prefix" format had been inherited
from BP1 on the Apple II, but this is wrong as I can see on the
emulation… I probably had chosen it to facilitate alphabetic sorting
associated with file types instead of file names. But removing prefixes
has the advantage of bringing together files of different types
belonging to the same "project".
Bernard Bel
------
Anthony Kozar wrote on 19/08/2020 22:40:
> Bernard,
>
> I'm glad that things are working for you.
>
> I can still restore the ability to auto-load related files. The console
> program may not always know where to find them, but it can at least try
> a) the path given (if any) for the file that contains the reference, and
> b) the current directory.
>
> I've added these two items to the To Do List file:
>
> - identify input files with prefixes even when they are preceded by a path
>
> - restore the feature that looks for names of related files in the input
> files and auto-loads them
>
> Anthony
>
>
> On 8/19/20, 1:27 PM, Bernard Bel wrote:
>> Dear Anthony.
>>
>> I did a quick check and everything worked.
>>
>> It compiled. Then, after modifying the interface, I forced the console
>> to read the settings file and get the note convention. It also worked.
>>
>> I still need to check other options.
>>
>> It is now clear that instructions such as
>>
>> -or.Nadaka
>> -se.hamsad
>>
>> on top of the grammar are ignored by the console and must be read by the
>> interface to add the options to the command line. This is logocal
>> because the console cannot guess the full path.
>>
>> Compilations also worked and used note conventions found in the settings.
>>
>> This was a minimum test but I am uplaoding the revised PHP files.
>>
>> Bernard
>
>
> _______________________________________________
> bolprocessor-devel mailing list
> bol...@li...
> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel
|