Raw data for some channels is very noisy (audio samples attached)


I am using the following demo to dump raw wave from channel0-7. However, some channels produce very noisy recordings (low frequency noise). Is my matrix voice defective? I have uploaded the audio samples here: https://soundcloud.com/user935949112/sets/raw-audio

I am using the following command to convert int16 raw data to wav files:
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_0.raw channel_0.wav


 * Copyright 2016 <Admobilize>
 * All rights reserved.

#include <wiringPi.h>

#include <string>
#include <fstream>
#include <iostream>
#include <valarray>

#include "../cpp/driver/everloop_image.h"
#include "../cpp/driver/everloop.h"
#include "../cpp/driver/microphone_array.h"
#include "../cpp/driver/wishbone_bus.h"

namespace hal = matrix_hal;

int main() {
  hal::WishboneBus bus;

  hal::MicrophoneArray mics;

  hal::Everloop everloop;

  hal::EverloopImage image1d;

  for (auto& led : image1d.leds) led.red = 10;


  uint16_t seconds_to_record = 10;

  int16_t buffer[mics.Channels() + 1][seconds_to_record * mics.SamplingRate()];

  mics.CalculateDelays(0, 0, 1000, 320 * 1000);

  uint32_t step = 0;
  while (true) {
    mics.Read(); /* Reading 8-mics buffer from de FPGA */

    for (uint32_t s = 0; s < mics.NumberOfSamples(); s++) {
      for (uint16_t c = 0; c < mics.Channels(); c++) { /* mics.Channels()=8 */
        buffer[c][step] = mics.At(s, c);
      buffer[mics.Channels()][step] = mics.Beam(s);
    if (step == seconds_to_record * mics.SamplingRate()) break;

  for (uint16_t c = 0; c < mics.Channels() + 1; c++) {
    std::string filename = "mic_" + std::to_string(mics.SamplingRate()) +
                           "_s16le_channel_" + std::to_string(c) + ".raw";
    std::ofstream os(filename, std::ofstream::binary);
    os.write((const char*)buffer[c],
             seconds_to_record * mics.SamplingRate() * sizeof(int16_t));


  for (auto& led : image1d.leds) {
    led.red = 0;
    led.green = 10;

  return 0;


Try to run micarray_recorder without MALOS running


@lucas How can I turn off MALOS? I reboot raspberry pi and run /home/pi/matrix-creator-hal/build/demos/micarray_recorder. The MALOS is already turned off in my case, right?


sudo pkill -9 malos_eye


@lucas I killed malos_eye and make sure it is killed by checking “ps -aux | grep malos_eye”. The recorded audio is still very noisy (especially channel 1 and channel 7). In general, channel 1, 3, 5, 7 are noisier than channel 0, 2, 4, 6. Could be hardware issue?


@lucas I also tested on another matrix voice. The recording is still very noisy. I made sure malos eye is killed. Do you know other possible causes?


Sorry, i said wrong. You should type sudo pkill -9 malos not malos_eye. They are two different process and i mistaken them.


@lucas It works! BTW, what does malos and malos_eye do? What purpose do they serve, respectively?


Glad to know. Well, malos is a Hardware Abstraction Layer for Matrix. But in a bad explanation malos_eye is related to our computer vision services. But you can check our GitHub repositories like the malos-eye