It wouldn't be a total rewrite, unless the GUI code is mixed in with the analytical and music processing code.

Typically all of the GUI code should be in the units which contain the forms that use them and all of the non GUI code such as the music generation should be in separate units.

If everything is in one big main unit and the GUI elements are being accessed from within the procedures which do all of the musical functions then yes it would be quite an undertaking and a nightmare to maintain.