[1m==============================================================================

The Usual: 
   No warranty, express or implied, is extended to users of this software. The
   author is not responsibility for any damage or inconvenience or anything
   else resulting from the use of this software. Whaddya want for nothing?


Use it, abuse it, pass it around. If you like anything, or if you don't like 
something, let me know:

                Michael Rees <mrees@pppmail.appliedtheory.com>
                           217 Huckleberry Road
                    Farmington, New York 14425-7051 USA

An email or a nice postcard isn't too much to ask, is it?


*
* NB: These tools were compiled as 68030 code. If you want or need a version
* for a different processor, let me know.
*

(Developed on an Amiga 2000 w/68030 + 11M with SAS/C v6.56 and Bars & Pipes
 Professional v2.5c beta2 (7/20/94).)


     The Bars&Pipes® Tools and supporting documentation in this package are 
                 © 1994-1997 Michael Rees. All right reserved.

==============================================================================
[22m[0m

The Unusual:

   Here are a very few of the tools I've written for Bars&Pipes over the past
   several years for your perusal and amusement:

      · Duration Filter - reroute events based on durations;
      · MegaBranch - a configurable branch tool replacement;
      · Modomatic - an automodulator that really works;
      · UpIsDown - real intervallic inversions; and
      · StickIt - a sort of a joystick-type control change generator.

   Some things I've developed over the years have become standard in most of the 
   tools I write. One of these is always displaying the track name in the title 
   bar of a tool's edit window -- much easier than trying to remember which tool 
   goes with what track when a bunch of windows are open. Another is the 
   addition of a new 'special type' for tool: Real-Time. These tools respond to 
   control changes and vary their internal states in some way. Also, most 
   Real-Time tools can write a sysex message "snapshot" to the track they're in. 
   When the transport is running and a Real-Time tool is set to respond to 
   sysex, the tools change themselves to the way they were when the sysex was 
   written. Cool, huh? It is in my line of endeavor, which is algorithmic 
   composition.

   There is one cavet about these tools. They use 1 as their manufacturer ID, 
   which is assigned to Sequential Circuits. Probably not a big chance of 
   conflict, but you should be aware of that just in case. (And I did it in 
   honor of Dave Smith, who is a nice guy. And I still wish I had my ProOne 
   back, or the balance of what has been owed me for 10 years from the buyer...)

   So, have a go at some of these and let me know what you think. There are 
   about a zillion more lying about on my harddisk that are more or less 
   esoteric than these. Any favorable feedback on these and I'll hack up some 
   documentation for some others and foist those upon you too.

   And just who am I, I'd like to believe you wonder silently? Just another 
   crazy composer of that weird computer music with NO COMMERCIAL POTENTIAL 
   (i.e. nullis pretti), driven to software development because there is no 
   choice but to build my own little world for noisemaking. What?
   
   m.

---------------------------------------------------------------------------

         [1mNAME:[0m  Duration Filter 

       [1mTOOLID:[0m  DrFi (0x44724669)

  [1mDESCRIPTION:[0m  The Duration Filter tool is a configurable,
                controllable filter which reroutes note events based on their 
                durations. 

 [1mSPECIAL TYPE:[0m  Branching, Real-Time.

        [1mUSAGE:[0m  PipeLine, ToolPad.

     [1mCONTROLS:[0m  Oh, my; what a load of controls, eh? Well:

                Some gadgets appear multiple times in connection with 
                sundry other gadgets. The Mystery Note gadgets allow you 
                to set various parameters from a pop-up note menu. The 
                pop-up pipe gadgets control what happens to control 
                change inputs. The plug deletes them; the straight pipe 
                passes them; the elbow branches them (or deletes them if 
                the branch output is not connected.

                The Duration: slider sets the test value for the filter. 
                This setting is what the tool tests incoming note 
                durations against to determine whether they are branched, 
                or passed down the pipeline.
                
                The State: gadgets control the operation of the tool. If 
                CChg is selected, the controller set with the CChg: 
                slider will turn the tool on and off with MIDI switch on 
                and switch off values, respectively. The < / > gadget 
                determines whether notes with durations less than or 
                greater than the Duration setting are branched. The Off 
                and On gadgets disable and enable the tool. These gadgets 
                change in response to the CChg: controller.

                If the Controller Mapping gadget is selected, things get 
                trickier: the tool's test duration is controlled by the 
                lower CChg: controller. Control change values are mapped 
                to the range set by the Max: and Min: gadgets. The range 
                can be quantized to the value set by the Quantize: 
                slider, or not if the slider is set to Off. The current 
                test duration is displayed in the Now: line so there some
                some hope of keeping track of what's happening.

                There is also one menu. The Show CC Numbers item lets you 
                toggle the CChg: slider displays between numbers, and 
                MIDI standard controller definitions.

                As usual, the miniature camera in the edit window
                title bar writes the tool's state to the track as a
                system exclusive message.  (The Snapshot menu item 
                duplicates the snapshot gadget. A sysex snapshot is 
                inserted into the track:
                  · at the song position pointer if the transport is 
                    running;
                  · at the track's left edit flag if the track's window 
                    is open; or
                  · at the main window left edit flag if the track's 
                    window is not open.

                What happens with system exclusive messages is 
                determined by two menu items. The tool responds to 
                its sysex messages when the Use SysEx item is 
                checked. When the tool receives one of its sysex 
                snapshots, it will change its internal state to that 
                reflected in the sysex message. If the tool's window is 
                open, the display will be updated to reflect the new 
                setting. Unless Free SysEx is selected, the tool 
                passes these events to the next tool in the pipeline.
                Foreign sysex events are always passed down the 
                pipeline.

                Note that snapshots and sysex do not function
                in the ToolPad. Control changes, however, are functional 
                when the tool is used in the ToolPad.


         [1mNAME:[0m  MegaBranch

      [1mTOOL ID:[0m  MBra (0x4D427261)

  [1mDESCRIPTION:[0m  MegaBranch is a selective branching tool: no more branching,
                or elbowing, or passing events unless you want to.

 [1mSPECIAL TYPE:[0m  Branching; Real-Time.

        [1mUSAGE:[0m  Pipeline, ToolPad.

     [1mCONTROLS:[0m  For each type of event, there is a pop-up menu that allows you to
                select whether that type of event is passed down the pipeline, 
                redirected to the branch out, or duplicated and sent to both 
                destinations. In conjunction with the CC: slider, you can set
                a destination for each control change number. Three menu items
                facilitate setting all controllers to the same destination.

                As usual, the miniscule camera in the edit window title bar writes 
                the tool's state to the track as a system exclusive message. The 
                Snapshot menu item duplicates the snapshot gadget. The time of the 
                sysex message is: 
                 · the current song position pointer if the transport is running; 
                 · the track's left edit flag if the track edit window is open; or
                 · the song left edit flag if the track edit window is not open.
                Note that you can't take snapshots from the ToolPad. (If you can
                tell me how to get at the real clip that's being edited, I'll be
                happy to add it to all my tools that use sysex snapshots.)

                What happens with system exclusive messages is determined by two 
                menu items. The tool responds to its sysex messages and changes
                its internal state according to the sysex message when the 
                Use SysEx item is checked. If the tool's edit window is open,
                the gadgets are updated to reflect the new state. Unless the 
                Free SysEx menu item is selected, the tool passes these events to 
                the next tool in the pipeline. (Foreign sysex events are always 
                passed down the pipeline.) The Use SysEx and Free Sysex settings, 
                and the currently displayed control change number are not changed 
                by any sysex message the MegaBranch tool receives. In addition,
                sysex doesn't work when the tool is in the ToolPad (because I 
                can't figure out what's screwy with it).

         [1mNOTE:[0m  You probably should not change the destination for Note events while
                the transport is running (until I decide I need to add support for 
                tracking them) because, unless the sysex is synchronized with the 
                notes, you might very well end up with stuck notes. The tool was fat
                enough without matching up note ons and note offs, and I don't need
                to do that right now anyway. So, there.


         [1mNAME:[0m  Modomatic

      [1mTOOL ID:[0m  AMod (0x414D6564)

  [1mDESCRIPTION:[0m  Modomatic is similar to the Auto Transpose and Auto Modulate tools
                from the Creativity Kit, but it works correctly. Note and 
                Polyphonic Aftertouch events are transposed according to the Note 
                On events received at the merge input. 

 [1mSPECIAL TYPE:[0m  Merging, Ontime, Realtime.

        [1mUSAGE:[0m  Pipeline.

     [1mCONTROLS:[0m  The Axis gadgets determine the basis for transpositions. The 
                distance between the Axis note and notes received at the merge 
                input determine what change is applied to notes flowing through 
                the pipeline. 

                Ordinarily, Modomatic does a straight transposition ("modulation" 
                in Bars&Pipes parlance). The Mod gadgets allow you to alter that 
                behavior. When the Key/Scale gadget is selected, the tool locks 
                its output to the current Key&Scale/Mode (which can be mighty 
                confusing if you play a C Major scale and it comes out F# Lydian). 
                To disregard the octave of the merge input, select the PitchClass 
                gadget. Then, Modomatic concerns itself only with interval and 
                direction. For example, set the axis to C, and squirt in a G5 on 
                the merge input. The tool transposes pipeline inputs by +7 
                halfsteps, the distance from C to G. So, a G#6 received from the 
                pipeline leaves Modomatic as D#8. If the next merge input is an
                F5, the transposition changes to -5: 5 halfsteps because that is
                the distance from C to F; a negative transposition because the new 
                merge input note is lower than the previous.

                The Route gadgets control what happens with notes and poly 
                aftertouch events received by the tool. You can choose to pass (the
                straight section of pipe), or free (the plug) Original, untransposed
                events, and/or events received at the merge input.

                The three Reset gadgets determine when the tool resets the 
                transposition to 0. Start resets when you select the transport's 
                play-from-beginning gadget; Play causes a reset when you punch the 
                transport's play gadget. The Now gadget resets the transposition 
                immediately.

                As usual, the dinky camera in the edit window title bar writes 
                the tool's state to the track as a system exclusive message. The 
                Snapshot menu item duplicates the snapshot gadget. The time of the 
                sysex message is: The current song position pointer if the 
                transport is running; The track's left edit flag if the track edit
                window is open; or the song left edit flag if the track edit 
                window is not open.

                What happens with system exclusive messages is  determined by two 
                menu items. The tool responds to its sysex messages when the 
                Use SysEx item is checked. Unless Free SysEx is selected, the tool 
                passes these events to the next tool in the pipeline. (Foreign 
                sysex events are always passed down the pipeline.)

                Lastly, the Auto Snapshot menu item causes the tool to write sysex 
                every time the transposition changes. This allows you to preserve 
                that perfect transposition sequence that you played without using 
                up an extra track to record what you played.
                
                
         [1mNAME:[0m  UpIsDown 

       [1mTOOLID:[0m  INVR (0x494E5652)

  [1mDESCRIPTION:[0m  The UpIsDown tool inverts the intervals between
                notes in a sequence.  This is a "real" inversion
                without regard for key (e.g. an ascending m7
                becomes a descending M2).

 [1mSPECIAL TYPE:[0m  Branching, Real-Time.

        [1mUSAGE:[0m  PipeLine, ToolPad.

     [1mCONTROLS:[0m  Controls in the UpIsDown window provide control
                over some aspects of the tool's operation.

                The Initial Note gadgets allow you to set the
                pitch class and octave for the basic of the 
                inversion, similar to the Flip tool's axis setting.  
                The Initial Note specification is used only if the 
                Use gadget is selected, and then the  UpIsDown tool
                behaves mostly like the Flip tool.  If Use gadget 
                is not selected, the UpIsDown tool uses the first
                note it receives as the basis for inversion. 
					 
                The Initial Note gadget also displays the current
                basis for inversion when the CChg gadget is 
                selected, and the Use gadget is not selected.

                The Reset On gadgets control when the UpIsDown
                tool reinitializes its internal initial note,
                The first two, Start and Play, correspond with the 
                start and play transport controls.  If the Start 
                gadget is selected, the UpIsDown tool resets its 
                initial note whenever you click on the 
                start-from-beginning transport control.  If the Play 
                gadget is selected, the tool resets its initial note 
                whenever you click on the transport play control.  
                The value used to reset the initial note depends on 
                the settings of the Initial Note gadgets.  If
                neither of the Reset On gadgets is selected, the
                UpIsDown tool never resets its initial note. The 
                CChg gadget resets the initial note whenever the 
                designated controller's value is greater than 63 (a
                switch on). If the initial note Use gadget is 
                selected, a switch on resets the tool's initial note
                to whatever is selected in the Initial Note gadgets.
                Otherwise, when the tool receives a switch on message,
                it resets its initial note to the next note it 
                receives. In this case, when the tool receives the
                next note, the Initial Note gadgets are updated to 
                show the current initial note.
                
                Three pop-up pipe menus allow you to select where the
                tool sends its control changes, and input and output 
                notes. A straight pipe sends events on down the 
                pipeline; an elbow pipe sends events to the tool's
                branch output; a plug deletes the events. Note that 
                you cannot select a plug for the output notes.
                
                As usual, the miniscule camera in the edit window
                title bar writes the tool's state to the track as a
                system exclusive message. The Snapshot menu item 
                duplicates the snapshot gadget.

                What happens with system exclusive messages is 
                determined by two menu items. The tool responds to 
                its sysex messages when the Use SysEx item is 
                checked. Unless Free SysEx is selected, the tool 
                passes these events to the next tool in the pipeline.
                Foreign sysex events are always passed down the 
                pipeline. Snapshots and sysex don't work when the tool is
                in the ToolPad.


         [1mNAME:[0m  StickIt

       [1mTOOLID:[0m  Stkt (0x53746B74)

  [1mDESCRIPTION:[0m  The StickIt tool emulates a joystick for 
                generating control events. Drag the slider gadget around, and 
                the tool sends events. All this and more...  If the transport 
                is running and you drag the humongous joystick-type slider, 
                the new events replace any matching events (events of the same
                type the tool is squirting out) already in the track. AND the 
                tool saves a list of new events. When you punch stop, you can 
                choose to replace matching events in the track with the new 
                events, mix the new events with existing events, or leave the 
                track alone and trash the new events (i.e., the tool can 
                be nondestructive -- see below). This can be a handy tool if 
                you have, for instance, a Wavestation A/D and don't like 
                always having to reach over and to twiddle with that teeny 
                little joystick it has on the front panel.

 [1mSPECIAL TYPE:[0m  Ontime, Realtime.

        [1mUSAGE:[0m  Pipeline.

     [1mCONTROLS:[0m  The StickIt tool window has several intriguing
                gadgets, and one menu, and an annoying requester.
                
                The requester pops up when you stop the transport only if you
                generated events while the transport was running. You get three
                choices of what to do with the events:
                  · Mix mixes the new events with any already in the clip;
                  · Replace deletes old events in the clip, and sticks in 
                    the new ones;
                  · Nope leaves the clip alone and frees the events you 
                    generated.
                (There is another requester that alerts you if the track's
                clip is locked because the tool can't save anything in that
                case.)

                The Min, Mid, and Max gadgets set the slider to the minimum,
                middle, and maximum of the ranges for the axes respectively.
                The gadgets for the axes (MinX, MinY, etc) set only the axis
                to which they refer. Unless a Defer gadget is selected, using
                a Min, Mid, or Max gadget also send a control change.

                The Send gadgets force the tool to send a control change event.
                Use them in conjunction with the Defer gadgets to gain greater
                control over when the tool sends events.

                When selected, the Defer gadgets turn off an axis. You can
                still drag the prop gadget, but events are not sent until you
                smack the Send gadget.
                
                The Play gadget allows you to watch the prop gadget whiz 
                around in response to control changes received by the tool. If
                you can manage to grab the pot you can still move the gadget, 
                but events are not sent by the tool unless you whap a Send
                gadget. It's not very useful, but sort of fun. The menu item
                Playback CCs duplicates the functionality of the gadget.
                
                The configuration gadget (the small pliers in the title bar)
                expands the window to show the gadgets that allow you to 
                select the types of events the tool generates, and the range
                of values in the events. The configuration gadget also shrinks
                the window again to get all that junk out of the way when you
                are just grooving with the tool.
                
                The Event sliders allow you to select the kind of event the
                tool generates for each axis. You can choose control changes, 
                mono aftertouch, or pitch bend. (The tool sends only 7-bit
                pitch bend.)
                
                The CC# slider sets the control change message to be sent. You
                can toggle between displaying names or numbers with the menu
                selection Show CC Numbers. In addition to the slider 
                display, the selected controllers are also displayed on the 
                left side of the main area of the window in a small font. 
                (This is handy if you, like me, can't remember what 
                controller is on which axis from time to time.)
                
                The High and Low sliders set the range of values sent on each
                axis. Note that the tool a bit strangely if the range is less
                than the Res setting. (I suppose I should do a sanity check on
                that, but you can do more easily as I just thought of it.)
                
                The Res sliders set the resolution for event generation. Changes
                in values less than this are not sent.

                In the title bar is the ever-popular Snapshot gadget (the wee
                camera). Click on this gadget to write the tool's current state
                to its track as a sysex message. If the transport is running, 
                the message is saved at the time the Snapshot gadget is clicked.  
                If the transport is not running, the system exclusive message 
                time is the same as the left Edit flag.  The track's Edit flag 
                position is used if the track window is open; the Tracks window 
                left Edit flag is used if the track edit window is not open.
                Snapshots won't occur any closer than the length of the default 
                note from the position at which a new snapshot is to be inserted.
                For example, if the default note is a quarter note and you 
                snapshot a tool at measure 2, beat 3, the tool will delete any of
                its own snapshots found between 2.2.01 and 2.3.191 before 
                inserting the new snapshot.  If the track's window is open, the 
                default note set for the track is used.  Otherwise, the default 
                note set in the Global Parameters window is used.
                
                Most of the StickIt tool menu items duplicate the functions of
                gadgets; a couple provide additional goodies.
                
                Show CC Numbers toggles the display for the CC# sliders between
                names assigned to controllers in the MIDI spec, and your basic
                digits.
                
                Use SysEx toggles response to tool sysex messages. The StickIt
                tool disregards its sysex unless this item is selected. When the
                item is selected, the tool changes its current state to that 
                saved in the sysex. Note that the tool does not change the 
                state of the Use SysEx item so that you can choose to use or
                not use tool sysex as you please.
                
                Playback CCs duplicates the Play gadget.
                
                The Auto Replace item allows you to avoid the annoying requester
                that pops up after stopping the transport (if you generated any
                events with the tool). When Auto Replace is selected, the tool
                automagically replaces any events in the clip with the new 
                events generated. Otherwise, you have to make a selection from
                the requester to determine the disposition of the events.
                
                The Snapshot item duplicates the functionality of the Snapshot
                gadget.
