Cabbage Logo
Back to Cabbage Site

UDO: LoadSampleBank - ftsamplebank backup UDO

In lieu of a fix for ftsamplebank (in next version of Cs 6.14), here’s and UDO which does a similar thing

opcode LoadSampleBank, 0, S[]i
   SFiles[], iFirstTabnum xin
   iCnt init 0
   #define FTGEN(NUM) #
    giTab$NUM ftgen iFirstTabnum+$NUM, 0, 0, 1, SFiles[$NUM], 0, 0, 0
   #
   while iCnt < lenarray(SFiles) do
        $FTGEN(iCnt)   
        iCnt += 1
    od
endop

and usage

gSFiles[] directory SFilepath, ".wav"
LoadSampleBank gSFiles, 100

The funny thing is that I use the same code I wrote for the directory opcode in the load sample bank one. Oh well, at least we know part of the chain works!

haha, it must be missing for me in that build, I can’t think why else (from my point of view of not knowing any better at least!)