Wondering if there's some way to split and route segments of a list using [text] object. I'm saving a line of floats from several sources into a [text] object, and would like to be able to route the floats back to each source when recalled via [text-get]. Route seems to send the entire message, but I want to try and split the list whenever there is a marker (maybe prepending with a symbol or something). I've got a kind of hack working using some [list-splits], but that only works as I know the length of the lists for now, but if I need to patch anything more dynamic I wondered if anyone knows of an object or vaguely elegant way to do this?
-
Split routing from [text-get]
-
@RT-Chris Use the field select inlet and list prepend?
If the list is shortish you can just use unpack -
Thank you! I still struggle to simplify the logic of lists sometimes, but that looks right, Much appreciated
-
@RT-Chris As [text] can also store in lines, the lists could be routed by line number?
-
@ingox Thanks, yeah I tried that for a bit, and found having to save several lines at a time a bit clumsy to keep track of when that overall process happens several times also, the lines all add up quickly! So just wondered if there was a way to contain all the floats in a single line to try and keep things as neat / simple as possible
I guess I was thinking maybe there was some way of sorting lists when an element indicates the beginning of a different nested list to direct that somewhere. But I guess that might end up using non-vanilla objects, and I think the prepend solution is probably the simplest for the moment. -
@RT-Chris Surely it is possible to split lists as you wish using only vanilla objects.
Just for demonstration here is a simple preset system that uses the lines of a [text] object: simple_preset_system.pd
-
Brilliant, thank you, I always learn so much from your examples!
-
@RT-Chris Just in case a vanilla list splitter: list-split.zip
-
@RT-Chris This uses $0 also in the receives: simple_preset_system2.pd
-
And just for fun supporting multiple presets: simple_preset_system3.pd
-
Wow, thank you! I'll have to study these, but this is a great help, thanks!