The Phraser program is underpinned by a particular conception of the elementary formal structure of music. This conception is expressed through three interrelated types of objects: sequence, event, and phrase.
A sequence object is defined as a list of integers, for example [9, 2, 6] which has the following attributes:
An event is defined as a list of zero or more “pitches” (broadly defined as any any instructions about what to play, including, say, percussive timbres) with the following additional attributes:
A phrase is defined as a list of events, and corresponds roughly to the idea of a musical bar. Phrases are useful for conveniently grouping events which are related in some way, e.g., rhythmically.
Within the Phraser program, events and phrases are created by combining sequences. For example, the pitches used in an event may be the values from the set attribute of a sequence, and a phrase may be formed from a series of such events whose volume is determined by the set values of another sequence, and whose duration may be determined by the steps values of yet another sequence.
Any functions may be used to produce integer lists which are converted to sequences. Any functions may then be used to produce events, and then phrases, from sequences.
As events and phrases are produced further functions may display or play the results or if possible, print them out in score form.
More detail coming…
http://www.johnohagan.com