Re: Possible bug with text search range

cyrille henry via Pd-list <[email protected]> Thu, 19 Mar 2026 12:31:03 +0100
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
Hello,

Here is a strip down version of your patch that is easier to understand.
It look like the text search ignore the range in some situation.

Cheers
c


Le 18/03/2026 à 13:28, Sam Ross a écrit :
> Hello all,
> 
> I'm working on a midi sequencer and have encountered what may be a bug. The attached patch should hopefully be self-explanatory: I am using [text search] to locate repeated instances of the same cc number and update them if present, or insert as a new line if not. I first specify the range using standardised messages. I get strange behaviour depending at which point in the sequence I start, with [text search] returning results outside the requested range on some occasions. Perhaps this is better off on github but I'm not totally familiar with it and thought I'd try here first.
> 
> Thanks for any help, including letting me know if it (doesn't) work for you. I'm on 0.56.2 on Debian 13.
> All the best,
> Sam.
> 
> ---
> [email protected] - the Pure Data mailinglist
> https://lists.iem.at/hyperkitty/list/[email protected]/message/X3ZAJLAZDTH3ZXRPAY6MMQRCDWGWNZF4/
> 
> To unsubscribe send an email to [email protected] mailing list
> UNSUBSCRIBE and account-management -> https://lists.iem.at/

---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/X572VU7RKB7NOZFFPZKIBBYWN6YPDBDT/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
set-a-step-bug2.pd (text/plain, 1 KB)
#N canvas 291 414 702 516 12;
#X obj 493 103 text define \$0/lane;
#X obj 41 171 text set \$0/lane 1e+06;
#X obj 41 145 list;
#X msg 41 72 STEP 0 \, cc 63 74 1 \, END 0 \, STEP 1 \, cc 88 74 1 \, END 1 \, STEP 2 \, cc 46 74 1 \, END 2 \, STEP 3 \, END 3 \, STEP 4 \, END 4 \, STEP 5 \, cc 15 74 1 \, END 5 \, STEP 6 \, cc 82 74 1 \, END 6 \, STEP 7 \, cc 32 74 1 \, END 7;
#X obj 37 420 text search \$0/lane 0 2;
#X floatatom 36 448 5 0 0 0 - - - 0;
#X msg 36 226 0 10;
#X msg 40 394 range \$1 \$2 \, list cc 74;
#X msg 46 262 2 2;
#X text 83 266 ok;
#X text 85 230 ok;
#X msg 76 302 3 3;
#X msg 74 334 9 11;
#X text 118 311 return value outside of the range;
#X obj 48 11 bng 20 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X obj 45 34 t a a;
#X text 83 15 init;
#X msg 493 76 clear \, click;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 6 0 7 0;
#X connect 7 0 4 0;
#X connect 8 0 7 0;
#X connect 11 0 7 0;
#X connect 12 0 7 0;
#X connect 14 0 15 0;
#X connect 15 0 3 0;
#X connect 15 1 17 0;
#X connect 17 0 0 0;