Yes, these features are on the "to do" list. You can see most of what I
have planned from the command "bp --help". I have been planning for the
'play' command to work on data files though. E.g.
bp play -da.someitems [output options]
would play the first item in the file -da.someitems.
bp play-item 5 -da.someitems [output options]
would play the fifth item.
bp play-all -da.someitems [output options]
would play all items, of course. I've also been considering the idea of
being able to read data items from standard input so that BP console
could be used to process data piped from another command:
./my-script | bp play --read-stdin -e --csoundout - | csound -i ...
(I haven't decided on any particular syntax yet).
If grammar derivation is needed, then the -s, --start, or -S options
will allow one to specify a start string, either on the command line or
in a file.
bp produce -gr.mygrammar -s "X Y X" [output options]
bp produce -gr.mygrammar -S startstr.txt [output options]
Will this command line syntax work for you? I'm open to suggestions for
changes. One issue I see with the above is that an interface to BP
console would need to know whether the selection to be played contains
variables or not. We could probably solve that by providing options to
the "play" command like "--use-grammar" and "--no-grammar" (or
"--derive" and "--no-derive"?) Either way, shorter options like -G and
-g might be nice too.
I'm sorry that I haven't been able to make any significant progress in
the past week. There have been a few too many other things popping up.
I hope this week will be better.
Anthony
On 7/27/20, 10:05 AM, Bernard Bel wrote:
> 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.
> 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
|