Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Manyears support less microphone? #5

Open
aokihu opened this issue Oct 18, 2017 · 4 comments
Open

Does Manyears support less microphone? #5

aokihu opened this issue Oct 18, 2017 · 4 comments

Comments

@aokihu
Copy link

aokihu commented Oct 18, 2017

Does manyears support less than 8 microphone?

@balkce
Copy link

balkce commented Oct 18, 2017

I'm not a developer, but from what I know: no. In fact, it doesn't support more microphones either. It just supports eight microphones (no more, no less).

I say this because, reviewing the code, in file manyears-C/dsplib/parameters.h, lines 125-126:

// Number of microphones
#define GLOBAL_MICSNUMBER 8

And in file manyears-C/Qt4GUI/coreThread.cpp, line 127:

microphonesInit(this->libraryContext.myMicrophones, 8);

right after this line there is a snippet of code to configure each microphone:

microphonesAdd(this->libraryContext.myMicrophones, 0, this->libraryContext.myParameters->P_GEO_MICS_MIC1_X, this->libraryContext.myParameters->P_GEO_MICS_MIC1_Y, this->libraryContext.myParameters->P_GEO_MICS_MIC1_Z, this->libraryContext.myParameters->P_GEO_MICS_MIC1_GAIN);

This snippet is repeated for each microphone, and there are literally 8 instances of this code.

So, it appears that the number of microphones is definitely hardcoded.

However, seeing this current implementation, and having access to the functions in in manyears-C/dsplib/Geometry/microphones.c:

void microphonesInit(struct objMicrophones* myMicrophones, unsigned int nMics);
void microphonesAdd(struct objMicrophones* myMicrophones, unsigned int indexMic, float x, float y, float z, float gain);

it appears that it is definitely doable to modify the code such that the number of microphones (as well as their position) be able to be changed to whatever the user wants. However, at first glance, it would involve some tweaks in manyears-C/Qt4GUI/coreThread.cpp, some modifications in the configuration GUI (since this is also hardcoded), some additions into the save and load configuration functions, as well as some sane checks so that everything is loaded up correctly. From this point on, however, from what I've seen in the code, it should be able to handle different types of array geometries.

@francoisferland
Copy link
Member

It is actually possible to run ManyEars with less than 8 microphones without having to modify the code. For instance, the manyears_ros package contains a demo for the Kinect, which has 4 microphones. The trick is to set the gain to 0.0 for the unused microphones. See this configuration file for an example: https://github.com/introlab/irl_audio/blob/master/manyears_ros/data/kinect.mes

@balkce
Copy link

balkce commented Oct 18, 2017

Didn't think of that. Handy.

@aokihu
Copy link
Author

aokihu commented Oct 19, 2017

Thanks for your answers @francoisferland and @balkce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants