uliss / pd-ceammc

Pure Data CEAMMC distribution (based on vanilla 0.53 by Miller Puckette)
Other
107 stars 6 forks source link

[snd.play~] could fail silently #205

Closed 60-hz closed 2 months ago

60-hz commented 7 months ago

[snd.play~] should return something if a sound is not found when trying to load one. Having a an outlet notification would be nice.

Also adding the classic "open" method as most player objects do would be handy.

uliss commented 2 months ago

It's a good question how we should handle errors in the data-flow environments. Think we need to develop the unified approach in the ceammc library.

If we suppose that errors are rare, it seems convenient to separate error processing from the main data-flow paths. Now the property @on_err added to the snd.play~, and it sends the error message to this address via the global Pd message dispatcher. You can receive it and handle with a [r NAME] object.

But if we need more solid and reliable applications we should explicitly process errors, may be we should introduce a special error Atom type and special object to separate errors from main data-flow, like:

[object]
|
[err-> ]
|      |
|      [print ERR]
|
[data ok]

It's a subject to think