Module Sound :: Class Sound
[frames | no frames]

Class Sound


The Sound object

This object gives access to Sounds in Blender.
Method Summary
  getAttenuation()
Get this sound's attenuation value.
string getFilename()
Get the filename of the sound file loaded into this Sound object.
string getName()
Get the name of this Sound object.
  getPitch()
Get this sound's pitch value.
  getVolume()
Get this sound's volume.
none pack()
Packs the sound into the current blend file.
  play()
Play this sound.
  setAttenuation(f)
Set this sound's attenuation.
  setCurrent()
Make this the active sound in the sound buttons window (also redraws).
None setFilename()
Set the filename of the sound file loaded into this Sound object.
None setName()
Set the name of this Sound object.
  setPitch(f)
Set this sound's pitch.
  setVolume(f)
Set this sound's volume.
none unpack(mode)
Unpacks the sound to the samples filename.

Instance Variable Summary
  filename: The filename (path) to the sound file loaded into this Sound
  name: The name of this Sound object.
  packed: Boolean, True when the sample is packed (readonly).

Method Details

getAttenuation()

Get this sound's attenuation value. rtype: float

getFilename()

Get the filename of the sound file loaded into this Sound object.
Returns:
string

getName()

Get the name of this Sound object.
Returns:
string

getPitch()

Get this sound's pitch value. rtype: float

getVolume()

Get this sound's volume. rtype: float

pack()

Packs the sound into the current blend file.
Returns:
nothing
           (type=none)

Note: An error will be raised if the sound is already packed or the filename path does not exist.

play()

Play this sound.

setAttenuation(f)

Set this sound's attenuation.
Parameters:
f - the new attenuation value in the range [0.0, 5.0].
           (type=float)

setCurrent()

Make this the active sound in the sound buttons window (also redraws).

setFilename()

Set the filename of the sound file loaded into this Sound object.
Returns:
None

setName()

Set the name of this Sound object.
Returns:
None

setPitch(f)

Set this sound's pitch.
Parameters:
f - the new pitch value in the range [-12.0, 12.0].
           (type=float)

setVolume(f)

Set this sound's volume.
Parameters:
f - the new volume value in the range [0.0, 1.0].
           (type=float)

unpack(mode)

Unpacks the sound to the samples filename.
Parameters:
mode - One of the values in Blender.Unpackmodes dict.
           (type=int)
Returns:
nothing
           (type=none)

Note: An error will be raised if the sound is not packed or the filename path does not exist.


Instance Variable Details

filename

The filename (path) to the sound file loaded into this Sound

name

The name of this Sound object.

packed

Boolean, True when the sample is packed (readonly). object.

Generated by Epydoc 2.1 on Sun Feb 11 13:30:20 2007 http://epydoc.sf.net