use PTY to consume beat_detector