Buffer size

Normally BP2 takes care of the size of the work string (the item being computed) and expands its work space when necessary. You may want to control it, notably when using a length-increasing grammar. Dialog "Buffer size" (see Fig.23) displays the current buffer size and the default one assigned when computation starts. Suppose that you do not want to produce a string longer than 750 symbols. Type "750" in the upper field and any equal or smaller value in the default field, then select "use". Now BP2 computes items until the length of the work string reaches 750 symbols, then it prompts you to decide whether you want to stop or continue (expanding the current work space).

In the "-gr.Mozart" project (see §5.4 infra), default buffer size is set to 500 symbols but all items need more space. Therefore, BP2 is forced to expand its space for the work string the first time it produces an item. It does so without asking any permission because the "Don't stop" option is on. The new value is stored into dialog "Buffer size". (Buffer expansion is done stepwise: size is recurrently multiplied by 3/2.)

Setting a very high default value reduces the memory available for other operations. Setting a too small one reduces speed during the first computation, as BP2 needs to resize the work string buffer more often.

A typical application of buffer size limitation is project "-gr.cloches1", an extension of project "-gr.bells" described in §4.12 of the reference manual. Here, computation will not stop unless the buffer size limit is reached, or the mouse is clicked.

Incidentally, project "-gr.cloches1" uses a homomorphism labelled "TR" (see the alphabet window) similar to a transposition, although more complex. This may give you ideas for homomorphisms generating tonal transformations in a more complex way than the "_transpose()" performance control. (Keep in mind that the same note may be played by different sound-objects.)