Recording 4 seconds isn't a problem. Playing it back is the tricky part. It has to be played back in slices no thicker than 2 seconds each. Anyway, the code in this screenshot works. Note: recording starts when the button is released.