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.

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 :

  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.

Contents :

Navigation : Previous | Next