random names of a buffer

Aug 4, 2010 at 9:46pm

random names of a buffer

Hi everyone, i am making a simple sampler for live in max and i am a bit new in m4l so i need some help. I almost made a usable version out of it but the only thing is when i load it to different tracks in live it always works with the same sample. To make myself clear it only plays one sample because i want to use it for drum samples and i want to process them separately afterwards. So i use one common buffer for the patch in which i load a sample with the dropfile object and i play it with groove at different speed. So i think he problem is with the name of the buffer cause it always stays the same no mater how much of them i open. I tried number don’t work, i also found somewhere that putting a #0_name will generate a name with a random number in front like 345_name but that doesnt work either.
Someone has an idea?

#51645
Aug 4, 2010 at 9:53pm

i was going to suggest something else as well, so as to avoid being ‘the js guy,’ but…umm, javascript seems to be the best bet.

#185328
Aug 5, 2010 at 9:27am

I tried something similar to a patch I am working on and I the same problems. I have some ideas that maybe can help:

By not adding the _name to 0# because it seems that those numbers aren’t generated when you write it like 0#name.

Maybe set the buffer name to the file name? By connect the dropfile with a set message to the buffer and groove object.

I tried something with connecting a loadmess and the combine object but it seems that those 0# generated numbers are random for what I wanted to do.

– Pasted Max Patch, click to expand. –

all the best,

#185329
Aug 5, 2010 at 10:02am

Well i forgot to write that but i tried that already, to get the path name from the drop file and give it that name to the buffer and the groove and rest, but probably is not doing that in the right order, maybe the sample is being loaded first in the buffer and it gets renamed afterwards so it deletes the buffer, and after it doesn’t work!

#185330
Aug 5, 2010 at 10:05am

Thanks griotspeak but i wouldnt know where to start with javascript :)

#185331
Aug 5, 2010 at 10:13am

huh strange. but the example I posted with the replace and set message works okey or not? I tested it and it works fine with me. Or do you need something else in your patch?

#185332
Aug 5, 2010 at 1:14pm

“also found somewhere that putting a #0_name will generate a name with a random number in front like 345_name but that doesnt work either.”

that should work (or setting it on startup with [loadmess set #0_] )

btw, what they do in the tutorials/exmampls is using —something these “—” have a unique value for every device

#185333
Aug 5, 2010 at 5:08pm

in the patch I wrote 0# instead of #0.. I should pay more attention when I am doing stuff..

@ timo What are the tutorials you’re talking about?

#185334
Aug 5, 2010 at 5:14pm

what about the — ?
e.g [buffer~ ---hey]

doesnt this work too?
i think the three -’s will be replaced with random numbers
iam not sure tho
well, if you open your sampler 999 times, 2 will def. have the same sample…
might be good to know if you are aaron or richard.

#185335
Aug 5, 2010 at 7:52pm

 
the trick is to set the random names from outside the buffer.
 
[loadbang] – [t #0_buffername] – [prepend set]

now you can connect this to both, a buffer AND (for example) a [play~] object,
and in each max4live instance, patcher instance, or pluggo plug-in there
are patcher specific unique names now.

you can also go one step further and use a simple abstraction which loadbangs
a #0 style number for maximum flexibilty.

-110

#185336
Aug 6, 2010 at 12:42pm

@marinus : look at some patches that come with m4l, they are using — for receive and buffer names, it’s max’s simple way of dealing with scope, see also http://cycling74.com/forums/topic.php?id=26890

#185337
Aug 10, 2010 at 10:34am

okey that’s pretty easy! will this —name also work when you just use max as standalone when you run multiples of the same patch?

#185338
Aug 10, 2010 at 12:26pm

— simply doesn’t work outside of m4l.

anyway, does this cover you?

`

– Pasted Max Patch, click to expand. –
#185339
Aug 10, 2010 at 1:09pm

thnx man.

I have some other problems with file handling just for the old fashioned max. I will post a new topic when I have cleared my question about with the patches I tried. Maybe you can take a look at it. It’s about loading audio files into buffers inside a poly object, storing information in a coll, saving and to load the same files into the buffers again.

#185340
Aug 18, 2010 at 11:35pm

—name is the way to go in M4L. However if you want to use this in a stand-alone you use 0#_name.

Load this patcher in multiple tracks in M4L and you will see that every instance is different from the other and no sampes are shared.

– Pasted Max Patch, click to expand. –
#185341
Mar 20, 2013 at 3:09am

Hey guys, I was having no luck with the various approaches on here and different threads, then I came across: zl scramble, which made making random letters a breeze

– Pasted Max Patch, click to expand. –
#185342

You must be logged in to reply to this topic.