diff --git a/pd/src/m_glob.c b/pd/src/m_glob.c index 3efde149b1e44e49cf33de51ab766602559cd4a5..a67a4f61f263fb4af01a7fb64f6af90514c10dbe 100644 --- a/pd/src/m_glob.c +++ b/pd/src/m_glob.c @@ -9,8 +9,11 @@ t_class *glob_pdobject; static t_class *maxclass; int sys_perf; /* true if we should query user on close and quit */ -int pd_compatibilitylevel = 43; /* e.g., 43 for pd 0.43 compatibility */ +/* Compatibility level, e.g., 43 for pd 0.43 compatibility. We default to + the current minor version. If Pd Vanilla ever changes the major version + we will need to revisit them implementation of this feature */ +int pd_compatibilitylevel = PD_MINOR_VERSION; /* These "glob" routines, which implement messages to Pd, are from all over. Some others are prototyped in m_imp.h as well. */ diff --git a/scripts/regression_tests.pd b/scripts/regression_tests.pd index da3e93df4993fac789845fc220a90fbeec443e13..60d0c36c3c8deccd9f50d4f3bc56fb94d8de8968 100644 --- a/scripts/regression_tests.pd +++ b/scripts/regression_tests.pd @@ -1,4 +1,4 @@ -#N canvas 9 118 749 571 12; +#N canvas 11 166 749 571 12; #X obj 465 281 r \$0-result; #X obj 212 239 bng 31 250 50 0 empty empty Run_all 39 13 0 12 -262144 -1 -1; @@ -25,7 +25,7 @@ is handy for some binbuf tests.; #X obj 198 659 rtest makefilename_double_percent; #X obj 198 710 rtest makefilename_code_coverage; #N canvas 461 242 450 323 (subpatch) 0; -#X restore 201 1715 pd; +#X restore 201 1995 pd; #X obj 198 761 rtest makefilename_default; #X obj 198 812 rtest makefilename_default_bang; #X obj 198 863 rtest makefilename_float; @@ -50,6 +50,7 @@ is handy for some binbuf tests.; #X obj 56 120 trigger bang bang bang anything; #X msg 127 146 all tests succeeded.; #X obj 127 172 print Done; +#X obj 198 1701 rtest wrap~_compatibility_bug; #X connect 0 0 27 0; #X connect 1 0 4 0; #X connect 2 0 42 0; @@ -77,6 +78,7 @@ is handy for some binbuf tests.; #X connect 34 0 35 0; #X connect 35 0 36 0; #X connect 36 0 37 0; +#X connect 37 0 45 0; #X connect 38 0 33 0; #X connect 39 0 38 0; #X connect 40 0 28 0; diff --git a/scripts/regression_tests/wrap~_compatibility_bug.pd b/scripts/regression_tests/wrap~_compatibility_bug.pd new file mode 100644 index 0000000000000000000000000000000000000000..d5fb2e3fb456e867e07cebe82b030d68879ac1ce --- /dev/null +++ b/scripts/regression_tests/wrap~_compatibility_bug.pd @@ -0,0 +1,59 @@ +#N canvas 78 98 647 470 12; +#X obj 18 15 inlet; +#X obj 508 171 ../utils/sigtofloat~ wrap~; +#X floatatom 508 200 5 0 0 0 - - -, f 5; +#X obj 508 143 f 0; +#X msg 328 129 compatibility 0.48; +#X msg 546 114 compatibility 0.47; +#X obj 18 158 ../utils/sigtofloat~ wrap~; +#X floatatom 61 205 5 0 0 0 - - -, f 5; +#X obj 18 130 f 0; +#X obj 18 44 t b b b b b b; +#X obj 288 186 ../utils/sigtofloat~ wrap~; +#X floatatom 324 215 5 0 0 0 - - -, f 5; +#X obj 288 158 f 0; +#X obj 546 143 send pd; +#X obj 328 158 send pd; +#X msg 213 158 version; +#X obj 213 187 pdinfo; +#X msg 213 216 \$2; +#X obj 213 245 * 0.01; +#X obj 18 425 outlet; +#X obj 489 258 == 1; +#X obj 489 287 list append 0.47 and earlier should wrap~ zero to one +for compatibility; +#X obj 288 245 == 0; +#X obj 288 330 list append 0.48 should wrap~ zero to zero; +#X obj 18 330 list append zero should wrap~ to zero; +#X msg 213 274 compatibility \$1; +#X obj 213 303 send pd; +#X obj 18 237 == 0; +#X connect 0 0 9 0; +#X connect 1 0 2 0; +#X connect 1 0 20 0; +#X connect 3 0 1 0; +#X connect 4 0 14 0; +#X connect 5 0 13 0; +#X connect 6 0 7 0; +#X connect 6 0 27 0; +#X connect 8 0 6 0; +#X connect 9 0 8 0; +#X connect 9 1 15 0; +#X connect 9 2 12 0; +#X connect 9 3 4 0; +#X connect 9 4 3 0; +#X connect 9 5 5 0; +#X connect 10 0 11 0; +#X connect 10 0 22 0; +#X connect 12 0 10 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 25 0; +#X connect 20 0 21 0; +#X connect 21 0 19 0; +#X connect 22 0 23 0; +#X connect 23 0 19 0; +#X connect 24 0 19 0; +#X connect 25 0 26 0; +#X connect 27 0 24 0; diff --git a/scripts/utils/sigtofloat~.pd b/scripts/utils/sigtofloat~.pd new file mode 100644 index 0000000000000000000000000000000000000000..91c1059ad76a855281b1e0e5b53749ed16a2c140 --- /dev/null +++ b/scripts/utils/sigtofloat~.pd @@ -0,0 +1,28 @@ +#N canvas 738 437 450 381 12; +#X obj 26 20 inlet; +#X obj 149 160 \$1; +#X obj 149 134 sig~; +#X obj 149 189 snapshot~; +#X obj 26 76 t b b a b; +#X msg 237 108 dsp 1; +#X obj 237 137 send pd; +#X obj 46 116 switch~; +#X obj 26 142 t b b; +#X msg 26 171 dsp 0; +#X obj 26 200 send pd; +#X text 77 23 convert a leftmost signal output to a float. Incoming +float is converted to leftmost signal inlet. A single block is computed +to generate the float output.; +#X obj 149 218 outlet; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 12 0; +#X connect 4 0 8 0; +#X connect 4 1 7 0; +#X connect 4 2 2 0; +#X connect 4 3 5 0; +#X connect 5 0 6 0; +#X connect 8 0 9 0; +#X connect 8 1 3 0; +#X connect 9 0 10 0;