Hi, I'm having a hard time figuring out a list management situation: Let's say I have a list made of several floats, how would I clear one or more of these floats from my list (and therefore shrink it) without knowing their index? Thank you very much in advance... D.S
http://www.flickr.com/photos/schafferdavid/ https://soundcloud.com/schafferdavidhttps://vimeo.com/davidschaffer/videos
On Don, 2015-09-03 at 20:12 +0000, David Schaffer wrote:
I'm having a hard time figuring out a list management situation:
Let's say I have a list made of several floats, how would I clear one or more of these floats from my list (and therefore shrink it) without knowing their index?
What is it then that you know? Their values?
If so, I'd serialize the list to a stream of floats, pass the stream to some filter like [select 0.493] (the float I want strip out), and concatenate the stream back to a list.
To paraphrase that in Pseudo-Pd-code:
[list_serializer] | [filter] | [list_concatenator]
There is an example for a serializer in the help of [list]. A concatenator is very simple:
| ____ [list prepend] X[t a] _______________/
Roman