Forums > MaxMSP

[umenu] files change automatically. WHY?

February 13, 2013 | 4:34 pm

Hi,

I have a [umenu] populated with several .wav files from a folder. I play the audio with [notein]>[stripnote]>[pack 0 0]>[route 60]. BUT everytime i press the midi key(60) the sample changes to the next in the list.
Why does it do this? How do get it to NOT change automatically?
Thanks!


February 13, 2013 | 5:40 pm

tell [umenu] specifically which file you want to play with a number in a message box. [umenu] counts from 0.


February 13, 2013 | 6:27 pm

That works, but i want to be able to pick(via mouse click on menu) which file i want to play.
It still cycles through ALL of the samples….
Should it not cycle?


February 13, 2013 | 6:30 pm

Shouldn’t cycle if you tell it explicitly which one to play using the mouse or a message box. Check what’s coming out of [route] and be sure it’s not a bang, if it is, run it through a message box with a number. That shouldn’t cycle the umenu.


February 14, 2013 | 4:22 pm

Nope, i still cant get it to work right.
Could you have a look at the patch and see what could be wrong?

– Pasted Max Patch, click to expand. –

February 14, 2013 | 6:25 pm

Ok, nevermind i managed to get it working. I added a button between [route] and [umenu]. Not sure why i never tried it before.(noob)
I thought that [route] produced a bang automatically when sending output.
And now i’ve noticed in [route] ref/example there are [button]‘s everywhere. I just thought the [button]‘s where simply to show that the message was passed through.(noob)

@Nicolas Danet: Im not sure why you pasted that patch. Thank you for taking the time. :)
But i wasnt saying that using the [message] did not work. Selecting from [umenu] and playing the selected sample was the problem.
Anyways, its fixed! BANG! :)


February 14, 2013 | 7:50 pm

Yes it does! I read somewhere about it, then forgot…. Thanks.
So i take it using [select] (not having to use [button]‘s for bangs), this would lighten the CPU load very slightly?


February 15, 2013 | 5:53 pm

Hi,

But if im not mistaken, its not possible to load a series of different named files into a buffer without specifying the names physically? Right?


February 16, 2013 | 1:09 am

No, what i mean is. I have to document every file name and assign a number manually. Am i wrong?


February 16, 2013 | 1:16 am

One file per buffer~ and one file per sfplay~, but you can change them whenever you want. sfplay~ will start right away, buffer~ will take a split second to load small files and a bit longer for large ones. In your case I’d use sfplay~ and change the file targets.


February 17, 2013 | 12:30 am

I agree, i think sfplay~ is the one to go with. The CPU seems really ok. If this changes i’ll have a look into buffer~.
Just what do you mean by change the file targets? I dont understand.


February 18, 2013 | 12:37 am

Oh, just sending sfplay~ or buffer~ new filenames to open. sfplay~ uses "open", buffer~ uses "read".


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