Getting raw data from Matrix Voice

Hi,

I am developing my own beamforming algorithm and need to access raw data (in the sense of no delay applied) from the Matrix Voice microphone array. How can I do that?

I was unable to find anything beyond the At function. I noticed the MicrophoneArray object contains the raw_data_ field. I added a function Raw patterned after the At function:

  int16_t &At(int16_t sample, int16_t channel) {
    return delayed_data_[sample * kMicrophoneChannels + channel];
  }

  int16_t &Raw(int16_t sample, int16_t channel) {
    return raw_data_[sample * kMicrophoneChannels + channel];
  }

and rebuilt the library, but only got some buzzing sound on all channels.

Regards,

Adam

Hi @apodhorski,

Apologies for the delayed response! I am actually testing this. Will get back to you shortly!

Best,
Samreen

Hi Samreen,

What I actually need is the access to the microphone data that has not been delayed in any wat. If this can be acomplished in some other, possibly simpler, way, for example, by passing proper arguments to the CalculateDelays, which will cause no delay at all, it would be perfectly OK with me. I need to know that samples in each channel are perfectly synchronised, i.e. they were taken at exactly the same moments in all channels. Thanks a lot!

Regards,

Adam

Hi @apodhorski,

There’s only one small change you need to make to your Raw function since data is stored a bit differently in the raw_data_ buffer.

  int16_t &Raw(int16_t sample, int16_t channel) {
    return raw_data_[channel * (kMicarrayBufferSize / kMicrophoneChannels) + sample];
  }

Hope this helps with your beamforming algorithm!

Best,
Samreen

Hi Samreen,

Worked like a charm, thanks a lot for your help!

Best regards,

Adam

1 Like