code: func (s *Stream) ReadSysExBytes(max int) ([]byte, error) {
  	if max > maxEventBufferSize {
  		return nil, ErrMaxBuffer
  	}
  	if max < minEventBufferSize {
  		return nil, ErrMinBuffer
  	}
  	buffer := make([]C.PmEvent, max)
  	numEvents := C.Pm_Read(unsafe.Pointer(s.pmStream), &buffer[0], C.int32_t(max))
  	if numEvents < 0 {
  		return nil, convertToError(C.PmError(numEvents))
  	}
  	msg := make([]byte, 4*numEvents)
  	for i := 0; i < int(numEvents); i++ {
  		msg[4*i+0] = byte(buffer[i].message & 0xFF)
  		msg[4*i+1] = byte((buffer[i].message >> 8) & 0xFF)
  		msg[4*i+2] = byte((buffer[i].message >> 16) & 0xFF)
  		msg[4*i+3] = byte((buffer[i].message >> 24) & 0xFF)
  	}
  	return msg, nil
  }
docs: // ReadSysExBytes reads 4*max sysex bytes from the input stream.