Forums > MaxMSP

dealing with large pools of samples

February 6, 2006 | 9:24 am

I’ve been using max for a little while and feel pretty comfortable doing most things but I’m really confused when it comes to handling/loading files and folders. There just isn’t much documentation on the subject.

So. What I’m trying to do is pretty simple. I want to be able to randomly play samples from a folder that contains a large pool of samples.

Here’s what I have so far:

max v2;
#N vpatcher 36 70 1206 919;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 119 183 57 9109513 relativepath;
#P newex 54 66 45 9109513 loadbang;
#P number 171 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 182 94 28 9109513 clear;
#P newex 144 61 48 9109513 bangbang;
#P user ezdac~ 852 733 896 766 0;
#P flonum 854 522 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 853 559 25 9109513 sig~;
#P number 799 563 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 798 526 15 0;
#P newex 849 611 72 9109513 groove~ funn 2;
#P newex 262 443 92 9109513 buffer~ funn 3000 2;
#P newex 262 417 62 9109513 prepend read;
#P button 535 203 51 0;
#P number 201 230 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 172 286 39 9109513 random;
#P user umenu 119 378 153 9109543 1 64 394 1;
#P button 176 436 15 0;
#P newex 29 565 83 9109513 filepath search 0;
#P newex 29 537 83 9109513 prepend set;
#P newex 187 182 57 9109513 prepend set;
#P message 29 505 197 9109513 C:/Noise/;
#P button 144 35 16 0;
#P message 54 123 50 9109513 types aiff;
#P newex 118 210 32 9109513 folder;
#P newex 144 121 79 9109513 opendialog folder;
#P connect 8 0 4 0;
#P connect 5 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 7 0;
#P connect 24 0 2 0;
#P connect 25 0 1 0;
#P connect 2 0 1 0;
#P connect 0 0 25 0;
#P connect 1 0 9 0;
#P connect 23 0 9 0;
#P connect 22 0 9 0;
#P connect 3 0 21 0;
#P connect 21 0 0 0;
#P connect 10 0 23 0;
#P connect 12 0 10 0;
#P connect 9 1 8 0;
#P connect 21 1 22 0;
#P connect 0 0 5 0;
#P connect 1 1 11 0;
#P connect 11 0 10 1;
#P connect 9 1 13 0;
#P connect 13 0 14 0;
#P connect 12 0 16 0;
#P connect 16 0 17 0;
#P connect 18 0 15 0;
#P connect 17 0 15 0;
#P connect 15 0 20 0;
#P connect 19 0 18 0;
#P connect 15 1 20 1;
#P pop;

Sometimes it works, sometimes it doesn’t.
Am I doing this right? I’m sure there are better ways to do this.

Also I can’t seem to get it to "see" wav files. Only aiff.

Any help would be greatly appreciated!


February 6, 2006 | 9:49 am

On around Feb 6, 2006, at 10:24, Christopher said something like:
> I’ve been using max for a little while and feel pretty comfortable
> doing most things but I’m really confused when it comes to
> handling/loading files and folders. There just isn’t much
> documentation on the subject.
>
> So. What I’m trying to do is pretty simple. I want to be able to
> randomly play samples from a folder that contains a large pool of
> samples.

Your patch worked reasonably well once I changed the ‘types aiff’
message to ‘types AIFF’.

Mac OS Finder File Types (as used by the folder object) are
case-sensitive. Even on Windows, most Max objects, for historical
reasons, use Finder File Types. (Case-insensitive) MS-DOS file name
extensions are mapped to Finder File Types in your init folder.

I would also be inclined to use sflist~/sfplay~ instead of buffer~s and
to use lp.tata instead of random, but those are different matters.

– Peter

>
>
————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html


February 6, 2006 | 12:58 pm

Thanks for the speedy response. I’ve managed to work out the quirks and everything seems to be working good enough. I’m still not sure what to do about the random triggering. I want to use a bunch of these "modules" to create non repeating polyphonic "explosioins" pulled from the sample pool. So I need something like [urn] but it has to have multiple outputs that don’t repeat. I’m not sure how I would do this in max. Is there an external/max object out there that could do this? I can’t find anything in the reference manual. I’m sure this is a pretty common procedure. Any help?

Thanks again!


February 6, 2006 | 4:18 pm


February 6, 2006 | 6:05 pm


February 7, 2006 | 12:03 pm

On around Feb 6, 2006, at 13:58, Christopher said something like:
> So I need something like [urn] but it has to have multiple outputs
> that don’t repeat.

Uzi->urn->spray will probably do what you want. You can build an
abstraction to filter repetitions (there are some examples of this in
RTC).

————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html


February 8, 2006 | 5:01 am

Well, I haven’t copied and pasted yet, but after scrolling through that patch, all I can say is, wow.


February 8, 2006 | 1:26 pm

fp,

Take look at the one of the patchers in the help file for sfplay~.
There is very specific info there re: multichannel sound files.

search the archives for -
"sfplay~ dropouts …" or
"soundfile playback randomly quits"

or click here -

http://tinyurl.com/bj5zz

and here

http://tinyurl.com/cgnjy

short version – increase your sfplay~ buffer sizes.


Michael Duffy

http://www.ruccas.org/index.php?Michael%20Duffy



FP
February 8, 2006 | 3:40 pm

yes i’ve seen this topics. but don’t find the right buffer size to put.
and i don’t know if i have to change only the buffer size of sfplay or if i have t change I/O vector size and signal vector size too.


Viewing 9 posts - 1 through 9 (of 9 total)