Skip to content

fillarray:a, fillarray_i

Additional fillarray variants.

Syntax

asigs[] fillarray asig1, asig2,...
iarray[] fillarray_i ival1, ival2,...
asigs[] = fillarray:a(asig1, asig2,...)
iarray[] = fillarray_i(ival1, ival2,...)

Usage

Some convenient variants of the Csound fillarray opcode for quickly populating arrays with values/signals. In the case of fillarray:a, this provides a quicker method than declaring an audio array and assigning each element. In the case of fillarray_i, this provides a method of generating an i-rate array using inline code. (Csound by default produces a k-rate array when used inline).

The limit of how many items can be placed in these arrays is determined by a call to the cslc private UDO's: _cslc_fillarrayoload for fillarray:a, _cslc_fillarray_ioload for fillarray_i The default in cslc is 5 items for fillarray:a, and 12 items for fillarray_i

Performance

These fillarrays are a series of overloaded UDO's generated after the initial performance pass by Csound. This means they must be used after cslc and any other initial orcestra code has loaded.


Outputs and arguments

for fillarray:a

asigs[] -- The resulting audio array

asig1, asig2,... -- Input audio signals.


for fillarray_i

iarray[] -- The resulting init-rate array

ival1, ival2,.. -- input values.

Example

See the example for patchsig.orc

fillarray
instr Sound101
  ;; Sound source

 ares pluck p4,p5,p5,0,1

send ares
endin

loopevent fillarray_i(n("Sound101"),0,0.75,0.5,0), genarray(0,14,1.333) - 7, euclidean_i(9,5,1),1,-1,0.83
;; generate events


EffectConstruct "flange", {{
ain = ains[0]

aout1 flanger ain, oscil:a(0.001,1/3)+0.003,0.4

aouts[] fillarray aout1
}},1,1
;; Flange effect


EffectConstruct "stereospread", {{
ain = ains[0]

aout1 vdelayx ain, oscil:a(0.01,0.3)+(1/3), 0.5, 1024
aout2 vdelayx ain, oscil:a(0.01,0.21)+(1/3), 0.5, 1024

aouts[] fillarray aout1, aout2
}},1,2,1
;; Stereo effect


patchsig "Sound101", "flange"
patchsig "flange", "stereospread"
patchsig "stereospread", "outs"
;; Source source to flange, flange to stereo effect, stereo effect to output.