Forums > MaxMSP

sfplay~ Error reporting

March 11, 2008 | 4:37 pm

Hello/

I have unsuccessfully searched the forum/manuals/tutorials for a solution to the following, any suggestions are very much appreciated.

I need to detect when a sound file fails to open or play using the sfplay~ object, similar to the ‘read filename.mov 0′ statement returned by jit.qt.movie when a file cannot be found.

Is there any way to detect the sfplay~ error messages that are reported in the max window? such as ‘• error: sfplay~: disk error -39′

thank you for reading

James


March 20, 2008 | 2:31 pm

I am still searching for a definitive answer to whether errors reported in the max window can be collected / picked up with in a patch, does anyone have a suggestion, how this might be possible?

thank you for reading.


March 20, 2008 | 4:52 pm

You should be able to get something working with the max ‘error’ object. It’s not in the object list so it may have escaped your attention. Little example below.

#P toggle 89 153 15 0;
#P window setfont "Sans Serif" 9.;
#P message 193 228 16 196617;
#P window linecount 1;
#P newex 193 203 62 196617 prepend set;
#P message 118 133 106 196617 open nonexistent/file;
#P newex 193 180 44 196617 error 1;
#N sfplay~ 1 120960 0 ;
#P newobj 118 180 44 196617 sfplay~;
#P connect 2 0 0 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 5 0 0 0;
#P window clipboard copycount 6;


March 24, 2008 | 7:17 pm

thank you very much, that is very very helpful, and very very kind.

james.


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