Dropfile w/ WAVE type OSX

Jun 12, 2007 at 5:24am

Dropfile w/ WAVE type OSX

Hello,

Sorry if I’ve missed something obvious…
I’m trying to drag a WAVE file onto [dropfile] and can’t get [dropfile] to output/recognize, even after a type of WAVE has been specified.

I saw this thread on the subject, which never got resolved on-list:

http://www.cycling74.com/forums/index.php?t=msg&goto=79701&rid=2282&S=86654fb000bdcdd836bc780ba9d4e821&srch=dropfile++WAVE+files#msg_79701

Macbook 2.16Ghz Intel Core2Duo – 2GB RAM
Max/MSP 4.6.3
OSX 10.4.9

Simple example:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 31 25 48 196617 loadbang;
#P newex 115 132 55 196617 print type;
#P newex 31 132 60 196617 print PATH;
#P user dropfile 31 77 125 113 1 WAVE;
#P message 31 49 64 196617 types WAVE;
#P connect 1 1 3 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 4 0 0 0;
#P window clipboard copycount 5;

cheers,
jl

#32425
Jun 12, 2007 at 11:03am

jLubow schrieb:
> Sorry if I’ve missed something obvious… I’m trying to drag a WAVE
> file onto [dropfile] and can’t get [dropfile] to output/recognize,
> even after a type of WAVE has been specified.

I can confirm this behaviour, and as always when it comes up, I’d like
dropfile at least to be able to look at extensions.

The info in max-fileformats.txt seems to work only in one direction,
which is a very weak point of dropfile, because its only looking for the
ancient filetype which might be set or not. Its only looking for the
extension if it would pass it anyway – not very helpfull…

I consider this being a bug…

But as always there is a workaround…

Stefan

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 15 344 479 196617;
#P newex 15 321 62 196617 prepend set;
#N vpatcher 362 125 726 434;
#P window setfont “Sans Serif” 9.;
#P newex 103 132 13 196617 b;
#P outlet 103 180 15 0;
#P window linecount 1;
#P newex 103 109 110 196617 match 46 119 97 118;
#P newex 103 157 41 196617 zl reg;
#P newex 50 82 63 196617 zl ecils 4;
#P newex 50 50 50 196617 atoi;
#P inlet 50 23 15 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 1 4 0;
#P connect 4 0 6 0;
#P connect 6 0 3 0;
#P connect 3 0 5 0;
#P fasten 0 0 3 1 55 44 139 44;
#P pop;
#P newobj 15 295 184 196617 p ass according to the extension .wav;
#P message 34 240 479 196617;
#P newex 34 217 62 196617 prepend set;
#P newex 185 160 26 196617 t 0;
#P newex 115 159 26 196617 t 1;
#P newex 34 190 50 196617 gate;
#P newex 115 135 80 196617 sel WAVE AIFF;
#P message 31 48 38 196617 types;
#P newex 31 25 48 196617 loadbang;
#P user dropfile 31 77 125 113 1;
#P connect 0 0 9 0;
#P connect 0 0 4 1;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 7 0 8 0;
#P connect 4 0 7 0;
#P fasten 5 0 4 0 120 184 39 184;
#P fasten 6 0 4 0 190 184 39 184;
#P connect 3 2 6 0;
#P connect 3 1 5 0;
#P connect 3 0 5 0;
#P connect 0 1 3 0;
#P connect 2 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 12;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#106634
Jun 12, 2007 at 11:29pm

The workaround’s fine for now; I knew about it, but thanks Stefan.
I was just confused as I’ve been away from OSX for a while and I remembered dropfile working OK in previous versions of max/os…

FWIW in the archives, the fileformats file does have WAVE included in the standard distro.

cheers,
jl

#106635
Jun 13, 2007 at 6:11am

jLubow schrieb:
> FWIW in the archives, the fileformats file does have WAVE included in
> the standard distro.

The same was here. The difference between .wav files which work and
those which don’t is the independently set Macintosh file type. If
that’s not set, dropfile doesn’t recognize it. I don’t know if the
cycling bug collecting collective is monitoring this thread, but as I
said already I consider this as a bug…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#106636
Jun 13, 2007 at 6:49am

On 13 juin 07, at 08:11, Stefan Tiedje wrote:

> The same was here. The difference between .wav files which work and
> those which don’t is the independently set Macintosh file type. If
> that’s not set, dropfile doesn’t recognize it. I don’t know if the
> cycling bug collecting collective is monitoring this thread, but as
> I said already I consider this as a bug…

There’s always someone watching ;) In the meantime, I made an
improvement to Stefan’s patch support any capitalisation of the file
extension.

regexp .+\.(?i:wave?) @substitute bang:
.+: search any character
(?i: ): defines the case non-sensitive zone
wav: search the litteral text ‘w’ ‘a’ ‘v’
e?: the ‘e’ is optional
@substitute bang: if the regular expression matches, “send a bang”.

ej

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 134 217 68 196617 loadmess set;
#P window linecount 0;
#P message 15 344 479 196617;
#P window linecount 1;
#P newex 15 321 62 196617 prepend set;
#N vpatcher 452 484 816 793;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 194 47 57 196617 toto.WAVE;
#P message 177 25 52 196617 toto.WAV;
#P button 27 180 15 0;
#P message 129 46 55 196617 toto.wave;
#P newex 50 71 216 196617 t s s;
#P window linecount 0;
#P message 117 25 50 196617 toto.wav;
#P outlet 50 180 15 0;
#P window linecount 1;
#P newex 50 157 41 196617 zl reg;
#P newex 50 106 198 196617 regexp .+\\.(?i:wave?) @substitute bang;
#P inlet 50 23 15 0;
#P connect 2 0 7 0;
#P connect 9 0 5 0;
#P connect 8 0 5 0;
#P connect 4 0 5 0;
#P connect 6 0 5 0;
#P connect 0 0 5 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P fasten 5 1 2 1 261 134;
#P pop;
#P newobj 15 295 184 196617 p ass according to the extension .wav;
#P window linecount 0;
#P message 34 240 479 196617;
#P window linecount 1;
#P newex 34 217 62 196617 prepend set;
#P newex 185 160 26 196617 t 0;
#P newex 115 159 26 196617 t 1;
#P newex 34 190 50 196617 gate;
#P newex 115 135 80 196617 sel WAVE AIFF;
#P message 31 48 38 196617 types;
#P newex 31 25 48 196617 loadbang;
#P user dropfile 31 77 125 113 1;
#P hidden connect 12 0 11 0;
#P hidden connect 12 0 8 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 0 1 3 0;
#P connect 3 0 5 0;
#P connect 3 1 5 0;
#P connect 3 2 6 0;
#P fasten 6 0 4 0 190 184 39 184;
#P fasten 5 0 4 0 120 184 39 184;
#P connect 4 0 7 0;
#P connect 7 0 8 0;
#P connect 10 0 11 0;
#P connect 9 0 10 0;
#P connect 0 0 4 1;
#P connect 0 0 9 0;
#P window clipboard copycount 13;

#106637

You must be logged in to reply to this topic.