====== Customizing Patches and Modules ====== ===== Basic Patch Menu ===== You already learned how to insert a module: right-click on the background of the patch window, and select 'Insert Module'. This menu is the patch menu: \\ {{:ai:patch_left.png|}} {{:ai:subpatch_menu.png|}}\\ (if you are already working in a sub-patch then there are two options more): * ''Show Parent Patch'' (subpatches only) opens/recalls the patch window where this patch is a part of * ''Insert Module'' lets you select a module, sorted in sections, to be inserted * ''Insert System Patch'' lets you insert a system patch. System Patches are patches which are deemed important enough to be shipped with the software - they simply live in Distrib\Patches\System. * ''Insert Empty Patch'' adds an empty patch, represented by a small grey rectangle. Doubble-click it to open it, or to 'fly' down into it. * ''Insert Patch File'' opens a file explorer in order to navigate to another patchfile which can be inserted here * ''Insert Patch IO'' (subpatches only) inserts the module [[ai:modules:patch:patch_io]] which allows to route ports between patches. * ''Hide All Connections'' hides all already patched 'wires'. This is useful for patches with many connections. Even with the connections hidden, hovering the mouse over a port temporarily shows its connection(s). * ''Show All Connections'' makes all connections visible again. In order to save a patch, specifically select the patch window and select ''File/Save as'' from the top menubar - this makes sure this patch is saved in a separate file. If you don't do this, the patch is stored in the stage patch of this very project, but is not available for other projects. ===== Arranging Patches and Modules ===== ==== Select ==== * In order to select one module/patch, simply click it - either at its background or its titlebar * In order to select a group of modules/patches, draw a selection box around them (click in one corner, hold the mouse button, move diagonally for a reactangle, release mouse button) * In order to move the entire viewport of the patch window hold the spacebar pressed and drag the contents with the mouse, or - with nothing selected - repeatedly hit the arrow keys (up/down/left/right) * ''Ctrl'' + ''A'' selects all items in this window * ''Ctrl'' + ''D'' deselects all items * ''Ctrl'' + ''G'' groups selected items into a subpatch, see [[#subpatches]] for details ==== Move ==== * in order to move one module/patch, click it, with the mouse button down move it to the target location, release it * in order to move a group of modules/patches, draw a selection box around them, click one of the selected items, with the mouse button down move it to the target location, release it ==== Delete ==== Select one or more items you want to delete and hit the ''Delete'' key. ==== Copy ==== Ctrl-C and Ctrl-V do work here as well: select one or more items, press ''Ctrl'' and ''C'' to copy, then press ''Ctrl'' and ''V'' to paste the items - in the same or another patch window. ==== Undo/Redo ==== * ''Ctrl'' + ''z'' undoes the last step, and can be repeated to go back several steps * ''Ctrl'' + ''Shift'' + ''z'' redoes the last step, and can be repeated to go forward several steps ==== Rename ==== Double-click in the title, or behind it in the titlebar, in order to edit the title of a module or patch. ==== Resize ==== Grab and draw one of the edges of a module/patch in order to resize it. ===== The Module Menu ===== Right-clicking a patch or module brings up its context menu (the menus for patches and modules are rather similar): {{:ai:module_menu.png|}} {{:ai:module_menu_2.png|}} * ''Expend Patch'' (patches only) is the same as double-clicking the patch. It opens in a new window or you 'fly down' in it. * ''Show Port'' displays ports which are not yet shown, e.g. hidden or not in this skin * ''Remove Port'' (patches only) removes a port. When removed, you cannot bring it back in, unless you re-wire it to the underlying Patch I/O. This is different to the ''Ctrl'' ''Delete'' thing described below as that can be revoked with ''Show Port'' or ''Reset Skin''. * ''Show Parameter'' is similar to ''Show Port'' but works on controls which are exposed via their control options/Add to Parent Panel * ''Remove Parameter'' (patches only) is similar to ''Remove Port''. When removed, in order to bring a parameter back in, you need to select its Control Options/Add to Parent Panel again. * ''Load Default Skin'' (modules only) loads the default skin (a predefined surface - each module can have various such skins) * ''Load Alternate Skin'' (modules only) loads another such skin (module surface) - shows a list of available skins for this module * ''Save to Alternate Skin'' (modules only) saves the current surface as another skin which can later be recalled with ''Load Alternate Skin'' * ''Reset Skin'' resets the skin, i.e. resizes the rectangle to its original dimensions, shows prots and parameters which have been deleted with ''Ctrl'' ''Delete'', and neatly arranges ports and parameters. * ''Module Help'' opens the help (the aforementioned Distrib\Help\Ai_Man_v8.chm) ===== Tweaking controls and ports ===== Controls and ports cannot be tweaked with simple mouseclicks as they are meant to register the click itself and act accordingly. Here are the keyboard/mouse combinations: * to select one control or port, hold down ''Ctrl'' and click the item * to select some controls/ports, hold down ''Ctrl'' and draw a selection box * to delete one or more controls/ports, select them as decribed and press ''Delete'' * some operations on control/port level cannot be made undone. The way back in that case is: left-click the module and select 'Load Default Skin' - but this really resets the entire thing. Hence be careful when adjusting/deleting controls and ports. Another - more subtle - way is left-click and 'Show Port' resp. 'Show Parameter' - but you need to know the name of the item you have deleted. * to change a label of a port or control, hold down ''Ctrl'' and double-click the label * my absolute favourite: in order to resize a control (e.g. buttons, faders, text areas, dropdown lists) hold down ''Ctrl'', place the mouse close to the bottom or right edge of the control (**close means: a few pixels away from it**), and press the left mouse button. If you hit the right spot the cursor will show arrows and you can drag the edge in order to resize the control. ===== The Control Context Menu ===== Right-clicking a control reveals its context menu: \\ {{:ai:control_menu.png|}} * ''Edit Midi Map'' opens another window where you can adjust if and how this control should be controllable by MIDI * ''Edit Artnet Map'' opens another window where you can adjust if and how this control should be controllable by Artnet * ''Add to Parent Panel'' makes this control available on the surface of this panel (the grey rectangle representing this patch when used within other patches) * ''Add to Top Panel'' makes this control available on the topmost patch in case of multiple nested patches ===== The Port Context Menu ===== Right-clicking a port reveals its context menu: \\ {{:ai:port_menu.png|}} * ''Disconnect'' - removes all connections to/from this port * ''Hide Connections'' hides all connections to/from this port * ''Show Connections'' shows all connections to/from this port ===== The Control/Port Options Menu ===== Holding ''Ctrl'' pressed while right-clicking a control or port reveals its control options menu: \\ {{:ai:control_options_menu.png|}} * ''Control Properties'' (only valid for controls) opens another window with specific options for this control (e.g. range, available options, button texts, etc.) * ''Create Label'' lets you create a label for this control * ''Link to Module'' -- I have literally no idea * ''Delete Control'' is another way to delete this control ===== Subpatches ===== Patches can be nested - a patch can contain any number of modules and other patches, which in turn may contain other modules and patches, and so forth. (I think I already made patches with 4 or 5 layers of nested patches). In such situations you need a way to route signals (ports) and commands (controls/parameters) from one patch to another. Of course Ai offers a neat way for this: [[ai:modules:patch:patch_io|Patch IO]]. * in the subpatch, insert ONE Patch IO module (each patch can contain only one such module). You can do this by right-click, ''Insert Module'', selecting it from the Patch section, or by right-click, ''Insert Patch IO'' * if you need to patch one port to the parent patch simply start to patch this port and drop the other end onto the Patch IO module. The port will immediately appear on the rectangle representing this patch in the parent patch. From there, you may patch as usual. * if you need to patch a port in the parent patch to the nested patch simply start to patch this port and drop the other end onto the patch rectangle representing the subpatch. This port will subsequently appear in the Patch IO within the subpatch. * in order to make controls (faders, buttons, dropdown lists, text areas etc.) available on the surface of this patch/in the parent patch, right-click the control and select ''Add to Parent Panel'' whereupon the control will magically appear on the rectangle representing the patch in the parent patch. There is a quick way to group modules and patches into a subpatch: ''Ctrl'' + ''G'' does this for you, and even adds a Patch IO and wires it if needed. Thus, simply select the modules and patches you want to be moved into a subpatch, and hit ''Ctrl'' + ''G''.