OpenMusic Reference
Chapter 6. Data Types
Data type is an important concept in OM. OM function and class inputs will only accept certain data-types. For example, attempting to give a Note object a list of midics at the midic input will generate an error. This is because the midic input is typed to accept only numbers, and list is not a type of number. Some inputs can accept more than one data type, in which they case they select one of a set of internal tools called methods to deal with that particular data type.
The idea of data type is related to and overlaps somewhat with the concept of Classes. A class defines a data structure, which is itself an organization of data types used as a model for producing objects. The class Note, for example, contains information about the note’s pitch, volume, and midi channel. The ensemble of these elements is the class definition. When a class is used as input for a function or another class, the class is a data type. Indeed, some OM functions will only accept one kind of OM music object class as their data type.
For more on data types, see the glossary entry and the table in the Introduction to the Function Reference.