Hi,
Do you need a cross-platform solution or just something specific to some os(es) ?
Do you want to play a sound, or a simple system beep/bell ?
Basically you could add a post-render frame mel :
if (!`about -batch`) play_some_sound;
Playing a basic beep will be specific on each os, unfortunately the stdout redirection forced by maya will break the print(“\a”) trick, so you must fall back on platform-specific implementations, ie:
- windows : python(“from winsound import Beep; Beep(2000, 200)”)
- linux : python(“with open(‘/dev/audio’, ‘wb’) as f: f.write((chr(63) * 4 + chr(0) * 4) * 250)”)
- osx : python(“from AppKit import NSBeep; NSBeep()”)
Playing a specific sound will be trickier, but if you got some working scripts, it should be easy to fit your needs.
HTH !
Tonio