[Contents] · [Home] · [Mail]

SALIERI Language - sequence (Object Type)

Objects of type sequence represent single voice musical scores, i.e., sequences consisting of notes and rests. Note, that there is no special object type for single notes (or rests) as these can be conveniently represented by sequences of length 1.

Constants of type sequence are specified using basic GUIDO notation, a music representation format designed along with the SALIERI Language. A basic sequence constant is a series of note descriptions which are seperated by white space (spaces, tabs and/or linebreaks) delimited by square brackets [...]. A note description is of one of the following forms:

where nn is a notename, optionally followed by an arbitrary number of accidentals and an integer denoting the register (octave); and dd/de is a fraction denoting the relative duration of the note, optionally followed by one or two dots.

Example: "a1/4" is a quarter note a' (440Hz), "c2/8." a dotted 8th c''.

There are three systems of notenames:

These systems can be arbitrarily used for defining sequence constants; however it is recommended not to mix them within the same sequence. The format for textual output of musical objects is affected by three system settings: noteNames for the system of notenames being used, dispTags for switching the display of additional information (besides pitch and relative duration) on and off, and seqDispFormat to switch between optimised (short) and full (long) display of register and duration information.

The accidentals are represented by "#" (sharp) and "&" (flat), since accidentals apply only to the note after the name of which the appear, there is no nead for representing a natural sign.

Example: "d##1/1" is a whole note d' double-sharp, "e&1/12" a triplet eigth note e' flat.

Rests are represented by the special notename "_" and may not be followed by accidentals. Otherwise, rests are treated as notes in most respects.

If enumerator de or denominator dd of the relative duration - but not not both of them - are missing for a note (or rest), the missing value is assumed to be equal to one.

If register or relative duration for a note are unspecified, the respective values are carried over from the last note. If this information is missing at the beginning of a sequence, register 1 and a duration of 1/4 is assumed. However, it is recommended to always completely specify the first note of a sequence.

Currently, besides pitch and duration, three more musical parameters are supported: intensity (I), tempo (M), and instrument (T). Intensity and instrument values are between 0 and 127 and refer to the velocity parameter and the instrument codes of the general MIDI specification. Tempo values are measured in quarters per minute (metronome units) and may be in the range between 1 and 255.

These parameters are set to default values (which are determined by the system settings stdIntens, stdTempo, and stdInstr) and can be modified within sequence constants before any note description using the format I=i, M=m, and T=t, where i,m,t are integer values as described above. The modified values carry until the next modification occurs or until the end of the sequence constant, respectively.

The basic operations on sequences include the serial functions length (#), + (concatenation), infix, ins, del, retro, and posNext. Index positions within sequences are numbered 1,2,3, and so on.

Besides these there is a large number of predefined musical functions which can be used to analyse and variate sequences or segments.

Please note: The parameters I,M,T will soon become obsolete when SALIERI supports the full GUIDO Music Notation Format for sequence and segment constants.

> sq := [c1/4 d e f g a h] % C major scale
> sq
Result= [ c1/4 d1/4 e1/4 f1/4 g1/4 a1/4 h1/4 ]
> sq + [c2/2]
Result= [ c1/4 d1/4 e1/4 f1/4 g1/4 a1/4 h1/4 c2/2 ]
> infix(sq, 1,3) + [_/2 f#/4.]
Result= [ c1/4 d1/4 e1/4 _/2 f#1*3/8 ]
> [c1/2 e/4 g c2*1]
Result= [ c1/2 e1/4 g1/4 c2*1 ]
> retro(it())
Result= [ c2*1 g1/4 e1/4 c1/2 ]
> set("dispTags","on") % system setting
> [ M=60 I=40 e&1/4 d e& I=60 f/2 ]
Result= [ I=40 M=60 T=0 e&1/4 d1/4 e&1/4 I=60 f1/2 ]

See also: segment, musical functions, predefined functions.

[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.