Building a music engraving engine from scratch