Module Sound
[frames] | no frames]

Module Sound

The Blender.Sound submodule.

Sound

This module provides access to Sound objects in Blender.

Example:

       import Blender
       from Blender import Sound
       #
       sound = Sound.Load("/path/to/my/sound.wav")    # load a sound file
       print "Sound from", sound.filename,
       print "loaded to obj", sound.name
       print "All Sounds available now:", Sound.Get()

No way to get the actual audio data is provided by this library, but it is included in the Python standard library (module audioop). Note that using that module requires a full/normal Python installation.

Classes
  Sound
This object gives access to Sounds in Blender.
Functions
Blender Sound
Load(filename)
Load the sound called 'filename' into a Sound object.
Blender Sound or a list of Blender Sounds
Get(name=None)
Get the Sound object(s) from Blender.
Variables
  __package__ = None
Function Details

Load(filename)

 

Load the sound called 'filename' into a Sound object.

Parameters:
  • filename (string) - The full path to the sound file.
Returns: Blender Sound
A Blender Sound object with the data from filename.

Get(name=None)

 

Get the Sound object(s) from Blender.

Parameters:
  • name (string) - The name of the Sound object.
Returns: Blender Sound or a list of Blender Sounds
It depends on the name parameter:
  • (name): The Sound object called name, None if not found;
  • (): A list with all Sound objects in the current scene.