patch works with manual bang, but not with loadbang. patch attached. please help

May 23, 2013 at 4:19pm

patch works with manual bang, but not with loadbang. patch attached. please help

Here I have a simple patch that should load a midi port from a file (using pattrstorage) on loadbang.
After loadbang, there is [t b b]. The 2nd b (that happens first) bangs the midiinfo to fill the [umenu]s.
The 1st b (that happens 2nd) does tell pattrstorage to read a file and recall value from it. That 2nd part is also connected to a button, using which everything works perfectly.
Thing is, that when [loadbang] is supposed to do it (instead of manual button click) it just doesn’t happen properly – the umenus are not updated from the pattr.

please, can somebody show me what am i doing wrong?

below is the patch. you will need to set some value and SAVE IT (there is button for that).
then try to reload and you will see that value is not reloaded. then try to click the “restore” button and you will see, that manually banging the same branch of objects which loadbang bangs, the umenu is loaded well.

<code>

– Pasted Max Patch, click to expand. –

</code>

#250532
May 23, 2013 at 8:58pm

You might try inserting deferlow objects at various places.

#250548
May 24, 2013 at 12:13am

I’d make sure the preset file is loaded before calling a preset. Here is how I generally do it:

<pre><code>

– Pasted Max Patch, click to expand. –

</code></pre>

#250552
May 24, 2013 at 3:43am

CHRIS MUIR: Thanks. I will try the deferlow voodoo if everything else fails. (I prefer to understand what is really going on and what am I doing wrong and learn from it )

PATRICK DELEGES: Thanks. I see what you are doing. So possibly the file is not loaded fast enough during loadbang (many things happening) and instead of [t b b] sequencing I should wait with the 2nd bang until pattrstorage tells me that it’s really loaded already. Going to try! thanks

#250565

You must be logged in to reply to this topic.