file names with spaces don't work in lists; any suggestions?

Sep 27, 2006 at 5:02pm

file names with spaces don't work in lists; any suggestions?

Hello all.

I’m trying to pass a list of infomation to a unpack object. One of the
items in the list is the name of a sound file and sometimes, these
files have spaces in their names.

When a list contains “1 0.2 0.75 ghost a.mp3″ Max thinks that the file
name is “ghost” rather than “ghost a.mp3.” All of this data is coming
in from Flash (thanks Olaf!). I’ve tried using a Unicode escaping
character (u0020) to represent the space before it is sent on to my
patch but Max/MSP doesn’t seem to understand that either; the results
are the same.

Any ideas on how I can help Max understand a space character within a
single name on a list?

Thanks in advance. ::Norbert

#27835
Sep 27, 2006 at 5:53pm

Maybe try something with Symbols or put the name in speak marks as in ‘ghost a.mp3′ or is that going to mess with your flash?
If you can use tosymbol
there will be speach marks around the file name which will keep it together- if not you could append the name back together afterwards with a space – though that wouldnt be that fun to do I have done similar things with a similar problem with syntax of files. Unfortionatly max can be a little fiddley with spaces in file names and such. look at to symbol, append and – if that fails you probably couldnt go far wrong looking at L-objects- one of those is bound to have something that will ignore spaces or something to make it easier.

Hope this helps
Trum

#84733
Sep 28, 2006 at 4:56am

underscores are the typical convention in names instead of spaces. As far
as I’ve been taught in school or anybody I’ve worked with (I’ve done
actionscripting, javascript and now max/msp(though I’m a bit of a newbie),
spaces were always a programming faux pas.

On 9/27/06, Tristram Cox wrote:
>
>
> Maybe try something with Symbols or put the name in speak marks as in
> ‘ghost a.mp3′ or is that going to mess with your flash?
> If you can use tosymbol
> there will be speach marks around the file name which will keep it
> together- if not you could append the name back together afterwards with a
> space – though that wouldnt be that fun to do I have done similar things
> with a similar problem with syntax of files. Unfortionatly max can be a
> little fiddley with spaces in file names and such. look at to symbol, append
> and – if that fails you probably couldnt go far wrong looking at L-objects-
> one of those is bound to have something that will ignore spaces or something
> to make it easier.
>
> Hope this helps
> Trum
>


<3 Chole

#84734
Sep 28, 2006 at 8:42am

On 28-Sep-2006, at 6:56, Nichole Bartholomew wrote:

> underscores are the typical convention in names instead of spaces.
> As far as I’ve been taught in school or anybody I’ve worked with
> (I’ve done actionscripting, javascript and now max/msp(though I’m a
> bit of a newbie), spaces were always a programming faux pas.

Au_contraire:_File_names_with_blanks_are_not_the_problem._Systems_that_m
ake_it_difficult_to_use_blanks_in_file_names_are_the_problem._PARAGRAPH_
What_you_are_saying_is_essentially_blaming_the_victim._PARAGRAPH_That_sa
id,_most_computer_operating_systems,_programming_languages,_and_applicat
ions_programs_have_been_making_it_so_difficult_to_use_blanks_in_file_nam
es_for_so_many_decades_that_people_have_come_to_accept_this_limitation._
But_it’s_like_forcing_left-
handed_people_to_use_their_right_hand_for_everything_because_”left_is_wr
ong”._If_you’re_not_a_southpaw,_trust_me:_this_sucks_bigtime._PARAGRAPH_

Do you honestly enjoy reading text without blanks?

Frankly, I’ve never yet come across a problem with blanks in Max that
couldn’t be fixed by judicious use of the tosymbol object.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

#84735
Sep 28, 2006 at 2:06pm

Right now I would love to be able to say “Max46Topics.pdf, section Symbols and Strings: An Overview” .. hint, hint ;)

Mattijs

#84736

You must be logged in to reply to this topic.