This patch shows how you might combine several of the abstractions that are presented in other examples. The two key abstractions here are tapoutxfade~ and quadpan~. Those are not actual Max objects; they're both patches that have been saved with those names.
This is a flanger that can easily be used as an abstraction (subpatch) within any audio patch. Simply save this patch in Max's file search path with the file name "flange~.maxpat", and it can then be used as a flange~ object, as shown in the example "Try the flange~ abstraction".
This patch is functionally identical to the mix~ abstraction in "A useful subpatch for mixing and balancing two sounds"; you can read its explanation there. It's repeated here in order to focus on the topic of initialization: setting up the initial state of your program the way you want it.
For this example to work properly you'll first need to download two other patches.
To ensure finding a file (regardless of any File Preferences… settings in Max) you may need to provide the entire path to the file in the hierarchical file system: volume name, folder name(s), and file name. This example shows how you can construct such a full path.
This abstraction, which I call “inlist”, checks to see if a given number belongs to a previously-collected set of numbers. Numbers in the middle inlet are added to the set, and numbers in right inlet are deleted from the set. A clear message in the left inlet deletes the entire set.
This patch is designed to be used as an abstraction (subpatch) in another patch, such as the example "Mixing multiple audio processes". In order for that example to work, you should download this example and save it with the filename "pinger.maxpat" somewhere in the Max file search path.
To delay a single bang message by a certain amount of time, use the delay object. But to delay any other sort of message—a number, a list, even a group of different messages—use pipe. The pipe object dynamically allocates memory as it stores more and more messages, so it can keep track of many messages at once, even if they arrived at different times and have different delay times (unlike the delay object, which can only hold one bang at a time).
To invert a musical phrase around a particular axis of symmetry, multiply the axis pitch by 2, then subtract the played pitches from that. For example to invert all pitches around the axis of middle C (MIDI key 60), you would subtract the pitches from 120.