MEMOIR, a CV and Gate/Trigger recorder, for GRAINS