Dr.Godfried-Willem RAES

Kursus Experimentele Muziek: Boekdeel 6

Hogeschool Gent : Departement Muziek & Drama

<Terug naar inhoudstafel kursus>



PIP - Klank & Lichtorgel


PIP is een softwarepakket, geschreven binnen de algoritmische muziektaal RAVEL (mos), waarmee muzikale stukken van een vizuele partij kunnen worden voorzien. Hiervoor wordt het (kleur)komputerscherm gebruikt.

De vizuele animatie verloopt in 'real time' en kan zowel van kleuren als van zelf te bepalen vormen en vormtransformaties in de tijd gebruik maken.

PIP werd door zijn auteur in het publiek domein geplaatst en mag dus vrij worden gekopieerd en benut, vandaar dat we het integraal ter beschikking kunnen stellen van de studenten..

Het programma werd geschreven tussen augustus 1990 en april 1991 door de Amerikaan Jim Binkley en loopt op alle MS-DOS machines. Gezien de aard van het programma is natuurlijk een goed kleurscherm aangewezen. Voor gebruik in publieke artistieke produkties kan een grootbeeld video-projektor worden ingezet. (Sony of Barco). Uiteraard is het ook mogelijk de gehele produktie als een video-tape produkt af te werken.

Het programma sluit vooral goed aan bij het onderwerp muxed-media, omdat het als geen ander aansluit bij de idee van een polyfoon gebruik van andere madia, in casu beeld. Het maakt het immers mogelijk muzikale parameters en eigenschappen in een kompositie te 'mappen' in bewegende of statische objekten op het scherm. Het programma gaat uit van een muzikale partituur in midi-sequencer formaat, maar hoeft niet noodzakelijk daartoe beperkt te blijven, aangezien het ook mogelijk in een programma op te zetten dat aan beeldanimatie doet in real-time, d.w.z. geschikt voor live-electronische en electroakoestische performances.


De engels-talige handleiding bij het programma volgt hierbij als dokumentatie.



1. General Information about PIP

Pip is a programmable color organ. The basic idea is that MIDI notes whether generated by Pip or accepted from MIDIinput cause graphical shapes or images to be moved or placed on the screen. Pip plays a note over MIDI and the note is mapped into a color and some sort of graphics object. The graphics object may be a "shape"; i.e., a circle, rectangle, line, dot, or "fat" dot or something more complex like a pcx paint clipping. Each note may cause a graphics object to move according to a preordained movement scheme. Pip can be thought of as a music sequencer that only plays music back, although it is possible to record notes with a step edit mechanism. Music is linked to screen graphics. Pip may be thought of as a presentation animation system. It may be said to be making simple animations or "moving" computer art.

1.1 Pip Startup2

Pip runs in two modes, edit or batch performance. The editor is started as follows:

Pip: With no arguments, Pip comes up in edit mode.

pip -p performance_file: Pip will execute all performances in the performance file and then exit. This is useful for batchfile performances. No editing is possible. See the performance commands in the Files menu for more information. A performance file is a binary file; i.e., not human editable.

pip pipfile: The file is assumed to be a Pip setup file and the setup is loaded. Editing may then proceed.

1.3 Pip Installation

Pip may be installed anywhere, although probably a \pip directory on a hard disk is the best idea. Pip has a help system that consists of one component in addition to "pip.exe":

pip.hlp - This is an ASCII text file that contains all pip documentation. It should be placed so that it may be found in the PATH specified by the PATH environment variable. It could also be placed in the \pip directory. Help will use memory when fired up. On the very first time it is invoked, it will take awhile to set up memory to disk mappings. After that, it is pretty fast.

1.6 General Introduction

Pip is a programmable color organ. The idea is that music is mapped to a set of moving (or static) graphics objects. There are 8 MIDI tracks which are sets of MIDI events that can be run in parallel. Each set of MIDI events is called an "action". Elsewhere this is typically called a pattern. An action is basically a set of MIDI events, such as notes, rests, ties, pitch bends, represented somewhat higher level than the usual low-level MIDI event list of noteon and noteoff events. Actions are kept in a library of fifty actions. This is basically a catalog of the actions, with the names of the actions listed. In the track menu, actions are selected from the catalog, and assigned to tracks. When an action is played, it is played according to the per track generator. The generator affects how an action is sequenced. It can be linear; i.e.,sequential. Linear generators always loop. There are other forms of generators based on various random number techniques; e.g., pure random or stochastic. Generators are functions that are applied to actions to make variations. Generators are assigned in the MIDI tracks menu.

Each track has a notemap, found in the graphics menu. If a track is on, notes played at runtime are sent to the associated notemap and a color and graphic's object are activated. Each note in a notemap is assigned one of 16 EGA colors from the current palette and a graphics object. The graphics object has an associated movement type; e.g., linear; i.e., it moves in a straight line.

Objects are independent from the color map. Objects fall into two basic categories, "shape", and "images". Objects are named. There is a base set of shape object types; circle, point, rectangle, etc., each of which has a default name. New objects that are independent from the original default objects can be created. New base types can not be created. An object has a name, type, and movement setup. Movement setup has a number of base movement types, linear, circular, etc., including variations on fractal display. It should be noted that more than one note can map to the same object and that object can be assigned different colors since the colors are assigned to the note, not the object. There are 128 objects maximum permitted in the Pip system.

Images are the second kind of object. The true power of Pip probably comes from Images. Images are any valid EGA pcx format clipping or full screen background image. Images must be named, and have movement types assigned. E.g., a background image would be "fixed", but a clipping must be given a linear movement type. Images may be loaded directly from disk when they are to be displayed or they may have memory preallocated when the image is created. Given limited pc memory, loading from disk (especially a ram disk) is the way to go. Images may be created with various paint programs, scanners, digitizers, etc. Movement types include such forms as random, linear, circular, spiral, iterated function system and a few others.

There is a color setup menu with options for changing and viewing the EGA palette. In summary, we might look at Pip as somewhat similar to "old-fashioned" analog synthesizers; i.e., it consists of a set of modular components that can be patched together in various ways; e.g.,


The generator selects an action on a particular track, and that action is then mapped into a color and an object. The object has it's own movement attributes and those attributes cause the object to be displayed at a certain position.

Menus, Views, and Forms

Pip has a number of pulldown menus activated from Alt-keys. Some of the menus provide views on data structures. Menus will popup dialog boxes, select lists, or formfill menus that the user must edit. Views represent editable data structures that may be viewed as databases. Views are activated by a particular selection in the pulldown menus. The principal views are:

Files - Performance view - edit performances

Libs - Libview - edit action library

Actions - Actionview - edit action selected in Lib view

Midi - Trackview - edit MIDI tracks

Graphics - Noteview - edit per track color map

The five main views represent the major Pip screens. Views are similar in operation. In general you must activate the associated view before certain additional view modifying menu selections will work; e.g., in the Graphics/Noteview menu, you cannot change the colors with the "Colorrange" menu selection until the Noteview is active. The pulldown menus show which menu items are active, and which are not.

Often in a view, each field is editable by simply hitting a carriage return (except for the action view, which has special editing semantics). This is true for the lib view, track view, presentation view and note view. In general, in a view, arrow keys move you around, and ENTER selects whatever can be done in that field of the view. Typically a popup list will appear or a fill-in box.

Once you are in a view, certain fields will either cause a simple menu to popup which will generally be a list to choose an item from, a button box from which you choose one button, or a fill-in field that might for example take a filename.

There is a more complex popup used called a "form". A form generally allows editing of conceptually related but diverse items; e.g., numbers and names. There will be a number of separate fields. When editing a form, note that ESC causes the form editing to be canceled and that F1 causes the form to be saved; i.e., the data was truly entered. In the case of a form, ENTER usually just moves the cursor to the next field in the form. Thus F1 is used in place of ENTER. Note that In the case of a simple popup list (i.e., not a form), ENTER will select one item.

Pulldown Menu Guide

Files - save/restore setup, performances,dos commands, quit

Action - general operations on currently selected action

(MIDI event list edit)

Libr - modify and change action library; select current action

Midi - enable/disable MIDI; edit MIDI tracks

Graphics - edit per track notemap; edit graphics objects

Play - run Pip; set tempo and other play parameters

Colors - edit and view EGA palette

Help - View help info about how PIP works


2. Key Guide for Overall Operation

Alt Keys for Menus or Global Functions:

Global keys (always work):

Alt^R - run key. Pip will run the current Pip setup.

Any key will end a run except for 'f', which will freeze the display. If you type in 'f', the next key typed will return to the Pip menu system. ALSO, a pcx dump of the screen will be produced and saved in the file "pip.pcx".

Alt^Q - quit key

Menu keys: - invoke dropdown menus.

F10 will bring up context sensitive help; i.e., information about the current menu situation. The help menu itself provides some fixed entry points to the documentation. Also there is a special help entry point for actions in the action view. It provides detailed information about action editing (MIDI event editing).

3. File Menu Help Information

File operations:

This menu contains some overall file access mechanisms and also contains the performance view. You can read and write individual Pip setups. A Pip setup is all the information needed to save and restore one Pip run, with music, and graphics objects. You can also setup some number of performances and run them one after the other. This can be looked upon as a gallery of Pip moving paintings. A performance can have an associated pcx (Z-soft paint) credits file that is displayed at the start of the performance. The other point is that a MIDI track and some number of MIDI events are in a performance setup for determining how long a performance will last. This is important, because this is the only way a non-infinite Pip piece can be run. Finally there are Dos and Quit commands for issuing Dos commands from within Pip and for exiting Pip.


This command asks for a filename. The entire Pip setup is saved in the file. The file is a binary file; i.e.,it cannot be viewed with a text editor. A Pip setup consists of any actions in the action library plus the graphics notemap setup plus the current palette plus the track setup and a few other odds and ends. It is not a performance. Note that individual parts such as actions, and action libraries may also be saved with other read/write commands in other menus. See the action menu and the performance menu for other kinds of files.


This command is paired with Writesetup. It is used to read in an external Pip setup. Note that any current setup is lost. Pip will stamp each setup file with a setup id and refuse to load files that it does not recognize as setup files.


For new versions of pip, this command will read the setup file for the previous version only. The write setup command should be used immediately to convert the setup file to the new setup file format. This command will only work for the previous preceding Pip version; e.g., if the current version is 1.2, it will work on 1.1, but not 1.0. This is true only when the setup file format changes from version to version. See the read.me file on the main disk to see if the setup file format changed.


This command will activate the performance view. This menu can be used to setup a gallery of Pip performances which will be activated one by one in a loop from top to bottom. As a result it is possible to put together a number of Pip pieces back to back. The pieces will execute until a carriage return or other keystroke is entered. The view shows 10 editable performances. Each performance shows the name of the Pip setup file + a control track + whether or not the performance is active (on/off). To edit a performance, the cursor should be moved with the arrow keys over the setup column, and a ENTER (carriage return) should be typed in. This will popup an individual performance edit form menu. The track and on/off fields can be edited either at the top level or in the performance edit menu.

A track number should be entered for the track field. The performance may be turned on or off.

The performance edit menu has fields as follows:

For each performance, the credits will be displayed first for the requested number of seconds and then the screen will be cleared and the Pip setup will be played. At the end of the piece the final screen will be shown for the amount of time specified in the final delay field. The events count is used to fix the time of the piece. The number of events is taken from one track which must be specified. This is the control track. It can be any track in use in the piece. The performance will not be executed if it is off. At least one performance must be on somewhere in the list of performances. One Pip/MIDI track must be selected as a control track. Some number of events will be executed and then the piece will terminate. Look at the individual action to see how many events there are in an action.


This selection will cause the list of performances to be executed. A single keystroke will terminate all performances. The key 'f' will freeze the current screen image, any keystroke after the 'f' key will terminate all performances and will also cause a screen dump in pcx format to a file "pip.pcx".



Performances are kept in a file separate from individual Pip setups. All of the performance information is written out. This is not the same as a Pip setup file.


A valid performance setup file is read in. Note that any current performance setup information is lost. All of the performances are read in.


Escape to dos and execute a dos shell command. Note that "command /c [command]" must be used to perform such built-in dos commands as "dir".


Quit the editor. Alt-Q may also be used to do this at any time. Be careful, setup information is not saved, unless you save it.

4. Action Menu Help Information

This menu is used for putting MIDI events into an "action", which is a MIDI event list.

The Action view command list is as follows:

Actions represent a list of MIDI events that are executed as time passes according to the current tempo. Each list of actions is sequenced according to the generator type as set in the MIDI tracks view. Generators include linear and random generators. A linear generator just plays the action from start to finish in a linear fashion, pausing for timed events like notes and rests. A random generator randomly chooses an action to execute from the list of actions. See the tracks help display for more information on generators. It is important to note that Pip loops with the linear generator by default unless you are in performance mode. The action view is displayed when Actionview is selected. This menu item selects the action view. An action may then be edited. Editing in this particular view is quite different from other views as it uses a form of context sensitive key editing to make action editing easy.

An action is a list of "actions"; i.e., MIDI events. The action itself is selected in the library view. It is selected by placing the cursor on the action to be edited. Actions are kept grouped together in an action library of some number of actions. The library contains a set of actions, which may be saved in a separate file. Each action in turn contains a set of MIDI events. An action is mapped to a track in the track view. There is only one library at a time in Pip and it may be displayed in a sub-menu in the track view for assignment of the selected one action to a track.


NOTE - saving an action:

An action undergoing e4diting (you are in the action view) is considered to be temporary (it isn't lost easily however), until you switch to another view; e.g., the library view. When a view switch occurs, the action is then automatically put into the library according to the currently selected library item. Therefore in order to "save" an action into the library you can just switch to the library or any other view (.e.g, the notemap).

When the action view is selected, other commands than the action view itself in the action menu are activated. These commands are disabled until the action view is selected as they only work in the action view itself.

The legal actions that may be entered into an action are taken from the RAVEL programming language. This is a high level C-like programming language that incorporates a set of events (in addition to programming constructs) that permit various MIDI events to be programmed. Actions in Pip are RAVEL compatible and it is possible to program in Ravel or certain other sequencers and then move the output into Pip (or even vice versa).

These actions are:


mnemonic: opcode: values... meaning

p,P patch value MIDI program change

c ccont time controller value MIDI continuous


b,B bend time value MIDI pitch bend

n,N note time velocity MIDI note

d noted time,duration velocity MIDI note with duration

r,R rest time silence on MIDI channel

t,T tie time time passes, MIDI noop

m,M metro value meter change in bpm

u,U uptempo value positive increment in bpm

D downtempo value negative increment in bpm

x,X dxparam v1,v2,v3,v4 dx7 param change

s,S sig value,value time sig, noop

k key keynote set edit key

C cat time pressure MIDI channel aftertouch

K Kat time note velocity MIDI keyboard aftertouch


The display has six fields. The first field is the index field and shows the event index which starts from 0 to the final event. If there are 5 events, they are numbered from 0 to 4. The index field is not editable. The remaining five fields are editable. The number of fields actually used depends on the action opcode in use. The second field contains the action opcode. It is set by typing in a mnemonic; e.g., "n" for note. The remaining fields vary in type according to the opcode. Their display depends on the opcode. In general the opcode should be set, and then the remaining fields should be changed.


Action KEY Editing:

The following keys work for action editing:

Action editing has the following general form:

Fields have edit types that depend on the action mnemonic. In general, enter the mnemonic first. For example, for notes:

index: note opcode: note constant: time constant: velocity constant makes up a note action.


To edit a note action, position the cursor on the opcode field and type in 'n'. Hit ENTER. Now you have a note action. Move the cursor left and type in 'HC'. Now you have the no6te constant (integers work too). This is C above middle C. Now move the cursor left again (cursor motion like this makes an automatic ENTER, so you don't have to always hit the ENTER key) and type in 'q' for a quarter note. This is a Ravel time constant. Now for the velocity, move the cursor again, and type in '100'. You now have one note. If you type in INSERT at this point you can duplicate that note and then change the values to suit yourself.


p,P patch value MIDI program change


The patch instruction takes one argument, a program changen from 0..127. E.g. "patch 100". When this event is executed, a MIDI program change is sent on the current MIDI channel. Channels are assigned in the track view.



c ccont time controller value continuous controller


This event sends a MIDI continuous controller message on the current

channel (assigned in the track view). E.g.,

ccont q 10 127



b,B bend time value MIDI pitch bend


The bend instruction implements MIDI pitch bend. It takes an event time and a value. The time specifies elapsed time between this instruction and the next. The true MIDI bend value is a 14 bit integer. The true bend value is computed by multiplying it by an internal variable known as the "poff" or pitch offset. E.g., if the poff is 64, and the bend value is 10, then the true value sent out MIDI will be poff * value = 640. The poff is set in the action setup window. MIDI pitch bend center is 8192. Using a poff of 64, it is scaled

to 128. The poff is set in the Setup command in the action menu. Note that if you set the poff to 1, the bend will default to what is commonly found elsewhere; i.e., center will be 8192.



n,N note time velocity MIDI note


The note instruction plays a note. The note must be a valid note constant (see below). The note is played for the specified time, which may be an integer or time constant (see below). The velocity is the MIDI velocity. Note that time here specifies elapsed time between this note and the next. It also automatically becomes the duration of the note. E.g.,

note C q 100

note D w 95



d noted time,duration velocity MIDI note with duration


noted is like a note only the duration of the note is specified separately. The time field governs elapsed time only; not the duration. This form of event is commonly called a "duration"; i.e., a note with duration. It can be used to form chords; e.g.,

noted C 0,q 100

note HC q 101

will be a chord of the octave.


r,R rest time silence on MIDI channel


A rest specifies silence for the given time in this track. Any notes or chords sounding will be turned off. Time is elapsed time between this event and the next. E.g., rest w


t,T tie time time passes, MIDI noop

A tie basically is a noop; i.e., nothing is done in this track for this amount of time. It can be used to extend notes since notes are not really turned off until the next note plays. E.g., tie w


m,M metro value meter change in bpm

This instruction changes the speed of the runtime clock. Values must be given in bpm units; i.e., integers with the range 48 to 255 beats per minute. E.g., metro 200


u,U uptempo value positive increment in bpm

This instruction changes the runtime clock in a relative fashion to make it faster. E.g., if the bpm was 100, and you execute uptempo 5, the bpm will be 105.


D downtempo value negative increment in bpm


This instruction changes the runtime clock in a relative fashion to make it slower.


x,X dxparam v1,v2,v3,v4 dx7 param change

This instruction is a special instruction for sending Yamaha dx7 MIDI sysex parameter change messages. Four parameters are accepted;

v1 - <parameter number>

v2 - <g index>

v3 - <h index>

v4 - <parameter value>

For example, the transpose parameter can be changed as follows:

dxparam 16 0 1 24

See Yamaha documentation for further information.


s,S sig value,value time sig, noop

The sig instruction does nothing but serves as documentation for the time signature. E.g.,

sig 4 4


k key note set edit key

The key instruction has no runtime effect, but does effect note entry during editing. The current key as set will effect the display of all notes ENTERED or REDISPLAYED after the key setting in the list of action instructions.

E.g., if the key is set as follows:

note E q 100

key Eb

note E q 100

the first E will be an E natural. The second E will be a Eb, if entered in consecutive order.

If you change a key, the values of the notes will not change. You can redisplay by paging up and then paging down. The key change will then affect the display. The point is you must redisplay any notes currently shown on the screen for the key change to affect those notes. Pip will not do this for you.


C cat time pressure MIDI channel aftertouch

This instruction specifies a MIDI channel aftertouch command. Time is elapsed time and time constants may be used. The pressure value is simply a MIDI integer 0..127.


K Kat time note velocity MIDI keyboard aftertouch

This instruction specifies a MIDI keyboard aftertouch command. Time is elapsed time and time constants may be used. Note is a note constant. Velocity is a MIDI integer 0..127.


Note constants:

Note constants may be entered wherever a note may be entered. Note constants are formed according to the following syntax:

[H or L] [C,D,E,F,G,A,B] [#/b/n]

Each 'H' or 'L' indicates an octave higher or lower than middle C. This is followed by a note name, C to B, and may optionally be followed by a '#' for sharp, 'b' for flat, or 'n' for natural.

E.g., C, C#, Eb, En, HC, LC, LLD#, B, etc.

LC is C below middle C.

HC is C above middle C.

Notes are constrained to the range 24..108; i.e., The LOWEST note is LLLC = 24.The HIGHEST note is HHHHC = 108. C has the integer value 60. Note constants work with the key instruction. Valid keys include only [C,G,D,A,E,F#,Db,Ab,Eb,Bb,F].

Time in Actions:

Times indicate elapsed time between events; e.g.,

note C q 100

note D q 100

states that a C should be played for 24 ticks and then a D should be played for 24 ticks. 'q' is a time constant; i.e., a shorthand way of expressing 24. The actual time elapsed will depend on the beats per minute clock speed set in the play menu. If you desire, you can also express a duration using the noted action, this adds an extra field called the duration field; e.g.,

noted C 0,h 100

noted E 0,h 100

noted G 0,h 100

tie h

The duration field follows the time field. The time field means elapsed time between this action and the next. The duration field specifies how long to wait before issuing a noteoff. Note that with the simple note statement, no duration is specified, since it default to a duration of the same length as the time.

What is useful about the duration mechanism, is that we can specify chords rather easily. The above is a C major chord. The C, E, and G, notes will be played at the same time, and they will all last 'h' ticks (a half note). The tie will cause 'h' ticks to pass before anything else can happen. This is a C major triad that plays for a 'h' note.

Time constants may be entered wherever a 'time' field is found; .e.g, the syntax for a note is:

noteop notename time velocity

note C q 100

Time may be integers or special time constants as follows:

times: integers from 0..32767, cannot be negative.

Time constants are defined as follows:


For example, you may enter 24 for 24 events between this event and the next OR you can enter 'q'.

Velocity constants:

Although you cannot type these in, they are displayed. These are Ravel velocity constants.

A value of 0 entered in as a velocity will cause a "tacet" to appear.


Readact - read in a single binary action

This command is used to read in a action stored in binary format in a file. This can be useful for importing a single action. For example, the utility "mtor" can be used to translate a MIDI file format file to Ravel format. Ravel is a programming language, so the format is ASCII (i.e., it's a text file). "rtoa" can then be used to translate a Ravel action into a binary file which can be loaded by Pip.


Writeact - write out a single binary action

The current action is written out as a binary file. This can be translated by the "ator" utility into a Ravel ASCII file.


writeraVel - write out the action in Ravel

The action is written out as a plain text ASCII file in Ravel.


sEtup - change action setup parameters

This command brings up the setup control window. Two things may be set here.

poff - set pitch bend offset. See bend

for more information.

track - sets the track through which

the action undergoing edit will

be played. Defaults to 1.

pLay - play action but do not leave view

The action undergoing edit may be played. It must be played through a track (see the setup window to set the track), because it must have a MIDI channel. This permits listening to the action. The runtime graphics system is not activated.


Cut - cut some number of actions events

A window is brought up and an action range from lower bound I to upper bound J must be specified. These actions are deleted and placed in the cut buffer. They may be restored with a paste. Cut can be used to delete many actions at once or for moving actions from one spot to another. It may also be used to move a set of events between actions. Note that F1 must be used to cause the cut to take effect. ESC will abort the operation.


Paste - paste from current action cut buffer

The current contents of the cut buffer are placed after the cursor.


Find - find event according to various methods

A button menu is brought up and you must choose from the following:

top: go to first action

bottom: go to last action

by index:

enter a valid index 0..maxaction - 1.

The cursor will be moved to that position.

by time:

The overall idea is "find how far we have

come in elapsed time".

This choice brings up another button menu

with 3 choices:

1. elapsed time at cursor

We find out how far in time the cursor has come from the first action; i.e., how much time has elapsed. Results are given in clicks/beats with 24 clock ticks (a click) per beat.

2. beats from start.

The cursor is moved to the requested number of beats from the start. This is 24 clicks per beat; i.e., a quarter note. Note that the cursor is placed on the next event after the correct amount of elapsed time.

3. measures from start.

A subwindow is brought up that requests clicks per measures, and the number of measures desired. The cursor is moved to this "distance" in time from the first event.


Transpose - note transposition


This window may be used to transpose a range of notes from action i to action j inclusive. A positive or negative value may be entered for the transpose value. Notes will be kept within the valid lower and upper range within Pip however (LLLC, HHHHC). Note that F1 must be entered for the tranposition to occur, ESC will abort.


Step - step entry of input from MIDI controller

A window is brought up in which a time constant should be entered. Pip will then go into step entry mode. Notes may be played from an external MIDI controller and any such notes will be recorded in the action with the given event time. Step mode is left by typing any key. Time constants include: w,h,q,e,s,t (thirty-second),tq,te (triplets...).


5. Library Menu Help Information

Pip maintains a library or catalog of actions. The library menu controls the library view and provides operations on the one action library in Pip displayed with the view. Actions are named. Operations that occur on entire actions or on the action library are accessed from this menu. A current action may be selected in the library view, and if you switch to the action editor, that action will be the one that is edited. This menu provides operations on a single action library maintained in memory in Pip. The library is a catalog of 50 actions. It may be stored in an individual binary file via read/write commands in this menu. (It is also stored by default in the Pip setup in the Files menu). The library view is used for selecting a current action for naming or for action editing in the action view (see Actions). An action is selected by moving the cursor to the action with the arrow keys. Nothing more need be done. Once the library view is displayed, certain operations on the action library can be performed like renaming, copying, deleting, and moving actions. Actions are named and the names are used in other places; for example, in the track view in the Midi menu.

operations on the action library:


This command causes the library view to be displayed; i.e., a scrollable set of action names is displayed. The arrow keys can be used for changing the selected action. If the action view is then entered, the selected action is the one undergoing edit operations. In general, to manipulate actions, you go to the librarian and select an action, and then enter the action view. A carriage return in this menu automatically brings up the menu for changing an action name. The view must be selected (displayed) for the library view commands to be turned on. Note that in this menu like other menus, commands that are available have a highlighted capital letter. That letter will select the command. Lack of highlighting indicates that a command is off. Actions are numbered in the library view from 0 to 49. This is the action index and indices are used in a couple of commands in this menu; e.g., Move.



This command reads in a new action library. The current action library is lost.



This command writes out the current action library as an action library file. This is a binary file and is not viewable with a text editor. The current action library is not changed, just written to disk.



The current action is deleted, if yes is selected. The action becomes empty.



This command is used for moving an action from one position in the library to another. A menu is brought up that requests a source index and a target index. If the command is completed, the source is copied to the target index position and the source is deleted.



Copy works like Move, except the source is not deleted, only copied.


This command can be used for changing the name of an action.


6. Midi Menu Help Information

The Midi Menu provides a few functions for general Midi control and principally provides the track view. The track view is used for setting up 8 MIDI tracks for sequencing of action data at runtime. The track view controls MIDI music output. The notemap view in the Graphics menu controls graphics (notes mapped to graphical objects).


There are 8 MIDI tracks in Pip. When a run command is given, Pip begins sequencing data from the action set in each track; i.e., the tracks are played back simultaneously and in parallel. Each track has one action, and the action is sequenced according to the generator function set in the track. Normally actions loop until you hit a key to stop playback (see the play menu for complete information). Each action generates a stream of notes which are mapped into a notemap. Each notemap has 128 possible notes (actually less), and the notes are mapped to colors and graphical objects which move.

Each track is thus mapped to one of eight notemaps. See the Graphics menu for the notemap view. The Graphics menu has a way to switch to different per-track notemaps. That is not done in the trackview. The important point is:

one track -- one notemap

Each track has 5 fields:

These fields are used for various aspects of track setup. In each case, a popup window is brought up when the cursor is situated over the field and ENTER is typed in. A popup list or Yes/No selection box is brought up, you choose, and hit return and the result is displayed in the view.


action: - select from actions in action library. This first action is always chosen be default.

channel: - choose MIDI output channel, 1 to 16.

generator: - choose from generator types as follows:

Linear - the assigned action is played back in a normal sequential fashion. The action will loop automatically.

Random - events are chosen at random from the entire action.

Drunkenwalk - a drunken walk algorithm is applied to the action. This will bring up a form with sub-parameters that need to be filled out:

lower bound: the lowest action index in the walk.

upper bound:the highest action index in thewalk.

increment: how many action indices to jump every time a walk step is taken.

wrap: if we hit a lower bound, or upper bound do we bounce in the opposite direction, or wrap around to the opposite bound?

A drunken walk means that the action is played sequentially but with a certain random factor thrown in, a few notes ahead,a few notes behind.

Note that F1 must be entered to set the parameters, ESC will abort.

linearRandom - this is a form of random control that

somewhat simulates stochastic generation. The

basic idea is that we choose some number of

events from the list in a random fashion and

then play that number sequentially in a linear

fashion. Hence we mix linear and random

sequencing. This choice will bring up a

sub-parameter form window.

linearCount: how many actions to play at a time

in a linear fashion.

randomCounter: do we always start from the first

action, or do we randomly choose a

starting point?

Note that F1 must be entered to set the parameters, ESC will abort.


track on/off: track is enabled or disabled accordingly.

graphics on/off: graphics display for each track may be enabled or disabled; i.e., if disabled, no graphics will occur on the screen at runtime as a result of notes played in that track.

Disable - disable MIDI output:

This command pops up a window that takes a Yes/No response. If Yes, all MIDI output functionality is disabled. Default is Midi enabled (No).

Input - enable Midi input:

This commands pops up a window that takes a Yes/No response. If Yes, then Midi input is enabled. If Midi input is enabled, then any Midi notes read-in will be mapped to the first notemap; i.e., the notemap associated with the first track. This can be used for driving a notemap with a real external MIDI controller such as guitar or keyboard. Howfar - how many actions executed: Howfar does not take any input. It displays the number of actions executed on a per track basis during the last run. This can be useful for editing purposes.

7. Graphics Menu Help Information



There are a number of global concepts that need to be introduced before we discuss the commands. These are graphics modes, the notemap, objects, and object movements.


Graphics modes:

Pip supports 3 pc graphics modes:

1. EGA resolution. 640 columns by 350 rows (x,y).

0,0 is upper left, 639,349 at lower right.

16 colors out of a palette of 64.

(mode 10 hex).

2. VGA12. 640 by 480. 16 colors.

0,0 is upper left. (mode 12 hex)

3. VGA13. 320 by 200. 256 colors.

0,0 is upper left. (mode 13 hex)

The graphics mode is set in the Color menu. The default is EGA. Pip was designed to support EGA and the two VGA modes were thrown in at the last moment. Pip can thus only handle 16 colors by name and by editing in the Color editor menu, but since a VGA palette can be loaded, any VGA color combination that can be done externally by some paint program can be loaded in an image. This is a hack, but a hack that works. See the color menu for more information. Pip needs to be redesigned to support color editing and naming of more than 16 colors. We will assume EGA for the remainder of the discussion here.


The notemap:

The notemap is another view; i.e., an editable data structure. A notemap assigns colors and objects to each possible note. Each track has one notemap, numbered 1 to 8. The default notemap is assigned to track 1. The notemap is indexed by notes from the lowest note (LLLC = 24) to the highest note (HHHHC = 108). Each note is mapped to one of 16 colors and an object. When notes are played in the track, (if graphics is on), the note will trigger a graphics event; i.e., the object will be displayed and "move" according to a per-object movement algorithm. E.g., if we have the following simplified notemap:

C black flower

D green pig

Assume this is for Pip track #1. Every time we play a C a black flower will be drawn (and will move according to the algorithm setup in the flower object). Every time we play a D a green pig will be drawn.



Objects have names and an individual movement algorithm. This is done with the Editobject command. Objects come in two types; "shapes", which are named objects of one of five preordained graphics forms, circles, boxes, lines, points, and fat points (a cluster of points), and "images", which are PCX paint clippings. Each object has certain attributes, like a name which is used elsewhere in Pip to reference that object, initial x,y coordinates, movement information, a filename (if an image) and other parameters. There are 128 objects maximum (or until memory runs out). Pip keeps all objects in an object database.


Object movements:

Objects have a fixed number of movement algorithms. These are assigned via the object editing mechanism. There are a fair number of parameters associated with movement types. Types of movement include, linear, circular, random, fixed, "iterated fractal system", and others. The parameters associated with a form of movement depend on that kind of movement; e.g., for circular movement, a radius will have to be given. All such measures are supplied in pixels. You will have to take the graphics mode into account. In most cases movement off the screen is clipped. See Editobject below for more information on movement types.

The menu has the following commands:

"NoteView", note color object

The noteview is a view on a per-track notemap and has 3 fields. The arrow keys move from field to field or from note to note. Home, end PageUp and PageDown all work as expected. The first field gives the note name. This field is not editable. It is the index for the note entry. The second field is the color field. If you type ENTER over the color or object , fields. An appropriate list will popup. For colors, this is the set of names associated with the EGA palette. The order of names is important since the names may be viewed as arbitrary since the first name maps to the first color, etc. Color assignments may be changed in the color menus or via reading in an image palette. See the color menu information below for more on this subject. Typing an ENTER over the object field pops up the list of objects in the object database. An object may thus be assigned to a note. The cursor may be moved and then ENTER should be typed to select a new object (or color).



Editobject is used for all editing of objects. This command will bring up a button box as follows:

old shape

new shape

old image

new image


"old shape" and "new shape" apply to shapes. "Old" means pre-existing. "New" will create a new shape. "Old image" and "new image" apply to pre-existing images and creation of new images. There is currently no way to delete an object. If you choose "old shape" or "old image", a list of objects will popup. Select one (with ENTER) and you will enter an edit form. With "new", you enter the edit form immediately.


Shapes are graphics objects based on a number of built-in graphics types. These include circles (ellipses actually), rectangles, lines, points, and point clusters called "fat points". Shape editing is done in the shape edit form. It has the following fields:



size param 1:

size param 2:

starting X:

starting Y:

movement types:

velocity setup:

name field: enter a string. This is the name of the object.

type: choose from the set of object base types. Use the

left and right arrow keys to scroll the types.

The selected type will influence other parameter choices


size param 1:

size param 2:

Circles, rectangles, and lines all have a boundary

rectangle. X,Y (the next two parameters)form one point

on that rectangle. The other point is formed by adding

size param 1 as the X axis delta. Size param 2

is the Y axis delta. A line is formed by drawing

a line between the two points. Circles and

rectangles are formed by using the current X,Y point and

the X+size param1, Y+size param2, point as the

opposite vertex of a rectangle. A circle is drawn

inside the rectangle (obviousally the circle may

become an ellipse, or even a line!). Circles

and rectangles are filled with the color assigned

at the note level in the notemap.

starting X:

starting Y:

Starting x,y coordinates for the object.

This coordinate may be advanced via a movement


movement types:

Use left and right arrow to scroll among the movement

types. Typing in an ENTER here will popup a movement

edit form if appropriate. See "Movements" below

for more information on movement edit forms.

velocity setup:

Rectangles and circles may be made velocity sensitive. This field is disabled by default, but if set to yes, ENTER may be typed to bring up a velocity setting sub-window. This window implements an equation used to produce a velocity sensitive effect. The fields of the window are as follows:

The modulus, divisor, and scale fields take integer values as input. An equation is used to determine the precise velocity mapping based on those 3 parameters plus a velocity and current size parameter. The x, and y fields control whether or not the mapping in question is to be applied to the X size param (size param 1) or the Y axis size param. Note that you can choose to apply the equation to both X and Y or one but there is only one equation for both.

The equation for determining a velocity to size mapping is: size = (size + (velocity/divisor * scale)) % modulus.

Both the size param 1 (x axis) and size param 2 (y axis) may be affected. The 3 settable parameters are:

divisor: The divisor is divided into the raw velocity; e.g., 120/10 = 12; i.e., velocity could be scaled to 0..12 in range.

scale: The divided value is then multiplied by the scale factor to produce an offset that is added to the current size param value; e.g., if the size param is 20, the velocity is 100, the divisor is 10, and the scale is 2

scale = 20 + (120/10 * 2) would give 20 + 24.

modulus: This parameter acts as an overall cutoff fact for the size; i.e., if the modulus is 100, then size param 1 can never be bigger than 100. This allows control of worst-case size.


Images are pcx clippings (or full screen images). These can be created with an external digitizer, screen grabber, or paint programs like the Zsoft paint program distributed with the Microsoft mouse. An image is basically a square screen object that has a number of attributes, including it's own palette (color) setup. It of course may be a picture of anything.

The image window has the following fields:

Images share the same set of movement algorithms with shapes.

image name:

- the object name used elsewhere in pop. This is the name as found in the object field in the notemap view.


- the pathname/filename for a valid pcx format file. The image is loaded from this file.

starting x/y:

the starting x,y coordinates for the image. This is the upper left corner. The size of the image is determined in the external graphics program that originally created the pcx file.

logic type:

xor, or, and, replace. If an image takes up less than 64k of memory, (say a clipping of roughly less than half screen size), it may have a logic type applied to it. xor means that the background will not be disturbed as the clipping moves. replace means that the clipping will not be erased but will always be laid down anew.

memory/disk load:

if memory, then the clipping is loaded into memory at setup time, if there remains enough memory. If disk, then the clipping is only loaded direct from disk to screen at runtime. It is not pre-loaded to memory.

movement types:

See movements below for more information.

palette load:

yes/no. Defaults to no. If yes, then the palette for the image is loaded and applied at runtime. This is not usually what is wanted except for an initial background or a slide show.


There are a number of important practical aspects of working with images as follows:

1. size. As you may be aware, the pc under DOS has a limited memory range of 640k. This is not good. As a result, Pip permits images to be loaded during runtime (disk) or during setup (memory); i.e., an image may first be put into memory OR it may never be put into memory and always loaded direct from disk. In the latter case, loading from a hard disk will slow things down visibly. However it does seem to work to load things from ram disk (mostly). This can be used to get around memory limitations. A full screen image can easily use up 100k and considering that Pip uses up 2-300k by itself, there is usually not that much memory.

2. palette: Each image has it's own palette. The palette's should match or any previous palette will be changed and may destroy what you were setting out to achieve. Two clippings with different palette's can not be shown at the same time. The graphic's modes should match too or unexpected results may occur. This is why palette's may or may not be loaded with the image as you choose.



Movement types include:

A window for setting movement parameters may be brought up by typing ENTER over the movement field. This window will vary according to the movement type. There are no windows for the Fixed type or Random types, since there is no further information needed.


Linear movement causes the object in question to move in a straight line and bounce off the logical sides in a reflective fashion.

The form for setting parameters has the following fields:

The delta change fields can be used to cause some force of curved motion (.e.g, parabolic motion).


An object with this form of motion will move in a circle on the screen. The X,Y coordinate position is not taken as a starting coordinate, but instead is taken as the center of the circle of movement (as found in the parent image/shape form). There are three parameter fields in the circle edit motion form:

start degree: starting degree for circle 0..360

radius in pixels: radius of circular motion from center X,Y coordinates

degree 0..360: degrees of movement per drawing of object

The starting degree determines where the circle will start when drawn. Note that degree 0 is on the X axis on the positive side; i.e., to the right. Degree 90 is on the Y axis on the bottom.


180 0



If spirograph is selected, a spirograph will be drawn. This is a curve that is related to circular forms. A spirograph has the following parameters:

start degree: The starting degree for the first object drawn.

degree 0..360: distance between objects drawn

A constant: A constant in parametric equation

B constant: B constant in parametric equation

C constant: C constant in parametric equation

types: a couple of algorithmic variations

The best guide to this one is: "try it". A general parametric equation for a spirograph is as follows:

x = xbase + A * cos(degrees) + B * cos(C);

y = ybase + A * sin(degrees) + B * sin(C);

The above equation shows that parameters A, B, and C, are taken together with basic sin/cos functions to produce points that will produce a spirograph. It is valuable here to note that the tempo can be set to 0, to produce a quick rendering of any motion setup.



Fractal motion here is a form of random motion. It is different from the IFS fractal motion below. Parameters are as follows:

This window represents a distribution algorithm that is based on a fractal dice throw simulation. The dice are thrown 3 times. min represents the low end of the range and max represents the high end. min and max must be greater than zero. The "types" parameters permits a choice between three algorithmic interpretations:

1. movement - motion is pseudo-linear

2. static - motion is distributed around the X,Y start coordinates.

3. symmetric - motion is symmetric around the X,Y start coordinates in a 4-quadrant symmetrical manner.


The random range setup basically distributes objects in a random manner over a rectangular area. There are two parameters:

These are the distance from the X,Y base coordinates for random distribution.


Spiral movement moves an object in a spiral, naturally. Parameters are as follows:

The spiral setup is basically similar to that of the circle algorithm. The difference is in the "radius change" parameter. That parameter simply adjusts circle to spiral out a little more every time an object is drawn on the screen.

Iterated Function System:

An Iterated Function System is a mathematic model with fractal properties. It can be used to produce some unexpected results; e.g., drawing a leaf. See the book: "Graphics Programming in C" by Roger T. Stevens, ISBN # 1-55851-018-4 for more information. The IFS window choice brings up a box that initializes IFS data structure. The choices here choose from some number of canned algorithm's (including none), which will permit you to deviate from a known working IFS. After you initialize the setup for an IFS, you should choose none if you wish to change parameters, since "none" does nothing to the setup. Otherwise if you choose "Leaf", or some other setup, the IFS setup for the object will be initialized to the canned setup.

Once you are in the IFS setup window, note that there a bewildering number of parameters! The parameters to manipulate to start with are the one's at the bottom for X and Y offsets. The starting X and Y coordinates are not used with this movement type. The offsets force a coordinate system setup as follows:

if X axis, 0..maxX-1 (from left to right of screen.)

if Y axis, -maxY/2 at top, 0 at center, +maxY/2 at bottom

e.g,X offset of 300, y offset of 0 is centered or close to centered depending upon the object. An X offset of 100 will be to the left, 400 to the right (for default EGA).

The best thing to advise here is just change a parameter at a time and try it. Putting the system into one of the kollidoscope modes is something else to try as that can produce some interesting effects. Also note that the funny little box cursor is the mouse cursor. If you have a mouse, it can be extremely convenient to use it to position the cursor for entering numbers. Otherwise the tab key is used for moving from numeric field to numeric file. Note that you can SHIFT-TAB to move backwards.


This command brings up a window that accepts a number in the range 1..8. This number resets the display to the notemap for the requested track. The default notemap is that for track 1. If an 8, is entered, the notemap for track 8 is displayed. There is one notemap for every track.


This command is used for setting a contiquous number of colors in the notemap; e.g., you want all the notes in the C to HC range to be blue. The command brings up a window that takes 3 parameters:

Lower and upper note bound take a valid note (e.g., "C" or "LC"). See the action menu help command for more information on notes. These represent the note indices in the notemap. The color field is a sideways scrollable list. Use the left and right arrow keys to scroll. Once a color is chosen, type in F1 to have the command take effect or ESC to abort. Note that LLLC is the lowest color and HHHHC is the highest.


ObjectRange is similar to ColorRange, except instead of setting a color in a range of notes, we are setting an object. Three parameters are displayed:

Lower note and upper note represent the note indices in the notemap. Objects is a sideways scrollable list of objects (the current objects in the object database). The object selected will be set in the range of notes in the notemap.


The Kollidoscope command brings up a window with three choices:

"None" turns kollidoscope mode off. "Half" puts the display into upper-half/lower-half kollidoscope mode; i.e., a pixel set in the upper half is displayed in mirror-like fashion in the bottom half. "Quarter" puts the display into 4-quadrant kollidoscope mode. Note that this only affects shapes and does not currently affect images. Images do not currently work in kollidoscope mode. Only shapes are affected. This affects runtime display of course.

8. Play Menu Help Information

This menu is concerned with running Pip; i.e., making music and graphics simultaneously.


This command will put Pip in runtime mode. Alt-r will also start Pip running. Any key except 'f' will stop the run. The 'f' key or the "freeze" key, will stop the display until any other key is typed. At that point, the screen will be dumped in pcx format into the file "pip.pcx". In this way the results of a run can be captured and separately displayed.


This command is used for setting the runtime tempo. The values are beats per minutes and legal values accepted are 48..255 beats per minutes. There is one special feature available here and that is that the Tempo may be set to 0. If this is done Pip will play everything as fast as it can (at full blown compute speeds). This is useful for previewing where some graphics setup is headed.


Howlong displays how much time elapsed during the course of the last run. This is displayed in elapsed events in 3 sections as follows:

The events section gives the entire number of elapsed events from start to finish. The quarter section gives the number of "quarter notes" (divide by 24) plus remainder events. The whole beat section gives the number of whole beats (divide by 96), followed by left over quarter notes, followed by left over events.


The timebase affects how many clock ticks per MIDI quarter note used at runtime. The default is 24 ticks per MIDI quarter note. However external sequencers may choose to use some other timebase; e.g., 120 ticks per quarter note. If greater granularity is needed in event times OR you wish to match the timebase of external data, the timebase can be adjusted here in the range 24..240 by units of 24.


9. Colors Menu Help Information

The colors menu allows various manipulations of color setup information, plus graphic's mode setup. There are the following commands:


The colorview allows setting of any color in the EGA palette, i.e., 16 colors are available in the palette out of a possible of 64. 16 colors are displayed at a time. The user must type in a two number code; e.g., 1 63. This will assign the 63rd color to the first palette slot. Palettes are numbered from 0 to 15, 16 in all. Colors are numbered from 0 to 63, 64 in all. Palette number 0 is used for the background. Palette number 7 is used for any text displayed. Be careful changing the background since you can make the colorview indistinquishable from it's text. ESC will save the work and return to the main menu system. There is no F10 help in this screen, since the help is already displayed on the screen. The EGA palette is saved with the Pip setup. It is used at runtime for object coloration. There is no support or mechanism at this time for dealing with VGA color schemes. This can be done externally by setting up a palette in a pcx file and importing that file with the Filepalette command or as an initial background. The palette for VGA is much larger than the EGA palette. Pip was not originally designed for VGA, and hopefully a mechanism for color editing will be put in Pip at a later time.


Showcolors previews the EGA palette 16 colors at a time, in 4 successive screens. Thus all 64 colors are shown. This is useful for noting a particular color number, which can then be applied in the colorview. ESC will abort. ENTER will take you to the next screen. The command returns to the main menu at the end of the display sequence. F10 help does not work here.


This command brings up the 16 color names (EGA again), so that the names can be changed. The names are used in the notemap. Position the cursor with up/down arrow keys and type in a changed name. The changed name will be shown in the notemap or the notemap's popup color list.


Pip supports three PC graphics modes:

1. EGA resolution. 640 columns by 350 rows (x,y).

0,0 is upper left, 639,3489 at lower right.

16 colors out of a palette of 64. (mode 10 hex).

2. VGA12. 640 by 480. 16 colors: 0,0 is upper left. (mode 12 hex)

3. VGA13. 320 by 200. 256 colors: 0,0 is upper left. (mode 13 hex)

That mode is set here. See the graphics menu for more information.


There are certain situations where it may be desirable to load a palette at the start of a piece, but NOT display a background (other than color). If a valid .pcx file is set here, the current PIP setup will cause that file to be loaded at the beginning of the run; i.e., only he color palette information is loaded. Be careful, the mode and the graphics mode of the pcx files should match. The palette information is saved in the Pip setup. The file is no longer necessary. The palette can be undone by entering a name with all blanks. The palette setting will revert to the current EGA setup. One example of how the above can be useful is if you want to animate a number of clippings but you don't want to worry about which clipping has to be displayed first; i.e., let the initial background set the palette, and then none of the clippings needs to load palette information. See Colors/Mode for mode settings and the notemap for a discussion of palette colors.

10. Help Menu Help Information

Pip has a built-in help mechanism. The mechanism has 2 components:

Within Pip, there are three ways to get help:

11. The help browser

The help browser is used automatically by Pip to put together a context sensitive help system. To get back to Pip: Type in ESC. You only need to type in ESC to get back to Pip, if you are not in a sub-window in the help browser. In that case, several ESC's will be needed. In general, keys like PageUp, PageDown, Home, End, and the arrow keys work as expected. The keys 'c' and 'h', will popup the command and help menus. This is different from how Pip works since in Pip Alt keys (or function keys) popup menus. The mouse works for moving up and down text. The mouse buttons will pop up search windows for forward and backward search. Note that the help browser has a search mechanism. This can be used for easy search for a particular keyword when you want to browse the help file for more information on a particular subject.

Filedate: 920928

Terug naar inhoudstafel kursus: <Index Kursus>

Naar homepage dr.Godfried-Willem RAES