This module detects in incoming audio buffers every sound with a significative level.
void setParameter (const string& paraDetect, const float& param)
Set detection parameters
Name of the parameter. Please refer to the example below for the available parameters.
Value of the parameter.
Example in python :
# set the sensibility of the detection in the range [0;1]. The default value is 0.9. ALSoundDetectionProxy.setParameter("Sensibility", 0.9)
AL::ALValue getEvents (const string& type)
DEPRECATED - Get index of events detected
Name of detector. For now only one detector is available : "soundDetection/SoundDetector".
Return index of all detections of the current audio buffer
Example in C++ :
/// description of soundDetection/SoundDetector fpDet = getParentBroker()->getProxy( "ALSoundDetection" ); ALValue soundSourceIndex = fpDet->call< ALValue >("getEvents", std::string("soundDetection/SoundDetector"));
AL::ALValue getDescription (const string& type, const string& nameDesc)
DEPRECATED - Get description of events
Name of detector. For now only one detector is available : "soundDetection/SoundDetector".
Name of the description : 'default' if not defined
Return description for all detections
Example in C++ :
/// description of soundDetection/SoundDetector fpDet = getParentBroker()->getProxy( "ALSoundDetection" ); // time of events. ALValue tmpV = fpDet->call< ALValue >("getDescription", std::string("soundDetection/SoundDetector"), std::string("timeEvent")); // value of audio signal when a noise is detected. ALValue tmpV2 = fpDet->call< ALValue >("getDescription", std::string("soundDetection/SoundDetector"), std::string("default"));
void setParameter (const string& type, const string& paraDetect, const float& param)
DEPRECATED - Set detection parameters
Name of detector. For now only one detector is available : "soundDetection/SoundDetector".
Name of the parameter. Please refer to the example below for the available parameters.
Value of the parameter.
Example in python :
#### Default parameters of soundDetection/SoundDetector # set the threshold that triggers the detection ALSoundDetectionProxy.setParameter("soundDetection/SoundDetector","threshold" , 1000.0 ) # set windowSize : size the window size inside which the detection is performed ALSoundDetectionProxy.setParameter("soundDetection/SoundDetector","windowSize", 341 ) # set the value A such that the sound is considered over when getting back under A + Noise Level ALSoundDetectionProxy.setParameter("soundDetection/SoundDetector","dnoise" , 10 )
string version ()
Returns the version of the module.
A string containing the version of the module.
AL::ALValue getMethodHelp (const string& methodName)
Retrieves a method's description.
The name of the method.
A structure containing the method's description.
AL::ALValue getModuleHelp ()
Retrieves the module's description.
A structure describing the module.
string getUsage (const string& name)
Gets the method usage string. This summarise how to use the method.
The name of the method.
A string that summarises the usage of the method.
void subscribe (const string& name, const int& period, const float& precision)
Subscribes to the extractor. This causes the extractor to start writing information to memory using the keys described by getOutputNames(). These can be accessed in memory using ALMemory.getData("keyName"). In many cases you can avoid calling subscribe on the extractor by just calling ALMemory.subscribeToEvent() supplying a callback method. This will automatically subscribe to the extractor for you.
Name of the module which subscribes.
Refresh period (in milliseconds) if relevant.
Precision of the extractor if relevant.
void subscribe (const string& name)
Subscribes to the extractor. This causes the extractor to start writing information to memory using the keys described by getOutputNames(). These can be accessed in memory using ALMemory.getData("keyName"). In many cases you can avoid calling subscribe on the extractor by just calling ALMemory.subscribeToEvent() supplying a callback method. This will automatically subscribe to the extractor for you.
Name of the module which subscribes.
void unsubscribe (const string& name)
Unsubscribes from the extractor.
Name of the module which had subscribed.
void updatePeriod (const string& name, const int& period)
Updates the period if relevant.
Name of the module which has subscribed.
Refresh period (in milliseconds).
void updatePrecision (const string& name, const float& precision)
Updates the precision if relevant.
Name of the module which has subscribed.
Precision of the extractor.
int getMyPeriod (const string& name)
Gets the period for a specific subscription.
Name of the module which has subscribed.
Refresh period (in milliseconds).
float getMyPrecision (const string& name)
Gets the precision for a specific subscription.
name of the module which has subscribed
precision of the extractor
AL::ALValue getSubscribersInfo ()
Gets the parameters given by the module.
Array of names and parameters of all subscribers.
vector<string> getOutputNames ()
Get the list of values updated in ALMemory.
Array of values updated by this extractor in ALMemory
void setDebugMode (const bool& bSetOrUnset)
enable/disable the printing of some debug information
enable the functionnality when true.