#include <Microphone.h>
Inheritance diagram for Enki::Microphone:

Public Member Functions | |
| Microphone (Robot *owner, Vector micRelPos, double range, MicrophoneResponseModel micModel, unsigned channels) | |
| Constructor e.g. | |
| ~Microphone (void) | |
| Destructor. | |
| void | init () |
| Reset distance values, called every w->step(). | |
| virtual void | objectStep (double dt, PhysicalObject *po, World *w) |
| Check for local interactions with other physical objects. | |
| void | resetSound (void) |
| Reset sound buffer to 0 after one time-step in experiment. | |
| double * | getAcquiredSound (void) |
| Return frequencies of input sound. | |
| void | getMaxChannel (double *intensity, int *channel) |
| Find frequency with maximum intensity. | |
| Vector | getMicAbsPos () |
| Get absolute position of microphone. | |
Protected Attributes | |
| PhysicalObject * | owner |
| Robot/object with the microphone. | |
| Vector | micAbsPos |
| Absolute position in the world, updated on init(). | |
| Vector | micRelPos |
| Relative position of mic on object. | |
| MicrophoneResponseModel | micModel |
| Microphone frequency response model. | |
| double | range |
| Actual detection range. | |
| unsigned | noOfChannels |
| No of frequency channels distinguished in input. | |
| double * | acquiredSound |
| microphone input signal (array of size noOfChannels) | |
| Enki::Microphone::Microphone | ( | Robot * | owner, | |
| Vector | micRelPos, | |||
| double | range, | |||
| MicrophoneResponseModel | micModel, | |||
| unsigned | channels | |||
| ) |
Constructor e.g.
: Microphone(this, Vector(0.5, 0.5), 5, micStepModel, 20); meaning: the mic is (0.5, 0.5) away from robot center, can hear sounds up to 5 units away, uses a step model to detect sounds and can distinguish 20 frequencies
1.5.1