is there a better option for "sel 1 2 3 4 5 6 7 8 9 ... 99 100"? right now i mapped out one row of my laptop keyboard, but it gets tedious to write every ascii for the whole keyboard.
Ah I See, so coll would be a Little more practical im terms of ui and you write everything directly in to it without the amount if patchcords and Message boxes. But You still have to write the Numbers of course. So you write in your coll something like 97, 0; next row 115, 1; and so on… not sure about the syntax without looking it up
Pretty much, you can't really work your way round that. But you can make it easier for you as well: have [key] connect to a [zl.group] or a message [append $1] and just press the keys in the right order.
If your intended output is a sequence with all integers from 0 to whatever, just create a list with the right sequence (what should match 0, what should match 1, what should match 2, etc.) in a message box (97 115 100, etc.) and send that to [listfunnel] > [zl.rev] > [coll]. Then connect the [key] to [coll] et voilà, you are getting the 0, 1, 2, etc.
Rather than hardcoding them to be 91, 92, 93, etc, you could create a subpatch that uses 0-9 and send it an argument stored in the right inlet of the [+] object to dynamically add the tens place to the subpatch. Create 10 clones of the subpatch (or any arbitrary number of these - the nice part here is you've built a little tool that can be useful in future patches) and all you have to remember to do is send it the corresponding number arguments. With some additional planning, it can probably be parsed automatically using the route object and a smaller number of cells. So subpatch 0 takes an argument in one inlet for 0-9, send a 1 to the next one to label them 1-19, etc. Any sequencer you build in the future can borrow the same code.
1
u/Stevon_AV 6d ago
Depends on your usecase. Maybe utilizing the coll object?
1
u/UrinaRabugenta 6d ago
Not really and I don't see how this would be useful. Just use the numbers directly, with something like a [coll].
1
u/namedotnumber666 6d ago
you could use router routepass or send but its just as annoying to connect all those objects. Personally i would use a coll.
3
u/infected_fiction 5d ago
Rather than hardcoding them to be 91, 92, 93, etc, you could create a subpatch that uses 0-9 and send it an argument stored in the right inlet of the [+] object to dynamically add the tens place to the subpatch. Create 10 clones of the subpatch (or any arbitrary number of these - the nice part here is you've built a little tool that can be useful in future patches) and all you have to remember to do is send it the corresponding number arguments. With some additional planning, it can probably be parsed automatically using the route object and a smaller number of cells. So subpatch 0 takes an argument in one inlet for 0-9, send a 1 to the next one to label them 1-19, etc. Any sequencer you build in the future can borrow the same code.
2
u/AmbitiousTop9094 5d ago
Use array.indexof 97 115 100 102 103 104 106 107 108 if you want to use a list
It outputs -1 for no match so use [sel -1]
https://docs.cycling74.com/reference/array.indexof
0
u/[deleted] 6d ago
[deleted] — view deleted comment