Recherche Google
OpenMusic 6 – User ManualOM Objects > OM Basic Objects > Dialog Items > List Selection Boxes
previous pagenext page

Controlling Values (2) : List Selection Boxes

Features

Dialog items include two list selection boxes :

  • single-item-list-box
  • multi-item-list-box .

List selection boxes allow to select one or several items among a list, return and use it/them in downstream computations.

They have one input and one output :

  • "item" input : a list of atoms or strings
  • the output returns the selected item(s).

To set the content of a box :

  • click or SHIFT click on the box's input,
  • enter a list of items in the argument's data box.

When evaluated, the box returns the selected item.

Note that inverted commas are not compulsory.

Boxes

Single-Item-List-Box

The single-item-list-box allows to select only one item at a time.

To select an item,

  1. press b to lock the box,

  2. click on an item.

Multi-Item-List-Box

This box allows to select one or more items, which are returned as a list.

The multi-item-list-box is edited and used as as single-item-list-box .

  • To select consecutive items or all the items of the box, SHIFT click on the items or click and drag them.
  • To select independent items, Cmd click on them.
Default Item

By default, the first item is selected and reset :

  • when the box is assigned a new list of items,
  • if the box is not locked.

A Musical Application : Building a Triad

The "chord builder" patch creates a minor or major triad, with three types of interface boxes : the multiple-items-list-box, the button-box, the check-box.

  • On the left, the build note! button box calls a series of boxes :

    1. Two list-boxes allow to choose the name of a note, from A to G, and an octave index, from 1 to 5.

    2. A list containing the resulting reference is created with three lisp functions and returned to n->mc1 , which returns a midicents value to a note box.

  • On the right, the build chord! button box calls another series of boxes :

    1. The minor check box is checked.

      It returns "true" to OMIF, which returns 300, the midicents value of a minor third. If it isn't checked, OMIF returns 400, the value of a major third.

    2. The value of the initial note is added with 300 and 700 to build a minor triad, via two om+ boxes.

    3. The resulting values are gathered by x-append into one single list and returned to a chord box.

  1. n->mc

    Converts a note name or list of note names into corresponding midi cents values. The reference is the standard notation, where the medium C (6000 midicents) = C3.

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