OpenMusic

Visual Programming | Computer-Assisted Composition

Navigation : Previous Next

Using the Interface Boxes : Example

Building a Triad with an Item-List-Box, a Button-Box, and a Check Box

A minor or major triad is created with three interface boxes : multiple-items-list-box, button-box, and check-box.

  1. The minor check box is checked and returns “true” to OMIF,

  2. OMIF returns 300, which makes a minor third. If it isn’t checked, OMIF returns the value of a major third - 400 mc.

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

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

Note: As n->mc returns a list , we have to use a chord box, and not a note box, to create the root of the chord. A note box doesn’t accept lists, but atoms.

Choosing and Listening to a Sound with a Pop-Up-Menu Box

Arguments of the Pop-Up-Menu:

This pop-up box returns two types of results :

About MIDI Functions in OM:

Inside the Lambda Patch:

A sequence function evaluates two elements successively :

  1. The pgm-out function sets the MIDI program from the midichannel index value passed as argument to the lambda patch.

  2. The play function plays a note with the chosen midi sound.

The action programmed in the patch is executed when an item is selected in the pop-up-menu box.

References :

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.

Contents :

Navigation : Previous Next