A morse encoder