Hey Kevin,
If you collect the samples in an array, for example using the 'fileNamesInSameDirectory' argument you can use the 'size' argument on that array to get the number of elements in it. for example:
{'sample.aif' fileNamesInSameDirectory size}
returns 8 (if there are 8 samples in the same folder). You can use that in a STGC to send it via OSC.
If you're after controlling which sample should be played via OSC you can use:
!osc_Index * {'sample.aif' fileNamesInSameDirectory size}
in the Index field of the Multisample and send an OSC message in the range 0-1 to go through the samples.
If you're not collecting the samples using fileNamesInSameDirectory you can still create an array of the samples by using:
sampleArray := #('sample1.aif' 'sample2.aif' 'sample3.aif' ).
and so on. Also you can concatenate arrays using ',':
{('sample.aif' fileNamesInSameDirectory), sampleArray}.
Does that help?
not sure about sending the names as this requires sending OSC-strings...
Best,
Gustav