Bol Processor BP2 -- a 'QuickStart' 2. Sound-objects 3. Opening and compiling a grammar Title Page Index Contents

2. Sound-objects

2.1 Recording a sound-object

Restart BP2 or, at least, type cmd-n or select "New project" in the "File" menu in order to delete any previously loaded alphabet and grammar and reset all settings to default. Type cmd-h or select "Alphabet" in the "Windows" menu. So far we have not used any alphabet because the first experiment was on simple notes using a predefined alphabet, i.e. C, D, E... and octave numbers in English convention. Let us now create a very simple alphabet of sound-objects. Clear the window and type:

a b c

(You may save it as "-ho.MyAlphabet" if it is too much work!) Now type cmd-e ('edit') or select "Edit prototypes" in the "Windows" menu. This takes you to the sound-object prototype editor. BP2 asks you whether you want load an existing file. Answer 'No'.

The main dialog in the sound-object prototype editor is shown Fig.2. (Here you'll be in trouble if your screen is smaller than 640 x 480!)



Fig.2 The sound-object prototype editor (main dialog)



Left and right arrows or the "Go to..." button are used to display other sound-object prototypes.

We will now create a sound-object prototype named 'a'. Click "Edit/record MIDI prototype". A new dialog appears. Click "Record". Ticks are played to the MIDI output at metronome speed mm = 60. Play a short phrase on the MIDI keyboard and click the mouse. The sound-object prototype appears on the graphic.


Fig.3 A sound-object prototype has been recorded




Vertical lines in the rectangle indicate MIDI events. If the pitch bender was moved or volume and channel pressure were changed many lines will be visible.

A red vertical line indicates the insertion point. It shows a location that has been clicked on the graphic. This insertion point may be adjusted precisely using left/right or up/down arrows with the command key down.

To hear the prototype from the insertion point click "Play" in the same dialog, or press the command key and space bar together. The "Play" button plays the entire prototype only if no insertion point is visible.

Since trailing silences in the beginning and at the end of a sound-object prototype cannot be recorded, you may want to insert or append them afterwards. "Append silence" prolongates the prototype with a silence. This is sometimes more convenient than using ordinary silences (notated"-") because, for instance, this prolonged part may be "protected" if property "Never cover end" has been set. If the object is a bell sound, the silence could for instance allow its resonance to be heard fully. In other words, a sound-object may not terminate on the last MIDI message whenever the sound "goes on", or it is to be followed by a certain amount of silence. Similarly, you may want a silence to precede the sound-object, perhaps to enhance its impact. Click "Insert silence". (Note that if an insertion point is marked insertion will be attempted at the specified point.)

All buttons in the sound-object prototype editor are documented on-line: type cmd-? and click a button to get related information. Don't hesitate to play around with these editing procedures. Also try to modify ticks (saved along with the "-mi.<name> " file) and the value of 'tref' which determines the reference tempo of a sound-object prototype.

Click "Duration/pivot/location" to modify properties of the sound-object prototype. Change the pivot location and watch the effect on the graphic display. The pivot is used for placing the object on time streaks, e.g. metronome beats. If you inserted a silence in the beginning of the sound-object it may be a good idea to locate its pivot on the first NoteOn. If you are using plucked or drum sounds on a MIDI sampler you may enter precise locations forcing pivots to coincide with the climax of each object rather than the beginning of the sample.

Users of old versions of BP2 will notice that sound-object properties have been refined: properties such as "OK Rescale", "Expand at will", etc., are still there with the same meanings. But now it is possible to define a range of acceptable dilation ratios. As to location, rather than stating that the sound-object is relocatable or unrelocatable, it is possible to define its maximum acceptable shifts either in relative (a percentage of its duration) or absolute value (milliseconds).

If BP2 is controlling a synthesiser it is generally convenient to define sound-objects with property "OK Rescale": MIDI messages contained in the prototype will be spaced according to the metronome value and the symbolic duration of the corresponding sound-object (see §4.2). On the other hand, if BP2 is connected to a MIDI sampler then this rescaling might better be disabled. Since the rich musician's environment often comprises several synths and samplers on various MIDI channels, it is convenient to set these properties separately for each sound-object prototype.

In the same context (several MIDI devices) it is also necessary to declare the MIDI channel of each sound-object prototype: click "Channel/Instrument" in the main dialog (see Fig.2). Changing the channel is self-explanatory.

2.2 Putting together sound-objects

Record three prototypes: 'a', 'b', 'c', and save the prototype file as "-mi.MyFile". Now go back to the main dialog (see Fig.2). The "Play object alone" button is similar to the one you have already used, except that it allows you to try dilation ratios -- a good way of determining acceptable ranges.

Type "abcbaa" in replacement of "[Any expression]" and click "Play expression:". You hear the musical item notated "abcbaa". The corresponding graphic score is displayed on the "Graphic" window if "Show graphic" is checked on the "Settings" dialog (accessed by typing cmd-option space). If you modify pivot positions for 'a' you will quickly figure out pivots. Changing the metronome value will also demonstrate dilation and contraction within the limits that have been specified.

Make prototype 'a' longer than one second and play the expression with mm = 60. The end of 'a' will overlap the beginning of the first occurrence of 'b'. Then set property "Never cover beginning" for 'b' and play the same expression. You will notice that 'b' has been delayed by just the right quantity to prevent overlapping, as shown in Fig.4. This has been achieved by the time setting algorithm.



Fig.4 An example of score for "abcbaa" in which the two
occurrences of 'b' have been displaced to avoid being
overlapped by preceding objects




Now, declare that 'b' should not be relocated. (Click "Duration/pivot/location" to display this property.) Did you notice that the pivot of 'b' has become a complete arrow? Click again "Play expression". The time setting algorithm will try to "break the tempo" on 'a', thereby meaning that the metronome stops counting until 'a' is over. (This is called organum in Western music.) Note the delay on time streaks (the blue vertical lines) on Fig.5.



Fig.5 An organum (break tempo) on the same item:
time streaks 1 to 7 have been delayed.




If you further declare that 'a' should never break tempo, the solution will be that the first 'a' is shifted to the left (forwarded)... Try more! In the end, if 'a' is also not relocatable, no solution will be found: BP2 will take your permission to ignore constraints and produce a score identical to the initial one.

You may refer to §5 of the reference manual for details about the time setting of sound-objects which was demonstrated here. An example is provided with "-da.checkTimeSet". (Load the file to the "Data" window. This will also load settings "-se.checkTimeSet" which force the time setting process to be displayed.) Display options may be changed by typing cmd-option space or selecting "Settings" in the "Windows" menu.

2.3 Other ways of creating sound-object prototypes

2.3.1 Importing a MIDI file

This process is self-explanatory: click the button "Import MIDI file" on the dialog shown Fig.2 to import the content of a file to the MIDI stream of a sound-object. If you are using Csound the next comprehensive step would be to click "Convert to Csound" (see §17.8).

Although BP2 recognises type 0, 1 and 2 MIDI file formats, it expects the file to contain a single musical item. Consequently, it will display a warning message if requested to import from a type-2 file containing more than 2 tracks.

2.3.2 Capturing from text

Any " BP2 score", i.e. a string of symbols that BP2 is able to interpret as a musical item, may be captured as a MIDI stream and then pasted to a sound-object prototype. Examples are shown in the data file "-da.makePrototypes".

Select the text score and choose "Capture selection as..." in the "Action" menu, or click the button with the same label on the Control panel. If the MIDI output is active the item is played while it is being captured.

The captured content may then be pasted to a sound-object prototype. If the selection point (the vertical red line) is active, several options are offered:

2.3.3 Capturing from a tick cycle

A tick cycle programmed in the "Time base" dialog (see §4.3) may be captured as a MIDI stream. Click button "Capture" in the "Time base" dialog (see Fig.18) and paste the result as indicated §2.3.1.

Note that a new sound-object prototype captured from a tick cycle is automatically declared periodical (see §2.5).

2.4 Sound-objects, simple notes, homomorphisms

Simple notes are predefined sound-objects containing only a NoteOn/NoteOff pair of messages in the MIDI environment. BP2 allows the combined use of simple notes and sound-objects in the same project.

If the Csound output is active, simple notes are converted to Csound events using the current instrument specifications and default channel-to-instrument mappings (see §17.3).

The labels of simple notes and sound-objects are terminal symbols of the grammar. Whereas the labels of simple notes are predefined, the names of sound-objects must be declared in the "Alphabet" window (which is saved as a "-ho.<filename> " file).

The alphabet may also be used to define mappings of terminal symbols -- both sound-objects and simple notes. Project "-gr.tryhomomorphism" is a simple grammar illustrating the use of a such a mapping -- more precisely, a homomorphism.

The grammar reads:

S --> a b c (=X) * (:X)
X --> do4 c mi4 fa4

The use of brackets (= )(: ) and the asterisk will be explained in a minute. Let us first look at the "-ho.tryhomomorphism" alphabet:

-mi.abc
*
a --> b
do4 --> re4
c --> fa4 --> d
sync a' b' c' d' e e' f f' g g' h h' i i' j j' k k' l l' m m' n n' o o' p p' q q' r r' s s' t t' u u' v v' w w' x x' y y' z z'

Sound-objects are named 'a', 'b', 'c', 'd', 'sync', etc. Their detailed specifications are found in the file "-mi.abc". The asterisk is not a terminal symbol. BP2 recognises it as the label of an homomorphism. It does so because it finds arrows in the following list of terminal symbols. Thus, an expression like

a --> b

means that 'b' is the image of 'a' through the homomorphism notated '*'. We will see later how this mapping is used. Similarly, the alphabet indicates that 're4'(a simple note) is the image of 'do4', 'fa4'the image of 'c', and 'd' the image of 'fa4'. Sound-objects can be mapped to simple notes and conversely.

Every terminal symbol (sound-object or simple note) that is not explicitly mapped to another one is mapped to itself. Thus, the image of 'b' is 'b', etc.

Since this mapping is a homomorphism, strings of terminals are also mapped in a straightforward manner. Thus, "b re4" is the image of "a do4" since 'b' is the image of 'a' and 're4'the image of 'do4'. To complete the scene, the image of an empty string is an empty string.

Several homomorphisms may be defined on the same alphabet. Their descriptions should be separated with lines of hyphens, and the labels of homomorphisms should appear on top of each section. If a section contains at least an arrow, BP2 understands that the first line contains the label of a homomorphism, otherwise it will pick it up as a new terminal symbol.

Let us now see how this simple homomorphism is used.

When running the grammar (cmd-r) a single musical item is produced

a b c (= do4 c mi4 fa4) * (: re4 c mi4 d)

which is actually printed without brackets:

a b c do4 c mi4 fa4 re4 c mi4 d

The leftmost bracket (marked with '=') is a 'master' expression while the rightmost one (marked with ':') is its 'slave'. The slave bracket reproduces exactly the content of the master bracket it is attached to. Exactly? Not here: since the slave bracket is preceded by '*' its content is replaced with a mapping of the master bracket through homomorphism '*'.

You do not need to understand everything about homomorphisms to go on with BP2. (More information is available in the reference manual §4.1, and publications, notably Kippen & Bel 1992.) The idea came from the need of a general syntactic model coping with repetitions and pseudo-repetitions in music. The first homomorphism we ever used was a transformation known to North Indian tabla players: when repeating patterns they often change voiced sounds such as 'dha', 'ge' to their unvoiced counterparts 'ta', 'ke'... (See "-gr.dhin--" for instance.)

Projects "-gr.Ruwet" and "-gr.cloches1" are illustrations of homomorphisms used to modify tonal and modal patterns.

2.5 Cyclic sound-objects

Any sound-object may contain a periodical part starting at an arbitrary point of its time-span interval. Clicking the "Period (cyclic object)/strike mode" button on the dialog shown Fig.2 displays a dialog for declaring periodicity.

Cyclic sound-objects are handled in a particular way: if their dilation ratio in the performance (see §3.1) is larger than 2, they are repeated instead of being dilated. An example is given with "-da.preroll". The item

{C6 B5 A5 G5 A5 B5 C6, cycle1}

contains 'cycle1', a sound-object which has a periodical part in the last 60% of its time-span interval. The resulting time setting is shown Fig.6. The non-periodical part (40% of the duration) is first performed, then the periodical part is repeated 7 times in synchronisation with the sequence of simple notes.



Fig.6 A performance with a cyclic sound-object



Note that the pivot of 'cycle1'is set at the beginning of its periodical part to ensure its proper location.

There are two typical cases of periodicity, both handled by BP2:

In the latter case, property "Discard NoteOff's except in last period" should be activated. It prevents the sampler from setting off as soon as the first cycle has been completed. This property is generally completed with "Don't strike again NoteOn's" accessed in the same dialog and documented on-line.

Property "Force integer number of periods" adjusts the durations of sound-objects to make sure that the last repetition of the periodical part will be complete. It is only required in case the acceptable dilation ratio of the sound-object (see reference manual §3.1) is less than 2.

2.6 Pre-roll and post-roll

These words are familiar to folks working on sound or video editing. On a tape recorder in pause-recording mode, the pre-roll is the delay between the moment the pause button is released and the moment the recording actually starts. Similarly, the post-roll is the delay between the time the pause button is pushed and the one it actually stops recording. With automatic editing devices such as VideoDirector, these mechanical parameters may be entered in the program's settings so that the program compensates them and achieves accurate timings.

2.6.1 Pre-roll

In BP2, the pre-roll of a sound-object is the delay between its first event (Csound event or MIDI message) and the beginning of its time-span interval. The first event is the one that tells the sound processor to start , whereas the beginning of the time-span interval is the moment when the listener feels it actually started .

A positive pre-roll allows some events to fall before the on-setting time of the sound-object. This is useful when the sound-object contains an initialisation sequence that should not be accounted in its time-span interval.

Fig.7 shows a sound-object labelled 'un' with 482ms of fixed pre-roll.



Fig.7 A sound-object with positive pre-roll



On the graphic (right part of Fig.7), events are shown as short vertical lines. Four events are located outside to the left of the time-span interval.

2.6.3 Post-roll

In BP2, the post-roll is the delay between the last MIDI message of a sound-object and the end of its time-span interval.

A negative post-roll allows some events to fall beyond the off-setting time of a sound-object. This may be useful if the sound-object contains a final sequence of events that should not be part of its time-span interval.

A positive post-roll is the proper way of compensating a mechanical delay in setting-off the sound device. If for instance the event sequence in the sound-object ends with a NoteOff and the device takes 50ms to react, then setting the post-roll to 50ms will append a 50ms silence after the sound-object to allow the device to finish its job. This is generally combined with a positive pre-roll compensating on-setting delays.

2.6.4 An important formula


Bol Processor BP2 -- a 'QuickStart' 2. Sound-objects 3. Opening and compiling a grammar Title Page Index Contents