code: function(frame, frameSize) {
      const opcode = encoders.opcode('PROCESS_FRAME');
  
      const time = new Float64Array(1);
      time[0] = frame.time;
  
      const data = new Float32Array(frameSize);
      for (let i = 0; i < frameSize; i++)
        data[i] = frame.data[i];
  
      const metadata = json2Uint16Array(frame.metadata);
  
      const length = 1 + 4 + (2 * frameSize) + metadata.length;
      const payload = new Uint16Array(length);
      payload.set(opcode, 0);
      payload.set(new Uint16Array(time.buffer), 1);
      payload.set(new Uint16Array(data.buffer), 1 + 4);
      payload.set(metadata, 1 + 4 + (2 * frameSize));
  
      return payload.buffer;
    }
docs: `opcode`    2 bytes (Uint16) | `time`      8 bytes (Float64) | `data`      frameSize * 4 (Float32) | `metadata`  n bytes (Uint16)