Beep when render completes?

   3757   6   6
User Avatar
Member
14 posts
Joined: Oct. 2015
Offline
Anybody have success making the workstation beep when a render completes?

I tried the following script which works in Terminal/Python, but when I paste it in the post-render script (with type “Python”), I don't hear a beep.

import os; os.system(“echo ‘\a’”)
User Avatar
Member
703 posts
Joined:
Offline
i can only get a popup window showing the sounds was executed….

if I use playwave pop.wav, I can get a sound to occur.


os.system(“playwave /usr/share/sounds/pop.wav”)


not sure if playwave is part of your linux install or not…but any shell based media player would work
User Avatar
Member
14 posts
Joined: Oct. 2015
Offline
Cool!
User Avatar
Staff
478 posts
Joined: April 2014
Offline
On Linux, I use paplay through the command line to play sounds when running a makefile.
You can hook it up in a python os.system() call as well or to a batch render.

# Play a sound on success or error through the command line
alias ok=“( paplay /usr/share/sounds/KDE-Sys-App-Positive.ogg & )”
alias err=“( paplay /home/guillaume/sounds/sadtrombone.ogg & )”
alias okerr=“&& ok || err”

What's neat is you can use a shell command return value to play a different sound if the command failed.

So I can run ( given my ok,err,okerr aliases are defined)
make okerr

and Il get a chime sound on success or the sad trombone on error.
I do hear the sad trombone a lot during a day.
User Avatar
Member
1533 posts
Joined: July 2005
Offline
Point of interest. Most install scripts I've come across obliterate those audio files directly out of the houdini/config/audio folder.

After 15 versions, I've developed a discernible Pavlovian response to those sounds. It's not pretty.

G
User Avatar
Member
621 posts
Joined: Aug. 2008
Offline
what about
print ‘\a’
User Avatar
Member
94 posts
Joined: Dec. 2008
Offline
Guillaume
I do hear the sad trombone a lot during a day.
(me smartassing) Maybe you should learn more then…

…or omit the sad trombone, someone will eventually notice sometime the make failed and tell you anyway…. :twisted:
If you can't script/program it, it's no good at all !
  • Quick Links