Special Characters: Data Delimiters


/ (slash)

The slash character (/) can be used optionally to separate p-field entries.  For example:
p7 33.2/14/77/.4/.4/.4
Additionally, the slash acts as a shortcut for repeating entries. The above example could be more efficiently entered as:
p7 33.2/14/77/.4///
N.B. The first slash is a separator and the second two denote repetitions of the ".4".


x (lower case "x")

If you want to include an entry a specific number of times, the "x" character is a shortcut for this.  For example:
p7 33.2/14/77/.4x3
will repeat the ".4" three times.


, (comma)

The comma can be used for those who like to separate things with commas. nGen will simply ignore commas when used (with the exception of the rhythmic input mode (rh) where commas denote ties).  For example:
p7 33.2,14,77,.4x3


<> (Data Queue)

nGen contains a special feature called the Data Queue. The data queue is simply a circular memory storage area that is available within each p-field.  After initial execution of the p-field, the contents of the data queue are added to the end of the p-field data and looped until the end of the note-list.  By default, if there is remaining time in the note list and the program has run out of p-field values, nGen will repeat the last value in a p-field until the end of the note list.

Looping a P-Field

In some circumstances, it may be desirable to loop an entire p-field until the end of the note list.  In this case you can put the entire p-field in the data queue.  Here's an example that loops an entire p-field:
i1 = 3 0 4 { p2 rh <8/16/16> p3 1 }  
  ; yes, you can format like this too!

N.B. A shortcut when looping an entire p-field is to just include the first "<" like this:

i1 = 3 0 4 { p2 rh <8/16/16 p3 1 }  
  

Here's the output:

i1   0.0000  0.500 
i1   0.5000  0.250 
i1   0.7500  0.250 
i1   1.0000  0.500 
i1   1.5000  0.250 
i1   1.7500  0.250 
i1   2.0000  0.500 
i1   2.5000  0.250 
i1   2.7500  0.250 
i1   3.0000  0.500 
i1   3.5000  0.250 
i1   3.7500  0.250 
e

The data queue may also be added to in an accruing fashion.  For example:

i1 = 3 0 -12 { p2 rh 8/<16>/16/<8/4>/1 p3 1 }
  

In this example, the queue is added to in two separate places.  Since only six events have been given and 12 will occur in the resulting note list, the data queue is called on to provided the "extra" material.

N.B. The data queue is a memory loop. In this case the loop is: ||16, 8, 4||.

i1   0.0000  0.500 
i1   0.5000  0.250 
i1   0.7500  0.250 
i1   1.0000  0.500 
i1   1.5000  1.000 
i1   2.5000  4.000 
i1   6.5000  0.250 ; starts the queue output here 
i1   6.7500  0.500 
i1   7.2500  1.000 
i1   8.2500  0.250 
i1   8.5000  0.500 
i1   9.0000  1.000 
e