Sub patches are building block patches expected to be used in a main patch.
They will normally contain inlets and outlets through which the main patch can send/receive (similar to Reaktors Macros or Max Encapsulations).
As mentioned in the user guide, normally these subpatches are saved as sub patch files AXS, however axoloti also support 'embedded' sub patches, which are stored in the the main patch.
Subpatch file (AXS)
There are 2 ways that a sub-patch is loaded into a main patch
- direct reference relative to main patch
- it is on the object search path
direct reference, (this is the 'preferred method')
Entering ./mysubpatch into the search dialog will look for mysubpatch in same directory as the main patch.
You can also use ./sub/mysubpatch to look in the subdirectory sub, or ../mysubpatch to look in parent directory. This can be useful when sharing sub-patches between a few main patches.
(note: you should save the main (or parent) patch first so you are clear where it is located!)
Subpatches will be searched for in the search path, and will be shown in the search window.
In preferences you can add new directories to the search path.
This is particularly useful for 'utility' patches that you might use in many patches. (you can see Axoloti does this with the FX objects)
The disadvantage of this is that it's more difficult to keep track of where these subpatches are being loaded from. Adding many new directories to the search path can become confusing, so don't use this for subpatches that only get used in a couple of patches.
editing a subpatch
- a subpatch edited whilst the parent is live, will have no effect until the patch is re-compiled and uploaded to the board
- always use the 'edit object definition' to edit a sub patch rather than opening the sub patch from the file menu, this ensures you are editing the version on the main patch, and its effects will be propagated when you go live.
Embedded sub patches
These are created using a special object called 'patcher' you can load one by using the object search frame and typing: patch/patcher
the advantage of these embedded patches is you don't need to save them separately, so managing them is easier.
the disadvantage is that they cannot be reused in other patches.
to edit the contents of this patcher hit the edit button, and then you will be given a patch frame as normal.
the difference is you do not need to save it.
so if you close the window, you will not be asked to save
this is because its contents will be saved in the main patch.
(so you will be asked to save the main patch if you edit the embedded patch)
currently (still in development!) when you update a patcher, you must press 'update' button on the patcher object on the main patch for the changes to be reflected, including seeing controls, inlets and outlets.
(remember to show control, just like an sub patch file you must mark controls with 'parameter on parent' option)
Sub patch mode
The sub patch mode is specified in the patch settings of the sub patch, and it determines how voices are handled and mapped to midi channels
Sub patch modes:
- No - no voicing is allocated
- Mono - only one voice is used
- Mono with bypass - not implemented yet
- Polyphonic - multiple voices , midi data is received on the channel specified, or on the parent if the midi channel attritbute is specified. this is the 'normal' polyphonic mode for most midi controllers
- Polyphonic multichannel, this implements 'voice per channel' midi, where each voice is controlled on a different midi channel , commonly used on midi guitars and expressive controllers e.g. Haken Continuum/Eigenharp
- Polyphonic expression, this is also a voice per channel midi mode, but support the Multidimensional Polyphonic Expression (MPE) specification, currently supported by Eigenharp, Madrona Labs Soundplane and Linnstrument. This mode should be used in conjunction with the MPE object (midi/device/mpe)