Add factory for LilyPond generation and integrate into main app