Dear colleagues,
Back to this discussion after almost a year!
(Apologies in my previous message on the discussion list.)
I did all tests as indicated below. Everything worked as announced with
a minor detail: since the console was pointing to the "bolprocessor"
folder, commands required one period less in the beginning, which means
"./bp32 --version" instead of "../bp32 --version".
I am impressed to see that all complicated processes are taken care of
in this early version. Even the unmusical AIFF files proved that time
setting is working perfectly. So, development (on my part) should focus
on how we envisage input/output commands taking care of the user's work
environment.
I am now planning to run the demo via a real on-line device. To this
effect I copied the "bolprocessor" folder to a website and installed a
"test.php" file. The link is:
https://leti.lt/bolprocessor/test.php
I am approaching this in a very naive manner, so I need your expertise.
In order to launch the application from PHP, we may use the exec() or
system() command as explained on
https://www.poftut.com/execute-shell-commands-php-exec-examples/. But
indeed this does not work since "bp32" is a MacOS executable file, not
Linux.
My naive question is: can it be compiled for Linux without rewriting
plenty of code lines?
Or should I install a MacOS virtual machine, for instance DARLING:
https://www.maketecheasier.com/run-mac-apps-on-linux/
If we think about long term (as I always did) it might be wise to opt
for a Linux compilation so that instances of bolprocessor can be
installed on many servers. However, to start experimenting we should go
for a solution with minimum development time invested.
Sorry for this beginner's approach to the problem! I am keen to learn…
Warm regards
Bernard Bel
Anthony Kozar mai...@an... [bp2-list] wrote on
27/07/2019 12:37:
> Hello all,
>
> As I mentioned a few weeks ago, I had been thinking about picking back
> up where I left off working on a future Bol Processor command-line tool.
> I have indeed begun working again on this next phase of Bol
> Processor's development and thought I'd take a few minutes to share
> where it is all headed.
>
> I've posted a Zip archive on my website with a copy of the in-progress
> version of this new command-line tool which I will call "BP console" for
> now. If you are curious (and brave!) you may download it and try it
> out! ^_^ Just download the file "bpconsole-2019-07-26.zip" from
>
> http://www.anthonykozar.net/files/BolProcessor/
>
> Whether you download the Zip file or not, here is a short description of
> what BP console can do so far. BP console can:
>
> 1. Read and compile BP2 grammar and alphabet files.
> 2. Read BP2 data files.
> 3. Read BP2 glossary files (but crashes when it tries to compile them!).
> 4. Produce items from a grammar.
> 5. Display produced items but the formatting includes a lot of "junk"
> (i.e. debugging info) that makes the output mostly useless.
> 6. Perform produced items with Csound score output.
> 7. Perform produced items with Midi output that is sent to a dummy Midi
> driver that does nothing other than report the number of Midi events.
> 8. Print out version information and exit.
> 9. Print out command-line usage/help info and exit.
>
> So, much of BP2's "core" functionality is already working to a limited
> degree. BP console is *almost* useful enough for composing Csound
> scores with only a single instrument using the default setup. (The ZIP
> archive includes three .sco files in the "ctests" folder that I created
> with BP console and then rendered with Csound into AIFF audio files).
>
> In addition to options for choosing the kind of output, there are
> options to set the note convention to English, French, Indian, or Midi
> key numbers.
>
> If you've downloaded the ZIP archive, the rest of this email provides
> some information on how to use BP console.
>
> When you expand the archive, you should get a folder named
> "bolprocessor". This folder contains most of the files from my BP
> console development folder including source code, Xcode projects, etc.
> You will probably want to focus on the two terminal applications, "bp32"
> and "bp64", and some test files in the "ctests" folder.
>
> Assuming that you are using macOS: to start, open Terminal.app (in
> /Applications/Utilities) and change the working directory to the
> "bolprocessor" folder. E.g. If you expanded the ZIP and "bolprocessor"
> is in your Downloads folder, then type
>
> cd ~/Downloads/bolprocessor
>
> The file "bp32" is a 32-bit version of the BP console app and "bp64" is
> a 64-bit version. Otherwise, they are the same and (hopefully) behave
> the same. Try running BP console without any arguments:
>
> ../bp32
>
> This will print out the usage/help information along with the message
> "Not enough arguments..." at the end. To just print version info, type
>
> ../bp32 --version
>
> Note that many of the "actions" and options listed in the help
> information do not work yet or work differently than listed! This is
> currently more of a "vision statement" for how BP console might work in
> the future. The only action that is currently implemented is "produce"
> and specifying it on the command-line is optional right now because BP
> console will automatically try to "produce items". Also the options for
> setting the note convention are undocumented. They are --english,
> --french, --indian, and --keys.
>
> Switch to the "ctests" directory to try some examples:
>
> cd ctests
>
> .../bp32 -da.acceleration
>
> You should get some output along the lines of
>
> Bol Processor console app
> Version 2.9.8 (Jul 26 2019)
> This is a beta version for evaluation...
> Reading data file -da.acceleration...
> BP2 Console completed initialization.
> seed 1 = 1564218165
> seed 2 = 11365
> TextInsert(Trace):
> Compiling alphabet?
> Looking for time patterns?
> Producing item(s)?
> Computing item?
> TextInsert(Data): S
> Ignoring DoKey(0xD)
> New project memory use: 55123 [leaked: 0]
> This session used 64 Kbytes maximum. 80 handles created and released.
> [0 bytes leaked]
>
> Note the line "Reading data file -da.acceleration...". BP console has
> loaded that data file. Unfortunately, it doesn't know how to use its
> contents and proceeds to try to produce items from an empty grammar. It
> starts with the default start string "S" and can't replace it, so it
> just outputs the symbol: "TextInsert(Data): S" indicates that BP
> console tried to insert the text "S" into the data window (which doesn't
> really exist). One of my next tasks will be to redirect this output in
> a more useful fashion.
>
> To see BP console output the results of producing items with a non-empty
> grammar try:
>
> .../bp32 -gr.NotReich
>
> You will get lots of output lines such as
>
> TextInsert(Data): _chan(
> TextInsert(Data): 1
> TextInsert(Data): )
> TextInsert(Data):
> TextInsert(Data): _vel(
> TextInsert(Data): 110
> TextInsert(Data): )
> TextInsert(Data):
> ....
> TextInsert(Data): {
> TextInsert(Data): 1
> TextInsert(Data): ,
> TextInsert(Data): C4
> TextInsert(Data):
> TextInsert(Data): -
> TextInsert(Data): ,
> TextInsert(Data): _vel(
> TextInsert(Data): 40
> TextInsert(Data): )
> TextInsert(Data):
> TextInsert(Data): -
> TextInsert(Data):
> TextInsert(Data): F3
> TextInsert(Data):
> TextInsert(Data): G3
> TextInsert(Data): ,
> TextInsert(Data): A#5
> TextInsert(Data): ,
> TextInsert(Data): -
> TextInsert(Data):
> TextInsert(Data): D5
> TextInsert(Data): }
> ....
>
> but from this you can see that it really is expanding the rules in
> -gr.NotReich and deriving a score in BP2 score format! Now try
> performing this score with the Csound output option:
>
> .../bp32 -gr.NotReich -d --csoundout
>
> (Note that the "-d" option is currently needed to suppress displaying
> the results of "produce items" otherwise BP console will not go onto
> interpreting the score and writing a Csound score).
>
> After all of the messages detailing what BP is doing, you will get many
> Csound score lines such as
>
> ; Csound score
> t 0.000 60.000
> i1 0.000 0.500 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
> i1 0.000 0.500 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
> i1 0.333 0.333 7.05 90.000 90.000 0.000 0.000 0.000 0.000 ; F3
> i1 0.333 0.333 7.05 90.000 90.000 0.000 0.000 0.000 0.000 ; F3
> i1 0.666 0.334 7.07 90.000 90.000 0.000 0.000 0.000 0.000 ; G3
> i1 0.666 0.334 7.07 90.000 90.000 0.000 0.000 0.000 0.000 ; G3
>
> Note that each note event ("i-statement") is duplicated in this output
> for now and that the Csound score events are interspersed with progress
> messages from BP console. All of the Csound output is being directed to
> the terminal "standard output" and the BP messages are sent to "standard
> error". So you can get a nice, clean copy of the output Csound score by
> redirecting std out to a file like this:
>
> .../bp32 -gr.NotReich -d --csoundout > out.sco
>
> Then open up the file "out.sco" in the ctests folder to see the music
> that you just made with BP console! ;-) There is only one thing missing
> from this file to make it a usable Csound score. Add this line near the
> top of the file (before any of the lines beginning with "i1"):
>
> f1 0 32768 10 1
>
> If you have Csound installed, you can now render this score using the
> sample Csound orchestra in the file "BP2test.orc":
>
> csound -s -A -o out.aiff BP2test.orc out.sco
>
> Then listen to the file "out.aiff" to hear Thierry Montaudon's piece
> "Not Reich" played with the very simple sine wave instrument specified
> in the Csound orchestra. (If you don't have Csound installed, you can
> listen to the included file "NotReich.aiff").
>
> You can also try out the Midi file and real-time Midi output options but
> you will probably be disappointed for now.
>
> .../bp32 -gr.NotReich -d --midiout
>
> .../bp32 -gr.NotReich -d --rtmidi
>
> Note that while the built-in help says that the --csoundout, --midiout,
> and --rtmidi options take a filename or Midi destination as an argument,
> they do not yet do so. (And the -o option is unimplemented).
>
> Let's try rendering one more grammar. Kumar S. Subramanian wrote a
> grammar that creates random compositions using the Indian note
> convention. You will get error messages from BP console unless you
> include the --indian option on the command-line:
>
> .../bp32 -gr.kss2 --indian
>
> Let's say you just want to see this output turned into a Csound score
> without writing the score to a file. But you don't want to see all of
> the BP console messages printed along with it in the terminal window. In
> this case, try redirecting standard error like this:
>
> .../bp32 -gr.kss2 --indian -d --csoundout 2> /dev/null
>
> Well, that's more than enough to give you some idea of what BP console
> will be like. If you have any questions or feedback, please reply here
> on the list or email me and Bernard.
>
> Thanks!
>
> Anthony Kozar
>
> __._,_.___
> ------------------------------------------------------------------------
> Posted by: Anthony Kozar <mai...@an...>
> ------------------------------------------------------------------------
|