[PD] handling path and filenames with spaces in vanilla 0.48

Dan Wilcox danomatika at gmail.com
Fri Mar 30 15:26:04 CEST 2018

Doh, I meant to say I used [list2symbol] previously...

> On Mar 30, 2018, at 3:18 PM, Dan Wilcox <danomatika at gmail.com> wrote:
> As you say, the space in the path makes text output the path as a list of symbols. Some people would say to not use spaces in file paths, but I've been using them successfully for many years. You basically just need to make sure to join the list into a single symbol before trying to use it. Same with trying to save it.
> I've used [symbol2list] previously and now use a vanilla equivalent which uses [list tosymbol] / [list fromsymbol] internally. It's called [u_list2symbol] and you can find it in https://github.com/danomatika/rc-patches <https://github.com/danomatika/rc-patches>. There are similar implementations people have shared with the list in the archives as well.
> I also have a playlist abstraction if that's what you're building [c_playlist] as well as some file path helpers.
>> On Mar 30, 2018, at 2:42 PM, pd-list-request at lists.iem.at <mailto:pd-list-request at lists.iem.at> wrote:
>> Date: Fri, 30 Mar 2018 11:53:55 +0100
>> From: Mikael at UL <mikael.fernstrom at ul.ie <mailto:mikael.fernstrom at ul.ie>>
>> To: Pd-List <pd-list at lists.iem.at <mailto:pd-list at lists.iem.at>>
>> Subject: [PD] handling path and filenames with spaces in vanilla 0.48
>> Message-ID: <DB9641BC-EC4B-4882-9586-E981E9FBB4C3 at ul.ie <mailto:DB9641BC-EC4B-4882-9586-E981E9FBB4C3 at ul.ie>>
>> Content-Type: text/plain; charset="utf-8"
>> I’m currently reworking some of my older patches and moving from Extended to Vanilla  0.48.0
>> I have a text object defined:
>> [text define -k filelist]
>> that contains 16 file names (i.e. full path and file name).
>> File names are set by [openpanel] etc.
>> The file names are also passed on to [soundfiler] with the message:
>> [read -resize -raw 128 2 2 b $1 table1 table2(
>> where $1 is the message from [openpanel] (path+filename)
>> I store filelist by sending [write myfilelist.txt( to the [text define -k filelist].
>> When I try to read back  the list by sending
>> [read myfilelist.txt( to the [text define -k filelist], the text (path + filename) cannot be passed on via a message as a $1 argument to [soundfiler], as the text now appears to be parsed and breaks at the first space in the path+file name.
>> Any suggestions?
>> /Mikael
> --------
> Dan Wilcox
> @danomatika <http://twitter.com/danomatika>
> danomatika.com <http://danomatika.com/>
> robotcowboy.com <http://robotcowboy.com/>

Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180330/9afdb2e0/attachment-0001.html>

More information about the Pd-list mailing list