for reference...
Begin forwarded message:
From: Matt Barber brbrofsvl@gmail.com Date: 1 December 2015 at 00:41:32 GMT+1 To: Simon Iten itensimon@gmail.com Subject: Re: [PD] filename from path
A couple things to check out that will be better practice:
[until] instead of [metro]
[array size] instead of a [resize $1( message is better syntax in some places. And no need to resize the array every time (this is trivial in most situations, but it's not impossible that someone would want to use this in a heavy load).
Use of $0 for locality.
Above all -- [trigger] to control order of operations, which are a little ambiguous in your patch.
See attached for an alternate design.
On Mon, Nov 30, 2015 at 5:52 PM, Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> wrote: here is a vanilla implementation, not sure if it is the easiest way, but it works here…
thanks for the guidance matt!
simon
On 30 Nov 2015, at 23:35, Matt Barber <brbrofsvl@gmail.com mailto:brbrofsvl@gmail.com> wrote:
I also made a [list-s2l] using a bunch of printf commands from [makefilename]. I haven't looked at it in ages – it was a few years ago (2009?), and is kind of slow, but I think it works. See attached (requires list-abs).
On Mon, Nov 30, 2015 at 5:05 PM, IOhannes m zmölnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote: On 11/30/2015 10:08 PM, Simon Iten wrote:
is it possible to get only the filename from openpanel? (in vanilla)
not vanilla: iemlib's [splitfilename] does exactly what you want not vanilla either: zexy's [symbol2list]/[list2symbol] let's you build that easily
vanilla only solution: see matt's suggestion using the new: [list (to|from)symbol] objects
fgmas IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list http://lists.puredata.info/listinfo/pd-list
<list-s2l.zip>_______________________________________________ Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
Some abstractions for array-abs (matt, if you can add them to your array-abs set) :
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
[array-filename] : get the filename or last directory of a path (faster than [array-split])
[array-drip] : drip all values in an array
[array-pop_index] : pop a value from an array depending of a specific index (in the help file there is an exemple to pop the last value of an array).
++
Jack
Le 01/12/2015 01:21, Simon Iten a écrit :
for reference...
Begin forwarded message:
*From: *Matt Barber <brbrofsvl@gmail.com mailto:brbrofsvl@gmail.com> *Date: *1 December 2015 at 00:41:32 GMT+1 *To: *Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> *Subject: **Re: [PD] filename from path*
A couple things to check out that will be better practice:
[until] instead of [metro]
[array size] instead of a [resize $1( message is better syntax in some places. And no need to resize the array every time (this is trivial in most situations, but it's not impossible that someone would want to use this in a heavy load).
Use of $0 for locality.
Above all -- [trigger] to control order of operations, which are a little ambiguous in your patch.
See attached for an alternate design.
On Mon, Nov 30, 2015 at 5:52 PM, Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> wrote:
here is a vanilla implementation, not sure if it is the easiest way, but it works here…
thanks for the guidance matt!
simon
On 30 Nov 2015, at 23:35, Matt Barber <brbrofsvl@gmail.com mailto:brbrofsvl@gmail.com> wrote:
I also made a [list-s2l] using a bunch of printf commands from [makefilename]. I haven't looked at it in ages – it was a few years ago (2009?), and is kind of slow, but I think it works. See attached (requires list-abs).
On Mon, Nov 30, 2015 at 5:05 PM, IOhannes m zmölnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote:
On 11/30/2015 10:08 PM, Simon Iten wrote:
is it possible to get only the filename from openpanel? (in vanilla)
not vanilla: iemlib's [splitfilename] does exactly what you want not vanilla either: zexy's [symbol2list]/[list2symbol] let's you build that easily
vanilla only solution: see matt's suggestion using the new: [list (to|from)symbol] objects
fgmas IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<list-s2l.zip>_______________________________________________ Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 2015-12-01 14:22, Jack wrote:
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
since [array] is mostly about numbers, i think that [array-split] is a misnomer. call it [array-splitsymbol] or [array-list2symbol] instead.
fgamsdr IOhannes
Yep. I'll happily include them with some modification, including names. [array-list2symbol] is good. I'd also probably change it to [array-basename] since that is the unix/linux command, but I'll be glad to be convinced otherwise.
I'll look through them later today. I recently finished an [array-rfft] that should go up soon, too.
On Tue, Dec 1, 2015 at 10:16 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote:
On 2015-12-01 14:22, Jack wrote:
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
since [array] is mostly about numbers, i think that [array-split] is a misnomer. call it [array-splitsymbol] or [array-list2symbol] instead.
fgamsdr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Yes, [array-split] is not a good name as mentioned iohannes, let's go for [array-list2symbol]. Do what you want with these abs to adapt them for your set if needed. ++
Jack
Le 01/12/2015 16:42, Matt Barber a écrit :
Yep. I'll happily include them with some modification, including names. [array-list2symbol] is good. I'd also probably change it to [array-basename] since that is the unix/linux command, but I'll be glad to be convinced otherwise.
I'll look through them later today. I recently finished an [array-rfft] that should go up soon, too.
On Tue, Dec 1, 2015 at 10:16 AM, IOhannes m zmoelnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote:
On 2015-12-01 14:22, Jack wrote:
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
since [array] is mostly about numbers, i think that [array-split] is a misnomer. call it [array-splitsymbol] or [array-list2symbol] instead.
fgamsdr IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Some changes since my last post : [array-split] is now [array-splitsymbol] [array-filename] is now [array-basename]
Added : [symbol2float] : convert a symbol in (real) float if the symbol looks like a float or let it unchange. [array-symbol2list] : split a symbol in (real) floats or symbols depending of a separator. There is surely some improvements to do in this abs.
Still the same : [array-pop_index]
All is attached. ++
Jack
PS : matt, if you want to add them to your set, still no problem. PS2 : I don't know if i have to keep 2 outlets for [symbol2float], one for the float and the other for the symbol (or just one outlet) ?
Le 01/12/2015 16:54, Jack a écrit :
Yes, [array-split] is not a good name as mentioned iohannes, let's go for [array-list2symbol]. Do what you want with these abs to adapt them for your set if needed. ++
Jack
Le 01/12/2015 16:42, Matt Barber a écrit :
Yep. I'll happily include them with some modification, including names. [array-list2symbol] is good. I'd also probably change it to [array-basename] since that is the unix/linux command, but I'll be glad to be convinced otherwise.
I'll look through them later today. I recently finished an [array-rfft] that should go up soon, too.
On Tue, Dec 1, 2015 at 10:16 AM, IOhannes m zmoelnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote:
On 2015-12-01 14:22, Jack wrote:
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
since [array] is mostly about numbers, i think that [array-split] is a misnomer. call it [array-splitsymbol] or [array-list2symbol] instead.
fgamsdr IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thanks,
When I made [list-l2f] (that is, list-to-float conversion) a few years ago I did route floats and symbols to different outputs. I still like that design, although I could see leaving the routing up to the user, since if they want a single data stream it's doing two extra steps.
I'll take a look at the updates today.
Matt
On Thu, Dec 3, 2015 at 12:11 PM, Jack jack@rybn.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Some changes since my last post : [array-split] is now [array-splitsymbol] [array-filename] is now [array-basename]
Added : [symbol2float] : convert a symbol in (real) float if the symbol looks like a float or let it unchange. [array-symbol2list] : split a symbol in (real) floats or symbols depending of a separator. There is surely some improvements to do in this abs.
Still the same : [array-pop_index]
All is attached. ++
Jack
PS : matt, if you want to add them to your set, still no problem. PS2 : I don't know if i have to keep 2 outlets for [symbol2float], one for the float and the other for the symbol (or just one outlet) ?
Le 01/12/2015 16:54, Jack a écrit :
Yes, [array-split] is not a good name as mentioned iohannes, let's go for [array-list2symbol]. Do what you want with these abs to adapt them for your set if needed. ++
Jack
Le 01/12/2015 16:42, Matt Barber a écrit :
Yep. I'll happily include them with some modification, including names. [array-list2symbol] is good. I'd also probably change it to [array-basename] since that is the unix/linux command, but I'll be glad to be convinced otherwise.
I'll look through them later today. I recently finished an [array-rfft] that should go up soon, too.
On Tue, Dec 1, 2015 at 10:16 AM, IOhannes m zmoelnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote:
On 2015-12-01 14:22, Jack wrote:
[array-split] : split a symbol in many symbols depending of a character (you can make a [array-filename] with it, see help patch)
since [array] is mostly about numbers, i think that [array-split] is a misnomer. call it [array-splitsymbol] or [array-list2symbol] instead.
fgamsdr IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEcBAEBAgAGBQJWYHe3AAoJEOuluecjw8GUS7kH/374sseI9iIAK/9JTAytrnH5 hnpPgVy2nSpDgoIRtxNZP30Jnpq+1wguY5Dru5jTm7sHI6D1ErKe7uXkpIKogTK/ y8MWmeSAfwCU9gYjXtOiY39TOJI37ZwHFoNPQ3VniOes+5EdmB33TvlwXEFzE2L0 9U6TOFwHNROD+/gnq2AXxjzC4THkqLBsP4nWZvuT3g6ecnukmXq0Em8zqzfZtQ1E jekWpGAMMr6Mec7hzlhVfEyQyI225ncJetbOBBR+nUgv+wQHrNkBovZOR8mwhV2r 9XAJ2hsiCxOYvSr55MPUGftRZNvTu7R9Hr9/0M4mxABCzLUNOCNrlm49/3oMB8o= =pGxz -----END PGP SIGNATURE-----
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list