Phrase Structure

In the classical note-list, each note is a separate entity, unrelated to any other notes. Legato effects must be achieved using overlapping notes or by embedding information in the parameters.

Scorefile noteTags can represent phrase structure. In addition to their function of matching noteOns and noteOffs, noteTags associate notes of a given phrase within a single part. Several noteOns (or noteDurs) with the same noteTag are interpreted as rearticulations within a single melody. No overlap results. Unlike in MIDI, scorefile noteOns do not have to be each matched with a noteOff. Any number of noteOns on the same noteTag are matched by a single noteOff. (The MusicKit does automatic conversion between scorefile and MIDI semantics when it reads or writes MIDI bytes or a MIDI file.) To solve the mixing problem, the MusicKit automatically remaps NoteTags when it reads a scorefile. This assures that note tags in several files will not collide, even if the files share noteTags.

Here is a scorefile fragment that produces a single line of 3 notes.

Example 8-1. Three Staccato Notes

guitar (noteOn,1) freq:c4; 		
t +.1; 		
guitar (noteOn,1) freq:d4; 		
t +.2; 		
guitar (noteOn,1) freq:e4; 		
t +.2; 		
guitar (noteOff,1);

In contrast, the next example produces 3 overlapping notes:

Example 8-2. Three Overlapping Notes

guitar (2) freq:c4; 		
t +.1; 		
guitar (2) freq:d4; 		
t +.2; 		
guitar (.2) freq:e4;

If noteTags are added to Example 8-2, it behaves like Example 8-1, again producing a single line of 3 notes. The durations, if they are longer than the time between notes with the same tag, are ignored.

Example 8-3. Three Stacatto Notes using Note-tags

guitar (2,1) freq:c4; 		
t +.1; 		
guitar (2,1) freq:d4; 		
t +.2; 		
guitar (.2,1) freq:e4;

Of course, you can combine the two approaches. Example 8-4 produces a line of 3 notes and 3 overlapping notes.

Example 8-4. Overlapping and Staccato Notes

guitar (noteOn,1) freq:c4; 		
guitar (2) freq:c5;
t +.1;
guitar (2) freq:d4;
guitar (noteOn,1) freq:d5;
t +.2;
guitar (.2) freq:e4;
guitar (noteOn,1) freq:e5; 		
t +.2;
guitar (noteOff,1);

As a final example, we add a second 2-note melody by using a different noteTag:

Example 8-5. Overlapping and Staccato Notes with Independent Melody

guitar (noteOn,1) freq:c4;
guitar (2) freq:c5;
guitar (noteOn,2) freq:g5;
t +.1;
guitar (2) freq:d4;
guitar (noteOn,1) freq:d5; 		
t +.2; 		
guitar (.2) freq:e4; 		
guitar (noteOn,1) freq:e5; 		
guitar (noteOn,2) freq:g5; 		
t +.2; 		
guitar (noteOff,1); 		
guitar (noteOff,2);