aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-02-12 01:14:05 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-02-12 01:14:05 +0000
commitc8e7403ee6739c2c30ac25bb5a0706310e9e9cfe (patch)
tree51d3f5909cb25ffe63cd8a2e3d39e3a3a990253b /packages
parent5dc4e53b8ff95791503a4c6dc16c41aa41cae453 (diff)
added more to make things more usable:
http://pure-data.svn.sourceforge.net/viewvc/pure-data?view=rev&revision=10760 svn path=/trunk/; revision=10761
Diffstat (limited to 'packages')
-rw-r--r--packages/patches/fix_max.pat_exporting-0.41.4.patch154
1 files changed, 141 insertions, 13 deletions
diff --git a/packages/patches/fix_max.pat_exporting-0.41.4.patch b/packages/patches/fix_max.pat_exporting-0.41.4.patch
index 16b8c0b2..5da90baa 100644
--- a/packages/patches/fix_max.pat_exporting-0.41.4.patch
+++ b/packages/patches/fix_max.pat_exporting-0.41.4.patch
@@ -1,6 +1,6 @@
---- branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/02/11 01:28:08 10756
-+++ branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/02/11 06:44:40 10757
-@@ -952,8 +952,9 @@
+--- branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/01/24 05:10:36 10609
++++ branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/02/12 01:09:11 10760
+@@ -952,14 +952,15 @@
t_binbuf *newb = binbuf_new();
t_atom *vec = oldb->b_vec;
t_int n = oldb->b_n, nextindex, stackdepth = 0, stack[MAXSTACK],
@@ -11,7 +11,69 @@
if (!maxtopd)
binbuf_addv(newb, "ss;", gensym("max"), gensym("v2"));
for (nextindex = 0; nextindex < n; )
-@@ -1179,12 +1180,17 @@
+ {
+ int endmess, natom;
+- char *first, *second;
++ char *first, *second, *third;
+ for (endmess = nextindex; endmess < n && vec[endmess].a_type != A_SEMI;
+ endmess++)
+ ;
+@@ -1146,11 +1147,49 @@
+ }
+ else if (!strcmp(second, "user"))
+ {
+- binbuf_addv(newb, "ssffs;",
+- gensym("#X"), gensym("obj"),
+- atom_getfloatarg(3, natom, nextmess),
+- atom_getfloatarg(4, natom, nextmess),
+- atom_getsymbolarg(2, natom, nextmess));
++ third = (nextmess+2)->a_w.w_symbol->s_name;
++ if (!strcmp(third, "hslider"))
++ {
++ t_float range = atom_getfloatarg(7, natom, nextmess);
++ t_float multiplier = atom_getfloatarg(8, natom, nextmess);
++ t_float offset = atom_getfloatarg(9, natom, nextmess);
++ binbuf_addv(newb, "ssffsffffffsssfffffffff;",
++ gensym("#X"), gensym("obj"),
++ atom_getfloatarg(3, natom, nextmess),
++ atom_getfloatarg(4, natom, nextmess),
++ gensym("hsl"),
++ atom_getfloatarg(6, natom, nextmess),
++ atom_getfloatarg(5, natom, nextmess),
++ offset,
++ range + offset,
++ 0., 0.,
++ gensym("empty"), gensym("empty"), gensym("empty"),
++ 0., -8., 0., 8., -262144., -1., -1., 0., 1.);
++ }
++ else if (!strcmp(third, "uslider"))
++ {
++ t_float range = atom_getfloatarg(7, natom, nextmess);
++ t_float multiplier = atom_getfloatarg(8, natom, nextmess);
++ t_float offset = atom_getfloatarg(9, natom, nextmess);
++ binbuf_addv(newb, "ssffsffffffsssfffffffff;",
++ gensym("#X"), gensym("obj"),
++ atom_getfloatarg(3, natom, nextmess),
++ atom_getfloatarg(4, natom, nextmess),
++ gensym("vsl"),
++ atom_getfloatarg(5, natom, nextmess),
++ atom_getfloatarg(6, natom, nextmess),
++ offset,
++ range + offset,
++ 0., 0.,
++ gensym("empty"), gensym("empty"), gensym("empty"),
++ 0., -8., 0., 8., -262144., -1., -1., 0., 1.);
++ }
++ else
++ binbuf_addv(newb, "ssffs;",
++ gensym("#X"), gensym("obj"),
++ atom_getfloatarg(3, natom, nextmess),
++ atom_getfloatarg(4, natom, nextmess),
++ atom_getsymbolarg(2, natom, nextmess));
+ nobj++;
+ }
+ else if (!strcmp(second, "connect")||
+@@ -1179,12 +1218,17 @@
stack[stackdepth] = nobj;
stackdepth++;
nobj = 0;
@@ -33,7 +95,7 @@
}
}
if (!strcmp(first, "#X"))
-@@ -1193,12 +1199,17 @@
+@@ -1193,12 +1237,17 @@
&& (ISSYMBOL (&nextmess[4], "pd")))
{
binbuf_addv(newb, "ss;", gensym("#P"), gensym("pop"));
@@ -47,7 +109,7 @@
+ SETSYMBOL(outmess + 1, gensym("newobj"));
+ outmess[2] = nextmess[2];
+ outmess[3] = nextmess[3];
-+ SETFLOAT(outmess + 4, 40.*(natom-5));
++ SETFLOAT(outmess + 4, 50.*(natom-5));
+ SETFLOAT(outmess + 5, fontsize);
+ SETSYMBOL(outmess + 6, gensym("p"));
+ for (i = 5; i < natom; i++)
@@ -57,7 +119,7 @@
if (stackdepth) stackdepth--;
nobj = stack[stackdepth];
nobj++;
-@@ -1212,25 +1223,25 @@
+@@ -1212,25 +1261,25 @@
gensym("inlet"),
atom_getfloatarg(2, natom, nextmess),
atom_getfloatarg(3, natom, nextmess),
@@ -87,31 +149,97 @@
else if (classname == gensym("bng"))
binbuf_addv(newb, "ssffff;", gensym("#P"),
gensym("button"),
-@@ -1261,10 +1272,14 @@
+@@ -1255,16 +1304,65 @@
+ (atom_getfloatarg(6, natom, nextmess) == 1? 1 :
+ atom_getfloatarg(6, natom, nextmess) - 1),
+ atom_getfloatarg(7, natom, nextmess));
++ else if (classname == gensym("hsl"))
++ {
++ t_float slmin = atom_getfloatarg(7, natom, nextmess);
++ t_float slmax = atom_getfloatarg(8, natom, nextmess);
++ binbuf_addv(newb, "sssffffffff;", gensym("#P"),
++ gensym("user"),
++ gensym("hslider"),
++ atom_getfloatarg(2, natom, nextmess),
++ atom_getfloatarg(3, natom, nextmess),
++ atom_getfloatarg(6, natom, nextmess),
++ atom_getfloatarg(5, natom, nextmess),
++ slmax - slmin + 1, /* range */
++ 1., /* multiplier */
++ slmin, /* offset */
++ 0.);
++ }
++ else if ( (classname == gensym("trigger")) ||
++ (classname == gensym("t")) )
++ {
++ SETSYMBOL(outmess, gensym("#P"));
++ SETSYMBOL(outmess + 1, gensym("newex"));
++ outmess[2] = nextmess[2];
++ outmess[3] = nextmess[3];
++ SETFLOAT(outmess + 4, 50.*(natom-4));
++ SETFLOAT(outmess + 5, fontsize);
++ outmess[6] = nextmess[4];
++ t_symbol *arg;
++ for (i = 5; i < natom; i++) {
++ arg = atom_getsymbolarg(i, natom, nextmess);
++ if (arg == gensym("a"))
++ SETSYMBOL(outmess + i + 2, gensym("l"));
++ else if (arg == gensym("anything"))
++ SETSYMBOL(outmess + i + 2, gensym("l"));
++ else if (arg == gensym("bang"))
++ SETSYMBOL(outmess + i + 2, gensym("b"));
++ else if (arg == gensym("float"))
++ SETSYMBOL(outmess + i + 2, gensym("f"));
++ else if (arg == gensym("list"))
++ SETSYMBOL(outmess + i + 2, gensym("l"));
++ else if (arg == gensym("symbol"))
++ SETSYMBOL(outmess + i + 2, gensym("s"));
++ else
++ outmess[i+2] = nextmess[i];
++ }
++ SETSEMI(outmess + natom + 2);
++ binbuf_add(newb, natom + 3, outmess);
++ }
+ else
+ {
+ SETSYMBOL(outmess, gensym("#P"));
SETSYMBOL(outmess + 1, gensym("newex"));
outmess[2] = nextmess[2];
outmess[3] = nextmess[3];
- SETFLOAT(outmess + 4, 50);
- SETFLOAT(outmess + 5, 1);
-+ SETFLOAT(outmess + 4, 40.*(natom-4));
++ SETFLOAT(outmess + 4, 50.*(natom-4));
+ SETFLOAT(outmess + 5, fontsize);
for (i = 4; i < natom; i++)
outmess[i+2] = nextmess[i];
-+ if (classname == gensym("hsl"))
-+ SETSYMBOL(outmess + 6, gensym("hslider"));
+ if (classname == gensym("osc~"))
+ SETSYMBOL(outmess + 6, gensym("cycle~"));
SETSEMI(outmess + natom + 2);
binbuf_add(newb, natom + 3, outmess);
}
-@@ -1279,8 +1294,8 @@
+@@ -1279,8 +1377,8 @@
(strcmp(second, "msg") ? "comment" : "message")));
outmess[2] = nextmess[2];
outmess[3] = nextmess[3];
- SETFLOAT(outmess + 4, 50);
- SETFLOAT(outmess + 5, 1);
-+ SETFLOAT(outmess + 4, 40.*(natom-4));
++ SETFLOAT(outmess + 4, 50.*(natom-4));
+ SETFLOAT(outmess + 5, fontsize);
for (i = 4; i < natom; i++)
outmess[i+2] = nextmess[i];
SETSEMI(outmess + natom + 2);
+@@ -1289,10 +1387,13 @@
+ }
+ else if (!strcmp(second, "floatatom"))
+ {
++ t_float width = atom_getfloatarg(4, natom, nextmess)*fontsize;
++ if(width<8) width = 150; /* if pd width=0, set it big */
+ binbuf_addv(newb, "ssfff;",
+ gensym("#P"), gensym("flonum"),
+ atom_getfloatarg(2, natom, nextmess),
+- atom_getfloatarg(3, natom, nextmess), 35);
++ atom_getfloatarg(3, natom, nextmess),
++ width);
+ nobj++;
+ }
+ else if (!strcmp(second, "connect"))