const AvgToMonoEffect = ({ input, output }) => {
  for (let i = 0; i < output.length; i ++) {
    output[i] = (input[0][i] + input[1][i]) / 2;
  }
};

this.constructDevice = () => constructPerBufferDevice({
  implementation: AvgToMonoEffect,
  inputs: {
    input: stereo('In'),
  },
  outputs: {
    output: mono('Out'),
  }
});
