I'm setting up an elaborate system to save 8 subpatches to abstractions, and read from arbitrary abstractions on loading. The only way I can find to do this is using the [pd open $1( message. This message takes arguments /file/ and /path/. [openpanel] outputs complete path. Now I'm trying to take the filename off the end of that symbol and put the rest back into a pathname. [symbol2list /] works fine to separate it, then [list length]-[- 1]-[list split] works fine to get the filename; but I can't seem to reassemble the path with [list2symbol /]. Is there any way to enter / as the separator?
-Chuckk
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
I'm setting up an elaborate system to save 8 subpatches to abstractions, and read from arbitrary abstractions on loading. The only way I can find to do this is using the [pd open $1( message. This message takes arguments /file/ and /path/. [openpanel] outputs complete path. Now I'm trying to take the filename off the end of that symbol and put the rest back into a pathname. [symbol2list /] works fine to separate it, then [list length]-[- 1]-[list split] works fine to get the filename; but I can't seem to reassemble the path with [list2symbol /]. Is there any way to enter / as the separator?
It should work just like that. Could you post an example demonstrating where it doesn't? Btw.: [list-l2s /] from [list]-abs works as well.
Frank Barknecht _ ______footils.org__
On Nov 19, 2007 9:41 PM, Frank Barknecht fbar@footils.org wrote:
It should work just like that. Could you post an example demonstrating where it doesn't? Btw.: [list-l2s /] from [list]-abs works as well.
I'll check that out. I see now there are more externs I could use that I don't know about, so I'll do some searching. Here's a patch. -Chuckk
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
On Nov 19, 2007 9:41 PM, Frank Barknecht fbar@footils.org wrote:
It should work just like that. Could you post an example demonstrating where it doesn't? Btw.: [list-l2s /] from [list]-abs works as well.
I'll check that out. I see now there are more externs I could use that I don't know about, so I'll do some searching.
[list-l2s] is not an external, all of [list]-abs are simple abstractions that require nothing but vanilla Pd. I attached list-l2s.pd, an "l2s" operation can be done without any externals.
Frank Barknecht _ ______footils.org__
Chuckk Hubbard a écrit :
I'm setting up an elaborate system to save 8 subpatches to abstractions, and read from arbitrary abstractions on loading. The only way I can find to do this is using the [pd open $1( message. This message takes arguments /file/ and /path/. [openpanel] outputs complete path. Now I'm trying to take the filename off the end of that symbol and put the rest back into a pathname. [symbol2list /] works fine to separate it, then [list length]-[- 1]-[list split] works fine to get the filename; but I can't seem to reassemble the path with [list2symbol /]. Is there any way to enter / as the separator?
-Chuckk
I'd use getdir external for this kind of trick, and save path into a list.