pluggo filename handling on xp

Nov 20, 2006 at 5:34pm

pluggo filename handling on xp

hi list,

below is a simple sampler pluggo but i’m having trouble loading/saving filenames. i’ve found a few hints on previous posts but they’re too much for my tiny brain to handle…

in particular there was a previous post from spleef giving an abstraction that another poster was very happy with…but i can’t work out how to use it! would someone be able to show me how?

thanks in advance

don

—————————————————————–
here’s the sampler…

max v2;
#N vpatcher 273 101 873 501;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 191 213 82 9109513 prepend preload 2;
#P newex 192 188 47 9109513 tosymbol;
#P button 193 141 15 0;
#P newex 193 163 52 9109513 opendialog;
#P newex 121 350 43 9109513 plugout~;
#P number 279 63 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number[1];
#P message 279 84 49 9109513 recall $1;
#P number 220 63 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number;
#P message 220 85 55 9109513 capture $1;
#N plugconfig;
#C useviews 0 1 1 1;
#C numprograms 8;
#C preempt 1;
#C sigvschange 1;
#C sigvsdefault 32;
#C setsize 1000 500;
#C defaultview Interface 40 110 0;
#C dragscroll 1;
#C noinfo;
#C uniqueid 0 4 165;
#C initialpgm 1;
#C synth;
#P newobj 220 112 53 9109513 plugconfig;
#P newex 170 62 41 9109513 notein a;
#P user ezdac~ 62 343 106 376 0;
#P message 61 264 14 9109513 2;
#P message 111 258 224 9109513 preload 2 “D:/MaxMSP/Test Samples/ADANI-4.wav”;
#N sfplay~ 1 120960 0 ;
#P newobj 62 311 40 9109513 sfplay~;
#P newex 61 232 19 9109513 t b;
#P newex 61 201 46 9109513 route 60;
#P newex 62 171 48 9109513 pack 0 0;
#P newex 61 133 48 9109513 stripnote;
#P hidden newex 60 109 58 9109513 unpack 0 0;
#P hidden newex 60 83 92 9109513 midiparse;
#P hidden newex 60 60 53 9109513 plugmidiin;
#B color 5;
#P hidden connect 0 0 1 0;
#P hidden connect 1 0 2 0;
#P connect 11 0 3 0;
#P connect 2 0 3 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 9 0;
#P connect 3 0 4 0;
#P connect 21 0 7 0;
#P connect 9 0 7 0;
#P connect 8 0 7 0;
#P connect 7 0 10 0;
#P connect 11 1 3 1;
#P connect 2 1 3 1;
#P connect 3 1 4 1;
#P connect 7 0 17 0;
#P connect 7 0 17 1;
#P connect 20 0 21 0;
#P connect 18 0 20 0;
#P connect 19 0 18 0;
#P connect 14 0 13 0;
#P connect 15 0 12 0;
#P connect 13 0 12 0;
#P connect 16 0 15 0;
#P pop;

—————————————————————–

and here’s spleef’s abstraction…

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 108 116 196 196617 pattr $4 @autorestore 0;
#X prestore 1 0 0;
#P objectname $4;
#P newex 108 324 41 196617 sel 0 1;
#N pp $3 fixed hidden bng 0 1 bng;
#P newobj 108 302 147 196617 pp $3 fixed hidden bng 0 1 bng;
#N comlet symbol / filepath;
#P inlet 59 34 15 0;
#N comlet symbol / filepath;
#P outlet 108 412 15 0;
#P newex 108 347 168 196617 zl reg;
#P newex 108 250 54 196617 vexpr $i1;
#P newex 266 302 40 196617 itoa;
#P newex 59 81 59 196617 route clear;
#N vpatcher 155 325 724 733;
#P button 37 56 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 37 81 55 196617 uzi $2;
#P message 94 82 22 196617 set;
#P message 37 104 14 196617 0;
#P newex 37 125 78 196617 prepend append;
#P outlet 37 353 15 0;
#P inlet 37 32 15 0;
#P message 37 179 367 196617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P connect 1 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 3 0;
#P fasten 6 1 0 0 64 150 42 150;
#P fasten 5 0 0 0 99 159 42 159;
#P fasten 3 0 0 0 42 156 42 156;
#P connect 0 0 2 0;
#P fasten 7 0 5 0 42 77 99 77;
#P pop;
#P newobj 152 176 36 196617 p clear;
#P newex 108 151 54 196617 t s b;
#P newex 108 225 154 196617 plugstore $2;
#P newex 108 203 205 196617 plugmultiparam $1 $2 -256 256 fixed;
#P newex 108 176 40 196617 atoi;
#N vpatcher 14 59 192 288;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 50 95 51 196617 tosymbol;
#P window linecount 0;
#P newex 50 67 69 196617 route symbol;
#P inlet 50 30 15 0;
#P outlet 50 127 15 0;
#P connect 1 0 2 0;
#P fasten 2 1 3 0 114 88 55 88;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P pop;
#P newobj 59 57 79 196617 p types handler;
#P window linecount 4;
#P comment 143 57 268 196617 the 4 mandatory arguments are: first parameter , size of plugmultiparam(i.e. max number of chars in filepath) , a last parameter to bang out the list (i.e. val = $1+#2) , name to pattr system;
#P fasten 4 0 3 0 113 246 102 246 102 199 113 199;
#P connect 4 0 9 0;
#P connect 8 0 10 1;
#P fasten 9 0 8 0 113 283 271 283;
#P connect 5 1 6 0;
#P lcolor 6;
#P fasten 7 0 6 0 64 143 227 143 227 172 157 172;
#P lcolor 6;
#P connect 15 0 5 0;
#P fasten 15 0 11 0 89 158 89 401 113 401;
#P fasten 14 1 10 0 128 344 113 344;
#P connect 14 0 10 0;
#P connect 13 0 14 0;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P fasten 6 0 3 0 157 199 113 199;
#P connect 5 0 2 0;
#P fasten 10 0 15 0 113 376 323 376 323 106 113 106;
#P connect 7 1 15 0;
#P connect 1 0 7 0;
#P connect 12 0 1 0;
#P window clipboard copycount 16;

#28792
Nov 20, 2006 at 6:10pm

please post pluggo q’s to the pluggo forum.

in the meantime,
max’s file preferences are not going to exist for you in max runtime, which pluggo runs within.
you will have to find a method (not unlike spleef’s) to deal with this issue.
either designate specific folders that you create and use those locations (they must be there for this to work), or utilize c74′s lib folder to store samples in.
this is unavoidable if you want to load sound files dynamically with pluggos.

with spleef’s example, the reason a [-256 to 256] range is given for plugmultiparam is to support ASCII characters.

jl

#88718
Nov 20, 2006 at 6:10pm

#88719
Nov 20, 2006 at 6:11pm

#88720

You must be logged in to reply to this topic.