First time here? Check out the FAQ!
x

How to add individual samples and a folder of samples to one 'samples' parameter field?

0 votes
826 views

Hi all,

I'm making a sound and wish to individually put samples and a folder of samples in the same parameter field like in the image below but this way doesn't work. I've tried to concatenate the whole field in curly braces and add a comma between the individual sample listings and the final code in curly braces but that doesn't do it either. I know I can evaluate the sampleFileNamesInSameFolder and get them individually listed but I'm wondering if there's a way to do it without that so as to be slightly more convenient and avoid a very long samples parameter field? 

Thanks for any thoughts or suggestions!

asked Jun 23, 2019 in Capytalk & Smalltalk by will-klingenmeier (Adept) (1,270 points)
edited Jun 24, 2019 by will-klingenmeier
Is that a vertical bar just before {'pottery break...?
That's where my cursor happened to be during the screen grab. It's just a space.

2 Answers

0 votes

Hi Will,

I would have thought that would work - at least the general approach you're taking. The Mulitsample is expecting an array of file names in the Sample parameter. The file names should be space-seperated. If file names need "calculating" they need to be enclosed in curly braces, like {'pottery break 1.aif' sampleFileNamesInSameFolder} 

I've just tried the following set and it works for me in the Multisample Sound:

 

Maybe one of your files names has a typo in it? Try it with a smaller set and see if that works. I think it should. 

Does the last file in your list, before 'pottery break...' have a comma in the name? ("...Glass:Bow C4,2.aif"). Should that comma be there?

answered Jun 24, 2019 by alan-jackson (Virtuoso) (15,840 points)
I'll give it a shot Alan and let you know.
Interesting. Although it's cleaner I wouldn't think those line separations would matter? It's not a typo on my end at least- that's the name of the file.

I've just tried my sound again and the samples are sonically there- I'm wondering if it was always working to grab the samples and I just thought it wasn't because when I control click on the disk to get the list of samples I get an error (screen grab posted above). Control clicking is always a way I double check that things are working. Alan, what happens when you control click the disk icon with that code in your parameter field?
I get an error too, see second answer for screen shot.
The error with Control+click or Shift+click on the Disk button has been fixed for the next update. Thanks for pointing it out!
That's great news! Thank you.
0 votes

Hi Will,

If I control-click on the disk icon I get "Error: Strings only store Characters" with the following stack trace:

 

 

But the Sound does work ok when I run it. 

answered Jun 24, 2019 by alan-jackson (Virtuoso) (15,840 points)
Thanks for checking on that Alan. The important thing is the sound is working- I guess no control clicking to see the list of files in these cases.
The error with Control+click or Shift+click on the Disk button has been fixed for the next update. Thanks for pointing it out!
...