Dear Anthony,
I also found out that we get an error message with an empty Trace file
when there is a mistake in the command, which is not the case here. I
got a mistake trying to run a grammar whose name contains a space… This
is now fixed by putting spaced names or paths between quotes.
I also completed the reformat_grammar() procedure after checking all
reserved words on BP2.9.8, many of which I had forgotten as they date
back to modelling drum improvisation!
The files I modified are attached. They are also in
https://leti.lt/bolprocessor/
Indeed the crash log tells something but I am unable to make sense of
it! It might be difficult to trace the process on such a complicated
grammar. I use it only because it contains a great diversity of
instructions. So the error may just be stored on the to-do list.
Scripts will be useful once we have real-time MIDI in/out, but we'll
need to ignore the ones having effects on the interface, such as loading
a file, changing work folder, sounding a beep, waiting for the space key
to be pressed etc. I will prepare a list of the ones that should be
ignored. Many of them were reproducing menu commands, as a script could
be constructed in the "learning mode": every action on the interface was
recorded as a script command. But this all has to do with real-time
operations. Probably a few script commands will be used by the PHP
interface, e.g. load a file, produce x items etc. and executed via
command lines.
At some point we may need to find a method for waiting for a mouseclick
or any human action triggering the performance of an item that has been
prepared.
Once interface-connected script commands have been neutralized, the
relevant script operations should work flawlessly. There is nothing
complicated in the process. "BP2 script" is a header on top of a script
or glossary file. It does nothing in particular.
When I was developing the core program in Delhi, BP2 was connected to my
D50 synth. Every evening (once my colleagues had left the office) I used
to run "+sc.checkall" designed for trying all features. This took about
30 minutes. I was listening while doing other things, then checking
errors on the Trace. By ear I would immediately identify odd behaviour. ;-)
I am now tempted to work on the import of MIDI files into sound object
prototypes, and converting MIDI sequences to Csound. Looking at the C
code should make it easy.
Bernard
Anthony Kozar wrote on 23/07/2020 22:19:
> I have reproduced the problem here. When I attempt to create a Csound
> score on the command line, BP console gets as far as time setting the
> last sequence (?) and then crashes:
>
> 3566 objects. Compression rate = 51 Sequence 11/11
> Sizing objects
> Setting limits
> Placing objects
> Solving constraints
> Calculating global drift
> Calculating legato/staccato
> Segmentation fault: 11
>
> When you don't get any output running a command from the PHP interface
> it may help to run it directly on the command line.
>
> The crash log shows that this occurred in MakeSound() and the
> exception that caused the crash was
>
> Exception Type: EXC_BAD_ACCESS (SIGSEGV)
> Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
>
> I'm guessing that that is an attempt to access a null pointer. I'm
> guessing that it is related to the use of script commands but I'll
> have to trace the problem in the debugger to be sure.
>
> Interestingly, the segmentation fault does not occur if you run this
> grammar with --rtmidi instead of --csoundout. Then the output
> continues after time setting:
>
> 3566 objects. Compression rate = 51 Sequence 11/11
> Sizing objects
> Setting limits
> Placing objects
> Solving constraints
> Calculating global drift
> Calculating legato/staccato
> Ignoring script command: MIDI controller #98 = 1 channel 1
> (Scripts do not work yet in the console version).
> Ignoring script command: MIDI program 63
> (Scripts do not work yet in the console version).
> Ignoring script command: Beep
> (Scripts do not work yet in the console version).
> Ignoring script command: Wait for space
> (Scripts do not work yet in the console version).
> Ignoring script command: Tick cycle OFF
> (Scripts do not work yet in the console version).
>
> The fact that the very next message after where it seg faults for
> --csoundout is "Ignoring script command: MIDI controller #98" is
> evidence that my hunch is correct.
>
> Nothing related to script commands currently works in BP console. And
> the only other crash I have experienced with it so far had to do with
> loading a glossary file that I think began with "BP2 SCRIPT". IIRC, I
> took some shortcuts to get the console version to compile in 2013 and
> I did not really finish substituting appropriate code everywhere for
> the non-functional script commands.
>
> I will add fixing these crashes to my to do list. Making script
> commands work in the console version is a large task though and I was
> not sure how important it is to do. Certainly some of the script
> commands are no longer relevant (e.g. Freeze windows). And I have the
> impression (which may not be correct) that many of the others
> duplicate functionality that can be achieved in other ways(??).
>
> I'd like to hear what you think.
>
> Anthony
>
>
> On 7/22/20, 11:14 AM, Bernard Bel wrote:
>> Dear Anthony,
>>
>> When I compile grammar “-gr.ShapesInRhythm” in the PHP interface, it
>> says "no error".
>>
>> When producing a "BP data file" I get the (presumably correct) data on
>> the Data window.
>>
>> However, attempting to produce a Csoud file ends up in an error.
>> However, no messages have been produced and the Trace window remained
>> empty.
>>
>> Note that this grammar does produce Csound (and MIDI) files on BP2.9.8
>> although it asks the user to press the space key before doing it. This
>> is due to instruction "_script(Wait for space)" which should be ignored
>> in the context of creating a file.
>>
>> I guess that BP is not able to create Csound events reproducing
>> performance parameters such as "_script(MIDI controller #98 = 1 channel
>> 1)", but at least when it fails it should send a message to Trace.
>>
>> Maybe this will be solved by loading “-se.ShapesInRhythm.QTM” ?
>>
>> Bernard
>
>
> _______________________________________________
> bolprocessor-devel mailing list
> bol...@li...
> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel
|