Forums > MaxMSP

creating absolute file paths

September 24, 2006 | 2:15 am

hey, so sorry to bother you all…
I’m trying to create absolute files paths to ultimately send to [sfplay]… I’m having real trouble combining both messages to get to the desitination. I have the folder and file name coming in seperately, and I can’t manange to combine them to come into the sfplay object together!!!
I’ve preied using [prepend] but it doesn’t seem to be workig. Any ideas how I can go about doing this.

man… I gotta do some kinda max training course!

thanks
t


September 24, 2006 | 2:26 am

Try using sprintf. Prepend will leave a space.

wes

On 9/23/06, register wrote:
>
> hey, so sorry to bother you all…
> I’m trying to create absolute files paths to ultimately send to [sfplay]… I’m having real trouble combining both messages to get to the desitination. I have the folder and file name coming in seperately, and I can’t manange to combine them to come into the sfplay object together!!!
> I’ve preied using [prepend] but it doesn’t seem to be workig. Any ideas how I can go about doing this.
>
>
> man… I gotta do some kinda max training course!
>
> thanks
> t
>


September 24, 2006 | 2:36 am

hmmm… had a quick try… the problem seems to be more combinied the two messages from two paths. I’ve been testing using print and set objects. It’s almost as if I need a changeable argument for prepend or sprintf, or the capability to go message – prepend – message in a chain…
hmmmmm…


September 24, 2006 | 2:57 am

Post a patch. It’s hard to know precisely what you’re talking about.
Figuring this stuff out requires knowing exactly what the patch looks
like because the answer is in the details.

wes

On 9/23/06, register wrote:
>
> hmmm… had a quick try… the problem seems to be more combinied the two messages from two paths. I’ve been testing using print and set objects. It’s almost as if I need a changeable argument for prepend or sprintf, or the capability to go message – prepend – message in a chain…
> hmmmmm…
>


September 24, 2006 | 3:03 am

I hope this gives a better idea what I’m on about. the souces are coming from other subpatches, I used set to get an idea of what messages are actually coming through. Altimately, the message coming from the ‘trackname in’ inlet wants to be places at the end of the message coming from the ‘folder in’ inlet, and the comined message to be sent to an sfplay object (thought I used a print for test purposes).
I’m in a real tight spot, I’m far from an experienced max user, and I’m hoping to get a patch workable for a performance! Tried scouring the reference manuals / tutorials, but had trouble finding anything for this!
thanks
tom

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 22 112 82 196617 versebacking.aif;
#P newex 22 88 62 196617 prepend set;
#P window linecount 2;
#P message 116 114 305 196617 open /Users/tomhaig/Documents/register/contourliveset/beyondthosepeaks;
#P window linecount 1;
#P newex 116 91 85 196617 prepend set open;
#P inlet 22 33 14 0;
#P newex 116 171 32 196617 print;
#P inlet 116 29 14 0;
#P comment 232 64 99 196617 sample select;
#P comment 134 30 58 196617 folder in;
#P comment 39 33 67 196617 trackname in;
#P connect 5 0 8 0;
#P connect 8 0 9 0;
#P connect 3 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 4 0;
#P window clipboard copycount 10;


September 24, 2006 | 3:18 am

How’s this?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 90 361 69 196617 print abspath;
#P button 90 224 15 0;
#P message 90 256 337 196617
/Users/tomhaig/Documents/register/contourliveset/beyondthosepeaks;
#P message 158 291 82 196617 versebacking.aif;
#P newex 90 336 68 196617 prepend open;
#P newex 90 313 78 196617 sprintf %s/%s;
#P message 82 172 82 196617 versebacking.aif;
#P newex 82 148 62 196617 prepend set;
#P window linecount 2;
#P message 176 176 305 196617 open
/Users/tomhaig/Documents/register/contourliveset/beyondthosepeaks;
#P window linecount 1;
#P newex 176 151 85 196617 prepend set open;
#P inlet 82 93 14 0;
#P newex 176 231 32 196617 print;
#P inlet 176 89 14 0;
#P comment 292 124 99 196617 sample select;
#P comment 194 90 58 196617 folder in;
#P comment 99 93 67 196617 trackname in;
#P connect 14 0 13 0;
#P connect 14 0 12 0;
#P connect 11 0 15 0;
#P connect 13 0 10 0;
#P connect 12 0 10 1;
#P connect 10 0 11 0;
#P connect 7 0 4 0;
#P connect 6 0 7 0;
#P connect 3 0 6 0;
#P connect 8 0 9 0;
#P connect 5 0 8 0;
#P window clipboard copycount 16;

On 9/23/06, register wrote:
>
> I hope this gives a better idea what I’m on about. the souces are coming from other subpatches, I used set to get an idea of what messages are actually coming through. Altimately, the message coming from the ‘trackname in’ inlet wants to be places at the end of the message coming from the ‘folder in’ inlet, and the comined message to be sent to an sfplay object (thought I used a print for test purposes).
> I’m in a real tight spot, I’m far from an experienced max user, and I’m hoping to get a patch workable for a performance! Tried scouring the reference manuals / tutorials, but had trouble finding anything for this!
> thanks
> tom
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 22 112 82 196617 versebacking.aif;
> #P newex 22 88 62 196617 prepend set;
> #P window linecount 2;
> #P message 116 114 305 196617 open /Users/tomhaig/Documents/register/contourliveset/beyondthosepeaks;
> #P window linecount 1;
> #P newex 116 91 85 196617 prepend set open;
> #P inlet 22 33 14 0;
> #P newex 116 171 32 196617 print;
> #P inlet 116 29 14 0;
> #P comment 232 64 99 196617 sample select;
> #P comment 134 30 58 196617 folder in;
> #P comment 39 33 67 196617 trackname in;
> #P connect 5 0 8 0;
> #P connect 8 0 9 0;
> #P connect 3 0 6 0;
> #P connect 6 0 7 0;
> #P connect 7 0 4 0;
> #P window clipboard copycount 10;
>
>


September 24, 2006 | 3:52 am

my hero! that’s done the job a treat! Thanks a million, I was really pre-empting a head / desk interface on this one! I should do some object studying revision. Thanks very much.
tom


Viewing 7 posts - 1 through 7 (of 7 total)