Store symbols with pattr

Jan 8, 2007 at 2:22pm

Store symbols with pattr

Is there a way to store symbols with pattr? I would like to store an
attribute message like

rect 0 0 320 240

So that selecting a pattr preset will write the message into a message box
that would be banged to forward the message to its destination.

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#29553
Jan 8, 2007 at 2:39pm

THe best way to store symbols in a pattr is to use the object in
unbound mode. You can then store any kind of data (int, float, list,
message, etc.). Prepend the message with “set” to format the contents
message box as you desire.

jb

Am 08.01.2007 um 15:22 schrieb Gary Lee Nelson:

> Is there a way to store symbols with pattr? I would like to store an
> attribute message like
>
> rect 0 0 320 240
>
> So that selecting a pattr preset will write the message into a
> message box
> that would be banged to forward the message to its destination.

#92605
Jan 9, 2007 at 3:30pm

I find only one reference to unbound mode in the manual. Can’t find an
example.

Here is a simple patch that illustrates my goal. Any suggestions?

#P button 477 86 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 574 130 271 196617 how do I store the message?;
#P message 504 113 60 196617 mess 1 2 3;
#P objectname mymess;
#P newex 504 85 32 196617 sel 1;
#P toggle 504 58 15 0;
#P objectname toggle;
#P user multiSlider 275 103 189 83 0. 127. 13 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P objectname multiSlider;
#P user dial 276 52 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120
120 120 225 225 225 0 0 0 0 0 0;
#P objectname dial;
#P user function 274 195 474 295 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 90.425529 0.8 0;
#X add 239.361694 0.293333 0;
#X add 420.212738 0.826667 0;
#X add 606.382935 0.826667 0;
#X add 739.361694 0.2 0;
#X add 861.702087 0.533333 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P objectname function;
#P message 201 95 45 196617 recall 2;
#P message 148 95 43 196617 store 2;
#P message 90 95 45 196617 recall 1;
#P message 37 95 43 196617 store 1;
#P newex 37 129 138 196617 pattrstorage jeff @greedy 1;
#X client_rect 10 59 650 299;
#X storage_rect 0 0 640 240;
#P objectname jeff;
#P newex 37 55 114 196617 autopattr @autoname 1;
#X prestore dial 1 0 117;
#X prestore function 21 0 1000. 0. 1. 90.425529 0.8 0 239.361694 0.293333 0
420.212738 0.826667 0 606.382935 0.826667 0 739.361694 0.2 0 861.702087
0.533333 0;
#X prestore multiSlider 13 0 17 27 44 80 113 127 124 111 82 49 33 22 5;
#X prestore toggle 1 0 1;
#P objectname u885000019;
#P comment 574 114 271 196617 how do I get autopattr to name this message
box?;
#P comment 577 88 100 196617 questions:;
#P comment 574 63 207 196617 I’ll set priority so this happens last.;
#P connect 12 0 16 0;
#P connect 12 0 13 0;
#P connect 8 0 4 0;
#P connect 7 0 4 0;
#P connect 5 0 4 0;
#P connect 6 0 4 0;
#P connect 13 0 14 0;
#P window clipboard copycount 17;

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

On 1/8/07 9:39 AM, “Jeremy Bernstein” wrote:

> THe best way to store symbols in a pattr is to use the object in
> unbound mode. You can then store any kind of data (int, float, list,
> message, etc.). Prepend the message with “set” to format the contents
> message box as you desire.
>
> jb
>
> Am 08.01.2007 um 15:22 schrieb Gary Lee Nelson:
>
>> Is there a way to store symbols with pattr? I would like to store an
>> attribute message like
>>
>> rect 0 0 320 240
>>
>> So that selecting a pattr preset will write the message into a
>> message box
>> that would be banged to forward the message to its destination.

#92606
Jan 9, 2007 at 3:51pm

On 9 janv. 07, at 16:30, Gary Lee Nelson wrote:

> I find only one reference to unbound mode in the manual. Can’t
> find an
> example.
>
> Here is a simple patch that illustrates my goal. Any suggestions?

Hi,

You just have to use [pattr] object. [autopattr] is a sort of “super
pattr” which find automatically any UI object with a name to bind to
it. [pattr] is able to “store” (it’s psto which store in fact) any
type of data (int/float/list/symbols).

Best,
ej

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 504 184 62 196617 prepend set;
#P comment 572 219 271 196617 the message was;
#P window linecount 0;
#P message 504 218 60 196617;
#P objectname mymess[2];
#P window linecount 1;
#P message 574 113 60 196617 mess 4 5 6;
#P objectname mymess[1];
#P newex 504 153 88 196617 pattr theMessage;
#X prestore 4 0 mess 4 5 6;
#P objectname theMessage;
#P button 477 86 15 0;
#P comment 667 138 271 196617 how do I store the message?;
#P message 504 113 60 196617 mess 1 2 3;
#P objectname mymess;
#P newex 504 85 151 196617 sel 1 0;
#P toggle 504 58 15 0;
#P objectname toggle;
#P user multiSlider 275 103 189 83 0. 127. 13 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P objectname multiSlider;
#P user dial 276 52 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221
221 120 120 120 225 225 225 0 0 0 0 0 0;
#P objectname dial;
#P user function 274 195 474 295 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 90.425529 0.8 0;
#X add 239.361694 0.293333 0;
#X add 420.212738 0.826667 0;
#X add 606.382935 0.826667 0;
#X add 739.361694 0.2 0;
#X add 861.702087 0.533333 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P objectname function;
#P message 201 95 45 196617 recall 2;
#P message 148 95 43 196617 store 2;
#P message 90 95 45 196617 recall 1;
#P message 37 95 43 196617 store 1;
#P newex 37 129 138 196617 pattrstorage jeff @greedy 1;
#X client_rect 99 628 739 868;
#X storage_rect 0 0 640 240;
#P objectname jeff;
#P newex 37 55 114 196617 autopattr @autoname 1;
#X prestore dial 1 0 117;
#X prestore function 21 0 1000. 0. 1. 90.425529 0.8 0 239.361694
0.293333 0 420.212738 0.826667 0 606.382935 0.826667 0 739.361694 0.2
0 861.702087 0.533333 0;
#X prestore multiSlider 13 0 17 27 44 80 113 127 124 111 82 49 33 22 5;
#X prestore toggle 1 0 0;
#P objectname u415000009;
#P comment 667 122 271 196617 how do I get autopattr to name this
message box?;
#P comment 670 96 100 196617 questions:;
#P comment 667 71 207 196617 I’ll set priority so this happens last.;
#P connect 8 0 4 0;
#P connect 7 0 4 0;
#P connect 5 0 4 0;
#P connect 6 0 4 0;
#P connect 14 0 17 0;
#P connect 13 0 14 0;
#P connect 12 0 13 0;
#P connect 12 0 16 0;
#P connect 13 1 18 0;
#P connect 18 0 17 0;
#P connect 17 0 21 0;
#P connect 21 0 19 0;
#P window clipboard copycount 22;

#92607
Jan 9, 2007 at 4:18pm

It seems that the best way to solve a problem is to read the manual, make
some tests, ask questions on the list, make a simple patch to illustrate the
problem and send that patch to the list. But the key part of solving the
problem is pressing the return key to send the patch. That key seems to
transmit wisdom from finger to brain. Indeed the solution is textedit (a UI
object) rather than message box. Here is my updated example.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 525 137 56 196617 route text;
#P button 500 160 15 0;
#P button 524 49 15 0;
#P newex 523 159 62 196617 prepend set;
#P user textedit 525 78 625 128 32896 3 9 This text edit box is unnamed.;
#P newex 524 252 56 196617 route text;
#P newex 524 283 32 196617 print;
#P user textedit 523 190 623 240 32896 3 9 This text edit box is unnamed.;
#P objectname messageBox;
#P user multiSlider 275 103 189 83 0. 127. 13 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P objectname multiSlider;
#P user dial 276 52 40 40 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120
120 120 225 225 225 0 0 0 0 0 0;
#P objectname dial;
#P user function 274 195 474 295 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 90.425529 0.8 0;
#X add 239.361694 0.293333 0;
#X add 420.212738 0.826667 0;
#X add 606.382935 0.826667 0;
#X add 739.361694 0.2 0;
#X add 861.702087 0.533333 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P objectname function;
#P message 195 52 45 196617 recall 2;
#P message 142 52 43 196617 store 2;
#P message 84 52 45 196617 recall 1;
#P message 31 52 43 196617 store 1;
#P newex 31 86 138 196617 pattrstorage jeff @greedy 1;
#X autorestore jeff.xml;
#X client_rect 10 59 650 299;
#X storage_rect 0 0 640 240;
#P objectname jeff;
#P newex 551 48 114 196617 autopattr @autoname 1;
#X prestore dial 1 0 31;
#X prestore function 21 0 1000. 0. 1. 90.425529 0.8 0 239.361694 0.293333 0
420.212738 0.826667 0 606.382935 0.826667 0 739.361694 0.2 0 861.702087
0.533333 0;
#X prestore messageBox 6 0 This text edit box is unnamed.;
#X prestore multiSlider 13 0 17 27 44 80 113 127 124 111 82 49 33 22 5;
#P objectname u259000005;
#P window linecount 4;
#P comment 635 78 100 196617 type new messages into this one (unnamed and
excluded);
#P window linecount 3;
#P comment 630 196 100 196617 this one gets remembered by pattr (named);
#P connect 13 0 12 0;
#P connect 2 1 14 0;
#P connect 14 0 18 0;
#P connect 16 0 14 0;
#P connect 18 0 15 0;
#P connect 11 0 13 0;
#P connect 15 0 11 0;
#P connect 17 0 11 0;
#P connect 7 0 3 0;
#P connect 6 0 3 0;
#P connect 4 0 3 0;
#P connect 5 0 3 0;
#P window clipboard copycount 19;

On 1/9/07 11:50 AM, “Emmanuel Jourdan” wrote:

> On 9 janv. 07, at 16:30, Gary Lee Nelson wrote:
>
>> I find only one reference to unbound mode in the manual. Can’t
>> find an
>> example.
>>
>> Here is a simple patch that illustrates my goal. Any suggestions?
>
> Hi,
>
> You just have to use [pattr] object. [autopattr] is a sort of “super
> pattr” which find automatically any UI object with a name to bind to
> it. [pattr] is able to “store” (it’s psto which store in fact) any
> type of data (int/float/list/symbols).
>
> Best,
> ej

#92608
Jan 9, 2007 at 5:25pm

Indeed this is very great wisdom, that only comes from many long
hours of maxing, often frustrating, but ultimately wondrous!

Thank you Gary for reminding us all – however experienced a maxer you
are, these times of travail followed by moments of profound
revelation are part of life itself.

Newbies, you are not alone in your agony!

Best

Lawrence (from deep in an intense period of new development………)

On 9 Jan 2007, at 16:18, Gary Lee Nelson wrote:

> It seems that the best way to solve a problem is to read the
> manual, make
> some tests, ask questions on the list, make a simple patch to
> illustrate the
> problem and send that patch to the list. But the key part of
> solving the
> problem is pressing the return key to send the patch. That key
> seems to
> transmit wisdom from finger to brain.

Lawrence Casserley – lawrence@lcasserley.co.uk
Lawrence Electronic Operations – http://www.lcasserley.co.uk
Colourscape Music Festivals – http://www.colourscape.org.uk

#92609

You must be logged in to reply to this topic.