Is there a way to get Blender to play a *.way sound when rendering is done?

Oh yeah I tried to install it like that and it didn’t work, I have no idea how to do this with a text editor.

Stop it, that’s not true.
There are a lot of people there sharing all sorts of life issues.

I don’t use second life I wouldn’t know. It was what I heard.

Copy/paste the text into a text window, edit the file path, and click “Run Script”

1 Like

Thank you !

Hi Rocketman!

Thank you for the script. I was unable to make it work, and am wondering what I’m doing wrong? Is there another plugin I should have installed for the audio etc?

Which version of Blender did you use?
Did it throw an error or a green check with “bpy.ops.text.run_script()”?
Because I didn’t get any error, got a green check indicating that the script works, but I couldn’t hear any sound when my render was done.
Blender 2.92 here

I’m actually trying it on Alpha 3.0. LOL!

Did you get any errors? Python syntax has changed in Blender 2.93 (cuz it’s Python 3.9 instead of 3.7 now - they’ve upgraded the API), so some scripts may be broken.

Hmm… didn’t seem to get an error… It had a little green check mark there I believe. I’m a total newb for Python (son does some elementary coding but I don’t) So I just grabbed the latest version of ‘render music’

Also… I get to play elevator music while rendering. LOL. I chose this as my render music. I’m sure It’ll drive me insane on a 3 hour render.

Haha, that’s a good one!
Sounds to me much like the old The Sims soundtrack. Very nostagic!
Tho when I read “elevator music” I always think about this piece:

Speaking of the render music addon - as you get the little green check, not an error, it means the mistake is probably on our side, but I can’t figure out what we’re both doing wrong. I first got an error when trying to call an mp3 file in the Downloads folder. Seems that it didn’t like that location, so I put my mp3 loosely on my C:\ drive, adjusted file path in the code, and had no more error, but still, the sound wasn’t played.

4 Likes

LOL. That music is perfect for this.

1 Like

Hey just in case somebody is still looking for this answer, here is the addon version which totally works (just install it as an addon in the preferences options menu). So to recap:

  1. Copy the python code below into a .py file and save it.
  2. Change the ‘PATH_TO_YOUR_SOUND_FILE’ variable to your preferred sound file and save
  3. Install and enable this addon
  4. That’s it !
bl_info = {
    "name": "Play Sound After Completing Render",
    "blender": (2, 80, 0),
    "category": "Object",
}

import bpy, aud

device = aud.Device()
completion_sound = aud.Sound('PATH_TO_YOUR_SOUND_FILE')

def play_completion_sound(dummy):
    device.play(completion_sound)
    
    
def register():
    bpy.app.handlers.render_complete.append(play_completion_sound)
    
def unregister():
    print("No longer playing audio file after render done.")
1 Like