Re: [Csnd] [EXT] CSOUND Digest - 15 Jan 2024 to 16 Jan 2024 (#2024-14)

Dear CSounders:

A student of mine, Christopher Poovey, developed a couple of array manipulation UDOs while doing some work for me a couple of years ago. One UDO rotates an array and the other morphs between two arrays:

opcode arrrot, k[], k[]k ;rotate array

karr[], kshift xin

isize = lenarray(karr)

kout[] init isize

kcount = 0

until kcount >= isize do

kout[kcount] = karr[wrap(kcount+kshift,0,(isize-1))]

kcount += 1

od

xout kout

endop

opcode arrmorph, k[], kk[]k[]i ;morph two arrays

kfact,k1[],k2[],isize xin

kout[] init isize

kout = k1*(1-kfact) + k2*kfact

xout kout

endop

–Jon

Jon Christopher Nelson, Professor

Division of Composition Studies

UNT College of Music

940-368-9080

Jon.nelson@unt.edu