| 1 | ||
|
Editor: roman
Time: 2007/09/10 02:45:54 GMT+0 |
||
| Note: | ||
changed: - <style type="text/css"> hr.dotted { border-style:dotted;border-right:0;border-bottom:0;border-left:0; } div.column { float:left;width:60%; } div.column2 { float:left;width:34%; } div.line { margin-right:10px;padding-right:10px;border-right:1px solid gray; } </style> the netpd global variables this page is a list of all global variables provided and used by netpd. please help me complete this list, since i probably forgot to mention some of them. <hr> <h3>variables provided by [chat]</h3> 's netpd-broadcast' -- every message that is sent to *netpd-broadcast* is broadcasted to every netpd client, thus every client will receive that messeage (including the sender of the message). <p></p> 's netpd-send' -- *netpd-send* is used to send a message to a specific client. the first element of a message sent to *netpd-send* must be a number, which is the socket-number of the receiver. if a message '4 one two three' is sent to *netpd-send*, the client with the socket number 4 will receive the message 'one two three' (the first element, the socket number, will be stripped off). <p></p> 'r netpd-receive' -- through *netpd-receive* every message will be received, that was either sent by *netpd-broadcast* or *netpd-send*. note: a possible *list* selector of an incoming message will be stripped off, e.g. when 'list one two' was sent, only 'one two' will be received. use the object ![list] to re-add the list selector. usually incoming messages get parsed by a ![route] object, that is why it was decided to do so. <p></p> 's netpd-getstatus' / 'r netpd-status' <sup>1</sup> -- gives you the connection status of [chat]. '1' when connected and '0' when disconnected. <p></p> 's netpd-getsocket' / 'r netpd-socket' <sup>1</sup> -- gives you your socket number (float). <p></p> 's netpd-getdsp' / 'r netpd-dsp' <sup>1</sup> -- gives you the actual dsp status of your pd. '1' for dsp on and '0' for dsp off. <p></p> 's netpd-getname' / 'r netpd-name' <sup>1</sup> -- gives you the nick name, that is actually used (symbol). <p></p> 's netpd-getwelcome' / 'r netpd-welcome' <sup>1</sup> -- gives you the welcome message, that is actually used (symbol). <p></p> 's netpd-getdomain' / 'r netpd-domain' <sup>1</sup> -- gives you the domain name of the currently used netpd-server (symbol). <p></p> 's netpd-getport' / 'r netpd-port' <sup>1</sup> -- gives you the tcp port number of the port, that is actually used to connect to the netpd-server (float). <p></p> 'r chat-message' -- can be used to receive the talk from [chat]. it gives you message of the format 'nickname chatmessage socketnumber' (without list selector).<br> this naming of this variable is incostistent and subject to be changed in the future. also the message format will probably change. <p></p> <hr class="dotted"> <div class="column"> <sup>1</sup> in order to get a value through 'r netpd-something', you need to send a 'bang' to 's netpd-getsomething'. you may want to buffer the response in order to avoid unwanted triggering. probably a picture explains better, what is meant here: though in other cases, when values are actualized, retriggering might be desired. </div><div class="column2"> <img src="get_a_netpd-variable.png"> </div> <br style="clear:both;" /> <hr> <h3>variables provided by [creator]</h3> 's cr.open' / 'r cr.open.done' -- these are used to netload [netpd-patches] by message. 's cr.open' accepts messages with one symbol atom (with or without the symbol selector), whereas the symbol atom represents the name of the patch (without the extension .pd), that should be loaded. if the requested patch is not existent, an error message is printed to the console.<br> since [creator] does not open patches immediately, but with a minimal period in between, it might be important for state restoring tool to know, when it is save to send state data for a certain patch, so that the state data is not sent before the patch is open. therefore 'r cr.open.done' was introduced. it outputs the name of a patch, that was opened through 's cr.open', in the format 'symbol patchname', as soon as it is save to send the state data. <p></p> 's pd-cr.singletons' -- creator has a subpatch called 'pd cr.singletons'. its goal is to provide a place where singletons can be created. send a message 'obj 10 10 nameofyoursingleton' to 's pd-cr.singletons', whereas 'nameofyoursingleton' is an abstraction that should be only instantiated once. note: creator doesn't check, if a singleton abstraction is already created or not. this means, it is the duty of the customer patch to make sure, that a certain singleton abstraction doesn't get instantiated twice or more. <p></p>
this page is a list of all global variables provided and used by netpd. please help me complete this list, since i probably forgot to mention some of them.
s netpd-broadcasts netpd-send4 one two three is sent to netpd-send, the client with the socket number 4 will receive the message one two three (the first element, the socket number, will be stripped off).
r netpd-receivelist one two was sent, only one two will be received. use the object [list] to re-add the list selector. usually incoming messages get parsed by a [route] object, that is why it was decided to do so.
s netpd-getstatus / r netpd-status 11 when connected and 0 when disconnected.
s netpd-getsocket / r netpd-socket 1s netpd-getdsp / r netpd-dsp 11 for dsp on and 0 for dsp off.
s netpd-getname / r netpd-name 1s netpd-getwelcome / r netpd-welcome 1s netpd-getdomain / r netpd-domain 1s netpd-getport / r netpd-port 1r chat-messagenickname chatmessage socketnumber (without list selector).r netpd-something, you need to send a bang to s netpd-getsomething. you may want to buffer the response in order to avoid unwanted triggering. probably a picture explains better, what is meant here:
though in other cases, when values are actualized, retriggering might be desired.
s cr.open / r cr.open.dones cr.open accepts messages with one symbol atom (with or without the symbol selector), whereas the symbol atom represents the name of the patch (without the extension .pd), that should be loaded. if the requested patch is not existent, an error message is printed to the console.r cr.open.done was introduced. it outputs the name of a patch, that was opened through s cr.open, in the format symbol patchname, as soon as it is save to send the state data.
s pd-cr.singletonspd cr.singletons. its goal is to provide a place where singletons can be created. send a message obj 10 10 nameofyoursingleton to s pd-cr.singletons, whereas nameofyoursingleton is an abstraction that should be only instantiated once. note: creator doesn't check, if a singleton abstraction is already created or not. this means, it is the duty of the customer patch to make sure, that a certain singleton abstraction doesn't get instantiated twice or more.