hi,
i just undertanded how to build dynamicly (thnx CK) in PD, but... (win2k, pd0.35-23)
when this works: [obj 30 10 toggle 10 1 1t-s 1t-r empty 0 0 0 10 1 2 3 0( (makes a toggle with "all" properties set)
and this don't: [obj 10 10 vslider 32 64 1 32 1s-s 1s-r empty 0 0 0 10 1 2 3 0( (makes a slider but no properties set)(am i missing something?)
is there any comprehensive info on dynamicly building and setting properties toggles,slider...etc. ? (creation arguments would fit my needs 4 now)
thnx -andre ps. dyntest02.pd is if i had a typo in this mail...
the arguments for the guis are slightly different. the slider has width, height, bottom, top, but then also lin/log, init/noinit, send, receive, name, x_off, y_off, font, fontsize, back-, front-, label-color. then there is one, i do not knowe, what it is (0) and the very last seems to be the steady/jump flag. the three flags can be set by 0 or 1. if you open a patch with a text-editor you can always check the correct syntax. hdial, for example, which is called hdl, has size, newonly/new&old, init, fields, send, receive, labelname, x-off, y-off, font, fontsize, ... sÃme
----- Original Message ----- From: "Andre Schmidt" andre@vju.info To: "PD-LiST" pd-list@iem.kug.ac.at Sent: Friday, June 07, 2002 7:08 PM Subject: [PD] dynamic gui object creation?
hi,
i just undertanded how to build dynamicly (thnx CK) in PD, but... (win2k, pd0.35-23)
when this works: [obj 30 10 toggle 10 1 1t-s 1t-r empty 0 0 0 10 1 2 3 0( (makes a toggle with "all" properties set)
and this don't: [obj 10 10 vslider 32 64 1 32 1s-s 1s-r empty 0 0 0 10 1 2 3 0( (makes a slider but no properties set)(am i missing something?)
is there any comprehensive info on dynamicly building and setting properties toggles,slider...etc. ? (creation arguments would fit my needs 4 now)
thnx -andre ps. dyntest02.pd is if i had a typo in this mail...
AWESOME, that worx, open the file where a slider is with texteditor and i get the arguments :)))))) 1000x thnx
-andre
----- Original Message ----- From: "sme" marius.schebella@chello.at To: "Andre Schmidt" andre@vju.info; "PD-LiST" pd-list@iem.kug.ac.at Sent: Friday, June 07, 2002 8:43 PM Subject: Re: [PD] dynamic gui object creation?
the arguments for the guis are slightly different. the slider has width, height, bottom, top, but then also lin/log, init/noinit, send, receive, name, x_off, y_off, font, fontsize, back-, front-, label-color. then there is one, i do not knowe, what it is (0) and the
very
last seems to be the steady/jump flag. the three flags can be set by 0 or 1. if you open a patch with a text-editor you can always check the correct syntax. hdial, for example, which is called hdl, has size, newonly/new&old, init, fields, send, receive, labelname, x-off,
y-off,
font, fontsize, ... sÃme
----- Original Message ----- From: "Andre Schmidt" andre@vju.info To: "PD-LiST" pd-list@iem.kug.ac.at Sent: Friday, June 07, 2002 7:08 PM Subject: [PD] dynamic gui object creation?
hi,
i just undertanded how to build dynamicly (thnx CK) in PD, but... (win2k, pd0.35-23)
when this works: [obj 30 10 toggle 10 1 1t-s 1t-r empty 0 0 0 10 1 2 3 0( (makes a toggle with "all" properties set)
and this don't: [obj 10 10 vslider 32 64 1 32 1s-s 1s-r empty 0 0 0 10 1 2 3 0( (makes a slider but no properties set)(am i missing something?)
is there any comprehensive info on dynamicly building and setting
properties
toggles,slider...etc. ? (creation arguments would fit my needs 4 now)
thnx -andre ps. dyntest02.pd is if i had a typo in this mail...
btw. what do those x_off and y_off do ?
andre
----- Original Message ----- From: "sme" marius.schebella@chello.at To: "Andre Schmidt" andre@vju.info; "PD-LiST" pd-list@iem.kug.ac.at Sent: Friday, June 07, 2002 8:43 PM Subject: Re: [PD] dynamic gui object creation?
the arguments for the guis are slightly different. the slider has width, height, bottom, top, but then also lin/log, init/noinit, send, receive, name, x_off, y_off, font, fontsize, back-, front-, label-color. then there is one, i do not knowe, what it is (0) and the
very
last seems to be the steady/jump flag. the three flags can be set by 0 or 1. if you open a patch with a text-editor you can always check the correct syntax. hdial, for example, which is called hdl, has size, newonly/new&old, init, fields, send, receive, labelname, x-off,
y-off,
font, fontsize, ... sÃme
----- Original Message ----- From: "Andre Schmidt" andre@vju.info To: "PD-LiST" pd-list@iem.kug.ac.at Sent: Friday, June 07, 2002 7:08 PM Subject: [PD] dynamic gui object creation?
hi,
i just undertanded how to build dynamicly (thnx CK) in PD, but... (win2k, pd0.35-23)
when this works: [obj 30 10 toggle 10 1 1t-s 1t-r empty 0 0 0 10 1 2 3 0( (makes a toggle with "all" properties set)
and this don't: [obj 10 10 vslider 32 64 1 32 1s-s 1s-r empty 0 0 0 10 1 2 3 0( (makes a slider but no properties set)(am i missing something?)
is there any comprehensive info on dynamicly building and setting
properties
toggles,slider...etc. ? (creation arguments would fit my needs 4 now)
thnx -andre ps. dyntest02.pd is if i had a typo in this mail...
Hi Andre
here is a short description, to use creation-arguments of iemguis.
cheers Thomas.
bussibussi! marius.
----- Original Message ----- From: "Thomas Musil" musil@iem.kug.ac.at To: "Andre Schmidt" andre@vju.info Cc: "PD-LiST" pd-list@iem.kug.ac.at Sent: Saturday, June 08, 2002 1:24 AM Subject: Re: [PD] dynamic gui object creation?
Hi Andre
here is a short description, to use creation-arguments of iemguis.
cheers Thomas.
A short Description of the Initial-Arguments of IEMGUI-Objects. (pd-0.35test23)
Special Structures: <binstruct1> is a 32 Bit-struct: bit 0: loadbang-init (0 or 1) * 1; bit 1 .. 6: tail-length of receive-name (0 .. 63) * 2; bit 7 .. 12: tail-length of send-name (0 .. 63) * 128; bit 13 .. 18: dollar-number of receive-name (0 .. 63) * 8192; bit 19 .. 24: dollar-number of send-name (0 .. 63) * 524288; bit 25 .. 31: used for internal flags;
<binstruct2> is a 32 Bit-struct: bit 0 .. 5: font-style (0 .. 63) * 1; bit 6: if there is a receive-name not eqval "empty" (0 or 1) *
64;
bit 7: if there is a send-name not eqval "empty" (0 or 1) * 128; bit 8: label-name begins with "$0" {= unique-name} (0 or 1) *
256;
bit 9: receive-name begins with "$0" {= unique-name} (0 or 1) *
512;
bit 10: send-name begins with "$0" {= unique-name} (0 or 1) *
1024;
bit 11 .. 16: tail-length of label-name (0 .. 63) * 2048; bit 17 .. 22: dollar-number {$n} of label-name (0 .. 63) * 131072; bit 23 .. 31: used for internal flags;
the Objects and their Arguments: bng: 14 args <float> size [pix] (default: 15) <float> flash-hold-time [ms] (default: 250) <float> flash-interrupt-time [ms] (default: 50) <binstruct1> loadbang-init-dollar [-] (default: 0) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1)
hdl: 15 args (hdial) <float> size [pix] (default: 15) <float> new-old-value-output-behavior [-] (default: 1) <binstruct1> loadbang-init-dollar [-] (default: 0) <float> number of cells [-] (default: 8) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> selected-cell-index [-] (default: 0)
hsl: 18 args (hslider) <float> width [pix] (default: 128) <float> height [pix] (default: 15) <float> left-value [-] (default: 0) <float> right-value [-] (default: 127) <float> linear or logarithmical [-] (default: 0) {0 is lin; 1 is log} <binstruct1> loadbang-init-dollar [-] (default: 0) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: -2) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> value, if init [-] (default: 0) <float> steady or jump behavior [-] (default: 1) {0 is ggee-jumpy; 1 is
steady}
cnv: 13 args (my_canvas) <float> selectable square-size [pix] (default: 15) <float> only visible width [pix] (default: 100) <float> only visible height [pix] (default: 60) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 20) <float> label-y-offset [pix] (default: 12) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 14) <float> background-color [-] (default: -233017) <float> label-color [-] (default: -66577) <binstruct1> loadbang-init-dollar [-] (default: 0)
nbx: 18 args (my_numbox) <float> box-width [digits] (default: 5) <float> box-height [pix] (default: 14) <float> minimum-value [-] (default: -1e+37) <float> maximum-value [-] (default: 1e+37) <float> linear or logarithmical [-] (default: 0) {0 is lin; 1 is log} <binstruct1> loadbang-init-dollar [-] (default: 0) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label- and front-font-size [pix] (default: 10) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> value, if init [-] (default: 0) <float> virtuell height, if logarithmical [pix] (default: 256)
tgl: 14 args (toggle) <float> size [pix] (default: 15) <binstruct1> loadbang-init-dollar [-] (default: 0) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> on-off-state [-] (default: 0) <float> non-zero-value [-] (default: 1)
vdl: 15 args (vdial) <float> size [pix] (default: 15) <float> new-old-value-output-behavior [-] (default: 1) <binstruct1> loadbang-init-dollar [-] (default: 0) <float> number of cells [-] (default: 8) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -6) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> selected-cell-index [-] (default: 0)
vsl: 18 args (vslider) <float> width [pix] (default: 15) <float> height [pix] (default: 128) <float> bottom-value [-] (default: 0) <float> top-value [-] (default: 127) <float> linear or logarithmical [-] (default: 0) {0 is lin; 1 is log} <binstruct1> loadbang-init-dollar [-] (default: 0) <symbol> send-name [-] (default: empty) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: 0) <float> label-y-offset [pix] (default: -8) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -262144) <float> foreground-color [-] (default: -1) <float> label-color [-] (default: -1) <float> value, if init [-] (default: 0) <float> steady or jump behavior [-] (default: 1) {0 is ggee-jumpy; 1 is
steady}
vu: 12 args <float> width [pix] (default: 15) <float> height [pix] (default: 120) <symbol> receive-name [-] (default: empty) <symbol> label-name [-] (default: empty) <float> label-x-offset [pix] (default: -1) <float> label-y-offset [pix] (default: -8) <binstruct2> font-style-dollar [-] (default: 0) <float> label-font-size [pix] (default: 8) <float> background-color [-] (default: -66577) <float> label-color [-] (default: -1) <float> visible scale [-] (default: 1) {0 is no scale; 1 is show scale} <binstruct1> loadbang-init-dollar [-] (default: 0)
Examples:
colors: 0 .. 29 are the presets of prop.-dialog-window, top-left-color is
0, top-right is 9, middle-left is 10, ..
and bottom-right is 29; if negativ numbers: you can compose RGB-colors; each component from 0 to
63; GREEN-component * 64; RED-comp. * 4096;
and then add RED + GREEN + BLUE, negate it and add -1. (rgb_color
= -BLUE -64*GREEN -4096*RED - 1);
send-receive-label: if you want to give the object a send- or
receive-name, replace the "empty"-symbol
with "my_name".
if you want to give the object an unique-name, replace "empty" with
"$0-my_name" and set BIT 10, 9 or 8
of <binstruct2> (add 1024, 512 or 256 to font-style-dollar).
if you want to give the object a dollar-argument-send-name, replace 1st
"empty" with e.g. "$12-my_send" and
add to <binstruct1> loadbang-init-dollar: 524288 * 12 = 6291456; add to <binstruct1> loadbang-init-dollar: 128 * 8 = 1024; ("-my_send"
is the tail and has 8 characters)
(1024 + 6291456 = 6292480).
if you want to give the object a dollar-argument-receive-name, replace
2nd "empty" with e.g. "$3-my_receive" and
add to <binstruct1> loadbang-init-dollar: 8192 * 3 = 24576; add to <binstruct1> loadbang-init-dollar: 2 * 11 = 22; ("-my_receive"
is the tail and has 11 characters)
(22 + 24576 = 24598).
hi thomas it doesnot seem to be nessesary to give the tail-lengths of rec, send, label in the binstructures? marius.
Special Structures: <binstruct1> is a 32 Bit-struct: bit 0: loadbang-init (0 or 1) * 1; bit 1 .. 6: tail-length of receive-name (0 .. 63) * 2; bit 7 .. 12: tail-length of send-name (0 .. 63) * 128; bit 13 .. 18: dollar-number of receive-name (0 .. 63) * 8192; bit 19 .. 24: dollar-number of send-name (0 .. 63) * 524288; bit 25 .. 31: used for internal flags;
<binstruct2> is a 32 Bit-struct: bit 0 .. 5: font-style (0 .. 63) * 1; bit 6: if there is a receive-name not eqval "empty" (0 or 1) *
64;
bit 7: if there is a send-name not eqval "empty" (0 or 1) * 128; bit 8: label-name begins with "$0" {= unique-name} (0 or 1) *
256;
bit 9: receive-name begins with "$0" {= unique-name} (0 or 1) *
512;
bit 10: send-name begins with "$0" {= unique-name} (0 or 1) *
1024;
bit 11 .. 16: tail-length of label-name (0 .. 63) * 2048; bit 17 .. 22: dollar-number {$n} of label-name (0 .. 63) * 131072; bit 23 .. 31: used for internal flags;
Examples:
colors: 0 .. 29 are the presets of prop.-dialog-window, top-left-color is
0, top-right is 9, middle-left is 10, ..
and bottom-right is 29; if negativ numbers: you can compose RGB-colors; each component from 0 to
63; GREEN-component * 64; RED-comp. * 4096;
and then add RED + GREEN + BLUE, negate it and add -1. (rgb_color
= -BLUE -64*GREEN -4096*RED - 1);
send-receive-label: if you want to give the object a send- or
receive-name, replace the "empty"-symbol
with "my_name".
if you want to give the object an unique-name, replace "empty" with
"$0-my_name" and set BIT 10, 9 or 8
of <binstruct2> (add 1024, 512 or 256 to font-style-dollar).
if you want to give the object a dollar-argument-send-name, replace 1st
"empty" with e.g. "$12-my_send" and
add to <binstruct1> loadbang-init-dollar: 524288 * 12 = 6291456; add to <binstruct1> loadbang-init-dollar: 128 * 8 = 1024; ("-my_send"
is the tail and has 8 characters)
(1024 + 6291456 = 6292480).
if you want to give the object a dollar-argument-receive-name, replace
2nd "empty" with e.g. "$3-my_receive" and
add to <binstruct1> loadbang-init-dollar: 8192 * 3 = 24576; add to <binstruct1> loadbang-init-dollar: 2 * 11 = 22; ("-my_receive"
is the tail and has 11 characters)
(22 + 24576 = 24598).
sme wrote:
hi thomas it doesnot seem to be nessesary to give the tail-lengths of rec, send, label in the binstructures? marius.
Hi Marius,
It's not necessary for normal names and $0-names, but for $n-names. if you don't do enter the tail-length, the properties-dialog-box of an abstraction-used gui shows you "argument_n-name", and not "$n-name". And maybe, if you store the abstraction, you loose the $n-feature.
Thomas.
[win2k, pd-0.35-26]
hi,
with the attached method i could select the objects in a patch and then cut them, but i get "error: bad arguments for message 'click' to object 'canvas'" when i click the first message [vis 1, editmode 1, click 5 5 0 0, mouseup 200 200 0(
any ideas, or other ways to dynamicly delete objetcs ?
thnx -andre
hi Andre,
perhaps you have meant 'mouse 5 5 0 0', not 'click...', since currently the 'click <float> <float> <float> <float> <float>' is a synonym of a 'vis 1'?
But... be careful with deleting (or even selecting?) in an invisible subpatch -- it is bound to crash Pd.
Krzysztof
Andre Schmidt wrote: ...
with the attached method i could select the objects in a patch and then cut them, but i get "error: bad arguments for message 'click' to object 'canvas'" when i click the first message [vis 1, editmode 1, click 5 5 0 0, mouseup 200 200 0(