Folks-
I've got a comma separated text box with a list of paths to sample files feeding the 'List Comma Text' input of a sampler. Rather than use the 'next sample' or 'random sample' commands, I want to be able to use a formula to randomly select the next sample to play and choose its file number. This would be based on the total number of files that are loaded to the sampler and each time the app refreshes, the file count will change. So my question is this -
Does anyone know if there is any way to get an item count from the list text object?
- OR -
Does anyone know if there is a way to get the number of files that are loaded to a sample player?
Thanks,
- CCQ -
Sampler File List Item Count
-
CleverConQueso
- Member
- Posts: 190
- Contact:
it's possible to get the nb of elmts of a commatext via a simple a script .
im away from usine so i ll do it by memory, sorry if doesn't work at first, i can't check.
i ll check when back home. copy and paste to a new empty sript and compile.
im away from usine so i ll do it by memory, sorry if doesn't work at first, i can't check.
i ll check when back home. copy and paste to a new empty sript and compile.
Code: Select all
////////////////////////////
Var Commain,NBITEMS : tparameter;
Var SL1: Tstringlist;
//////////////////////////////
Procedure Init;
Begin
commain:= CreateParam('commain',Pttextfield);Setisoutput(commain,false);
NBitems:=CreateParam('NBitems',ptdatafield);SetisInput(NBITEMS,false);
SL1:=Tstringlist.Create;
SL1.commatext:=' ';
END;
///////////////////////////////////////////////////////////
Procedure Callback (n:integer);
BEGIN
SL1.commatext:= getstringvalue(COMMAIN);
setvalue(NBITEMS,SL1.count);
END;
/////////////////////////////////////crazy boy !
yes, works fine
yes, works fine
-
CleverConQueso
- Member
- Posts: 190
- Contact:
Holy crap! That's awesome and works great. Thank you so much.
-CCQ-
-CCQ-
Who is online
Users browsing this forum: No registered users and 15 guests
