Dear all,
I worked several days on optimizing code in BP3 console. More precisely,
understanding (and solving) crashes on large structures… The outcome is
a much more stable version which so far hasn't crashed on the largest
pieces imported from MusicXML.
Back in the 1990s, I was doing the same on BP2, trying to solve crashes
on complex structures produced by grammars, notably designs by composer
Harm Visser who enjoyed experiments with recursive rules! In those days,
physical limitations such as memory space and computation time were the
major limitations. To solve this, I developed data compression in
polymetric structures, then time quantization. Both have been major
achievements because they resulted in structures making sense to humans,
unlike compression algorithms used for text, sound or images.
At present, BP3 is dealing with much larger structures, for instance the
full performance of Beethoven's Fugue in B-flat major played by 4
instruments. (Listen to it on
https://bolprocessor.org/importing-musicxml/) First of all, the
construction of its phase diagram requires the handling of integers
larger than the largest "unsigned long"… These have been replaced with
"double" floating-point numbers which the machine is likely to
approximate at unpredictable points. The result is the production of
incorrect numbers when rounding down to the actual line/column indices
of the phase diagram. An error of a single unit can be fatal, which is
illustrative of the time accuracy BP3 is trying to achieve — most often
10 milliseconds.
Errors are likely to produce crashes when screening the phase diagram
does not yield the expected result. These were the issues I was facing.
I did a thorough check of all steps in time-setting algorithms which
turned out successful.
Limitations are still "physical" but the amount of RAM seems to be much
larger than required for this (optimized) processing of data and
grammars. Computation time is sometimes a problem: creating the MIDI
file or Csound score for Beethoven's Fugue takes 349 seconds on my
mid-2012 PowerBook using the standard "PLAY" procedure. However, this
time is reduced to 38 seconds if the "PLAY safe" procedure is invoked,
chunking the piece to 41 slices. Both produce the same sound output, but
the latter does not produce pictures. A couple of "tied notes" are
missed — which means they are played twice instead of being merged — but
my guess so far is that these are errors in the MusicXML code.
This morning I also worked on the optimization of CANVAS pictures used
for pianoroll and sound-object graphics, hiding parts that would be
plotted beyond a limit and render the image invisible on (at least)
Firefox and Chrome. Surprisingly, images must be cropped to 32767 pixels
but you can plot right/down to 65535!
I am now waiting for an installation of MacOS Catalina on a new startup
disk that will allow me to try the LIANJA platform
(https://www.lianja.com/) to create standalone applications using the
PHP/Javascript code of the beta version of BP3. If this works, it will
pave the way to a large distribution of BP3.
Bernard Bel
|