Recherche Google
OpenMusic 6 – User ManualAdvanced Visual Programming > Abstraction > Application > Inputs / Outputs
previous pagenext page

Inputs / Outputs

Making Connections to the Outside

Once a patch is added in another patch editor, it can be used as an abstraction1.

An abstraction can have as many inlets and outlets as necessary to establish connections with other boxes.

  • Values are returned by the inlets from the outside to the sub patch .
  • Results of computations are returned by the outlets to the outside.
Adding Inputs and Outputs

Inputs and outputs are added with a click on the and arrow icons in the open patch.

To add the desired number of inputs and outputs, click as many times as necessary on the corresponding icons. Inlets and outlets will appear on the sub patch icon.

Connections to other boxes in the patch editor can then be created.

Naming Inputs and Outputs

To rename inputs and outputs :

1. double click on the name of the icon : ,

2. edit it and validate : .

This has no effect on the input or output's behaviour.

More Information about Input Boxes Edition :
Viewing Inlets and Outlets

Inlets and outlets of blue patches are not visible in the workspace.

To display information about inputs and outputs names, as well as a possible documentation, keep Cmd pressed while hovering the mouse over them.

Example : Using a Sub Patch as a Functional Abstraction

Once a patch is added one or more inputs and connected to other items, it can manipulate variables like a function. These variables are taken as arguments by the function – functional abstraction – that results from this process. Data returned by the abstraction output(s) can also become variables for other boxes or for other functional abstractions.

A "Large" Program

The following program is quite developed. It could be used as a subordinate and coherent element in a more important patch. We will integrate it in a patch to use it as an abstraction.

Building successive chords from a chord multiplication.
Building successive chords from a chord multiplication.
Adding Inputs and Outputs to the Patch
  • Two input boxes are substituted to the parameters of the OMLoop box.
  • One output box is substituted to the chord-seq to return the result of the computation to the outside of the patch.
Functional Call of the Patch

The patch is dropped into another patch editor.

  1. Values can now be sent to the inputs of the OMLoop box from the outside of the patch, via the patch inputs.

    • The resulting data can also be returned to other boxes and be manipulated.
    • The result of the computation can also be materialized by an external chord-seq box, via its "midics" input.

Hence, the patch behaves like a function belonging within a higher-order program.

  1. Functional Abstraction

    A functional abstraction is a program whose some elements can become variables, via connections to the outside environment. Hence, this program must have inputs or outputs that can be connected to external variable elements. The resulting functional abstraction can then be embedded into other programs to be used as a functional component.

previous pagenext page
About...(c) Ircam - Centre PompidouMade with Scenari