ubumenu & sprintf question
Oct 11, 2009 at 7:38pm
ubumenu & sprintf question
1. I put samples inside folders, and the folders inside a main folder. For example ’808′ and ’909′ folders containing drum samples, inside a main ‘drum kits’ folder.
I used to do this operation using
It used to work fine, but today it doesn’t, and I don’t understand why. Comparing the outputs of the two ubumenus (the one for the mainfolder, and the one for the subfolders) using print objects give me exactly the same message in the Max window, but the second ubumenu doesn’t understand it when it comes out of the sprintf object? The only explanation I can imagine would be that sprintf gives a special format to the message, so that ubumenu cannot read it anymore??
Here is the test patch:
Oct 11, 2009 at 8:27pm
your patch looks like it’s working here..
this can be fixed by using “symout” argument with sprintf, so you’re sure that it always outputs a symbol (it will add quotes if needed).
not sure if this is related to your problem though
Oct 11, 2009 at 8:32pm
thanks a lot for the reply. you say it’s working on your machine? here is what i do:
– open the patch
btw: no spaces in the names of the subfolders here
Oct 11, 2009 at 8:37pm
what is really strange for me is that if i perform the operation twice
1) normally, as described above
–> the messages sent to the first ubumenu and the second one are exactly the same. how come it doesnt work??
Oct 11, 2009 at 8:58pm
this is weird because it works fine here..
otherwise, you might want to simplify your patch and see if it’s still not working ?
I would use “concatenate” prefix-mode for the umenu that selects the subfolder (as in the example patch below), or use the “folder depth” option (but it can get nasty if you have a lot of files…)
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
Oct 12, 2009 at 8:58am
thanks a lot, if the same patch works fine for you it means it’s a bug somewhere in 4.6.3, and that i can stop trying. thank you very very much for testing it.
i don’t have max5 so i think i cannot use the patch you posted, but i’ll try with the demo or just have a look at concatenate prefix mode. the problem is the amount of soundfiles, this is why i need to split in two separate ubumenus.
best, thanks again
Oct 12, 2009 at 10:20am
ah sorry for the format.
here is the patch again (working here on 4.6.3):
#P window setfont “Sans Serif” 9.;
Oct 13, 2009 at 4:34pm
sorry i couldn’t work on music the last two days, i just tried your patch. it’s not only 1000 times more elegant and efficient, it also works fine on my computer. i wonder how i possibly missed this function of ubumenu
and if mine works fine on yours, it means i must have a problem with some externals (duplicates whatever), its also good news.
thanks a lot!! im very happy right now
Oct 13, 2009 at 7:03pm
i think found the gost: if the ubumenu has been set with a prefix_mode 2 command (for example), then it gets saved with the ubumenu object, although it cannot be seen in its inspector window.
there was a command like this somewhere in the main patch, and it got stored inside the ubumenus objects. what i still don’t understand is why the patch as text works on your computer and not on mine (i tried to open the text myself, it still doesn’t work).
anyway. the patch is too old, thats the problem. need to rewrite everything, tough life.
You must be logged in to reply to this topic.