sfplay~ Error reporting

the.demons's icon

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

the.demons's icon

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.

Leafcutter John's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.


the.demons's icon

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

james.

Julien Bayle's icon

15 years later, it saved us.

thanks