MasterScan
Lab_Matlab_control Master Branch
|
Superclass for objects that play sounds and are managed by dotsThePlayablesManager.
dotsThePlayablesManager should expect to be able to use any of the dotsPlayable properties or methods for its managed objects.
Properties and Events | |
Property | isAudible = true |
true or false, whether this object should play() sonds | |
Property | intensity = 1 |
scale factor to apply to waveform during playback | |
Property | sampleFrequency = 44100 |
frequency in Hz of sound samples stored in waveform | |
Property | bitsPerSample = 16 |
bit-depth of each sound sample in waveform | |
Property | duration |
duration of the sound to play (may be set automatically) | |
Property | soundsPath |
system path to locate sound files | |
Property | waveform |
mXn double matrix of sound samples (arbitrary units, 0-1) More... | |
Property | side = '' |
If a sound should only play in the left side or right side. More... | |
Property | playBlocking = false |
Should we block until done? | |
Protected Properties | |
Property | lastPlayTime |
timestamp from the last time this object was play()ed | |
Methods | |
self | dotsPlayable () |
Constructor takes no arguments. | |
mayPlayNow (self) | |
play() or not, depending on isAudible and possibly other factors. | |
prepareToPlay (self) | |
Do any pre-play setup. | |
play (self) | |
Subclass must redefine play() to play a sound. | |
stopPlaying (self, waitForEndOfPlayback) | |
Subclass must redefine stopPlaying() to stop playing a sound. | |
unMute (self) | |
Shorthand to set isAudible=true. | |
mute (self) | |
Shorthand to set isAudible=false. | |
Static Methods | |
static | playSound (playableList, indices) |
Pick a sound! | |
Property waveform |
mXn double matrix of sound samples (arbitrary units, 0-1)
m is the number of audio channels, 1 for mono and 2 for stereo. n is the number of sound samples (i.e. the length of the sound).
Property side = '' |
If a sound should only play in the left side or right side.
Enter in 'left' or 'right'. Keep empty for both sides.