arpi
Generates a series of score events, repeating a series of notes for a duration.
Syntax
Usage
arpi is loosely modelled as an arpeggiator. Given an array of values representing a score event (p-fields), arpi generates a series of additional score events spread by time and pitch intervals.
Additional arrays and parameters control p-fields in the generated events. Pitches are assumed to be indices into gi_CurrentScale. Onsets and durations are in beats and will be modified by current tempo.
Arguments
i/kevent[] -- An array with values holding p-fields for a score event. kevent must have at least five p-fields representing the following values: p1=instrument, p2=onset, p3=duration, p4=amplitude(0-1), p5=pitch
Additional pfields up to p11 are optional (lenarray(kevent) <= 11)
P-fields
For p1 i/kevent[], the number of the instrument is required (rather than the name). For named instruments, it is recommended to extract this using n (e.g. n("piano")).
For p2 and p3, note that onset time and duration are assumed to be in 'beats' rather than seconds.
For p5. pitch is assumed to be a scale degree index in gi_CurrentScale.
i/kintervals[] -- Scale degrees calculated as intervals from p5 in kevent (kevent[4]). The pitches of generated events will cycle repeatedly through this array for idur duration.
i/konsets[] -- Relative onset time intervals between events. The value for the onset time cycles repeatedly through this array for idur duration.
i/kamps[] (optional) -- Amplitude multipliers. The generated events taken their amplitude from the value in kevent p4 (kevent[3]). This value is multiplied by the multipliers in this array. The selected multiplier value cycles repeatedly through the array for idur durations.
idur -- Overall duration for the generated events
ievdur (optional, default=karray p3 (karray[2])) -- overrides the p3 in i/kevent[2].
ionsetfac (onsetfac, default=1) -- compresses or stretches the onset times of the arpeggiation. Default is 1 (no compression/stretch).
A negative ionsetfac reduces or expands onset times throughout the duration of an arpeggiation with the effect of an accelerando or decelerando.
iampfac (optional, default=0) -- Applies a power curve to p4 values in generated events throughout the duration of the arpeggiation.
Positive values reduce p4 to zero (e.g. fade out).
Negative values increase p4 from zero to 1 (e.g. fade in).
Steepness of the fade curve increases as abs(iampfac) gets greater.