General analogue-to-digital transformation