Ok, I got a lot of help from mxb, but [managed to write a script]([Solved] Loading,Saving,Removing TMP files during document flush view findpost p 292539) that
- saves the currently selected sample
- creates a new song (asks if current should be saved, before doing it, of course)
- loads the saved sample