oef, it's a bit hard to get this module changed because of the header-problem we mentioned earlier.
Had to do quite a search again for the project that I build this in.
Remember, that, to change this module, you cannot embed it. You first need to save it to a folder of your own (so not in my sss-folder, but I assume you've already done this).
So once it's in your own folder that also contains the header file, you'll need to change the code without embedding the module and overwrite/save the module after you've changed something.
As you only need the amount of files in a folder,you'ld only need this part of the K-rate code:
if(inlet_findFree&&!ntrig){
stop=0;
ntrig=1;
}
else if((!inlet_findFree)&&ntrig){ntrig=0;}
while(!stop){
int i = cnt;
int i0 = i/10;
C[offset+2] = '0'+i-10*i0;
i = i0; i0 = i/10;
C[offset+1] = '0'+i-10*i0;
i = i0; i0 = i/10;
C[offset+0] = '0'+i-10*i0;
FIL FileObject;
FRESULT err;
err = f_open(&FileObject, &C[0], FA_READ | FA_OPEN_EXISTING);
if (err == FR_OK) {cnt+=1;}
else if(err!=FR_OK){stop=1;}
}
indeed, the "cnt-1" will show you the last file that is in use (so "cnt" is the amount of samples, where the samples start at index 000 up to index cnt-1)
for changing the prefix into an inlet, I'll need to experimentate a bit.. not sure if I can get it to work yet..