Wire Tutorial - Creating a SubPatch

The Wire software and documentation is Copyright 2000-2008 by SoftSynth.com, All Rights Reserved

The collection of modules that you created in the previous tutorial pages is called a patch. A patch can contain other patches, which allows you to build a complex hierarchy of patches. Let's add a simple patch to our existing patch. We will create a very simple patch that just contains one oscillator. This oscillator can be controlled by an external frequency port, and its output will be sent to an external output port.

  1. Select the oscillator in our top patch by clicking on the top of the sawOscBL module. It should highlight when selected.
  2. Delete the selected oscillator by hitting the Delete key or the Backspace key. You can also select Delete from the Edit menu.
  3. Select "Empty Patch" from the "Add" menu. You should see a box labelled "patch" appear.
  4. Double click on the "patch" box. A window will open so that you can edit that patch.
  5. Select "InputPort" from the "Add, ExternalPorts" menu.
  6. Change the name to "frequency". It must be spelled exactly correct because "frequency" has a special meaning to Wire.
  7. Set the Value to 400.0 and the Maximum to 3000.0. Click OK.
  8. Click in the TopPatch window. If you cannot find the Top Patch window, you can select "Parent" from the new patch's View menu.
  9. Notice that the frequency port has appeared as a port on the patch in this higher level window.
  10. Double click on the "patch" box again.
  11. Select "SquareOscillatorBL" from the "Add, Oscillators" menu.
  12. Move the modules apart.
  13. Connect the output jack of the "frequency" port to the frequency jack of the oscillator.
  14. Select "OutputPort" from the "Add, ExternalPorts" menu and click OK.
  15. Connect the output of the oscillator to the input of the new output module. You should see this:

  16. Select "Save As..." from the "File" menu.
  17. Save this patch in the file "MyPatch.xml".
Previous | Top | Next