I was starting on an abstraction to manage sound file sample rates and frame counts.
I had thought to store these data in a [text] where the first item in each line would be the array name.
The amusing thing is that a [soundfiler] "read" message may take one or more array names at the end (and, this is the only way to access more than one channel from the sound file).
So I would need to parse the "read" message and determine which of the elements at the end are array names.
A test using, say, [array size] prints an error message in the console upon failure -- but this isn't a normal situation where the user has made a mistake. "Failure" is a legitimate result (Boolean false). (That is, the assumption is that the user should know which arrays she has created -- but this assumption does not hold if you're creating an abstraction to publish. Therefore you need a way to ask the system without triggering an error.)
Alternately, I suppose I could modify the message format and tweak the list before passing it to [soundfiler], e.g. "read -resize path.wav - tableA tableB" -- the following does correctly isolate the items following "-". (I can't help thinking, though: If there is [text search], could there not be [list search]? This was maybe 30 minutes, vs SuperCollider's list.detectIndex { |item| item == "-" }
).
The risk here is that users are not in the habit of separating the array names by "-" and the abstraction would fail if they forget.
So it would be ideal to stick to the standard syntax.
Is there some undocumented bit of magic to query silently for names?
hjh