const Effect = ({ input, output, gain }) => {
  for (let i = 0; i < input.length; i++) {
    output[i] = input[i] * gain[i];
  }
}

this.constructDevice = () => constructPerChannelDevice({
  implementation: Effect,
  inputs: {
    input: stereo('In'),
    gain: dbSetting('Master Volume', { defaultValue: 0, min: -Infinity, max: 6 }),
  },
  outputs: {
    output: stereo('Out'),
  }
});
