[PD] Parse/split symbol by delimiters like - or _ ?

tim vets timvets at gmail.com
Sun Mar 1 20:20:42 CET 2015


sorry, in that example, the last [unpack s s] should probably be [unpack f
s]

2015-03-01 20:17 GMT+01:00 tim vets <timvets at gmail.com>:

> maybe using s2l ?
> something (roughly) like:
>
> [symbol drums_1.wav(
> |    [symbol _(
> |    |
> [s2l]
> [unpack s s]
>                 |
>                 |    [symbol .(
>                 |    |
>                 [s2l]
>                 [unpack s s]
>                 [f ]
>                 |
>                 [1\
> gr,
> Tim
>
>
> 2015-03-01 20:03 GMT+01:00 JF via Pd-list <pd-list at lists.iem.at>:
>
>> Is it possible to split a formatted symbol such as...
>> drums_1.wav
>> ...to extract the float '1' and use that to assign a meaningful attribute?
>>
>> For example a float could represent a loop playback switch.
>> if I have 'drums_0.wav' I would like to extract the float, find that it
>> is '0' and then I would know that this WAV file is say, not to be looped.
>> Or if I had 'drums_1.wav' I would be able to parse the filename, find the
>> '1'
>> which I now know to loop the WAV file.
>>
>> Thanks in advance! John
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150301/5cb629d2/attachment.html>


More information about the Pd-list mailing list