In addition to the two nice commands in the Edit menu - Delete Unused Patterns and Delete Unused Instruments, I think it may not be so bad to have a Delete Off-Pattern Data command.
This will delete all the data that is outside of the visible patterns setup, including:
Notes that were pushed down
Notes that are in columns that are no longer visible
Yes, may be useful, but this is easily achieved by deleting all patterns using Ctrl+Del, then select Delete Unused Patterns and you have yourself a clean slate.
Well - almost, if you also want to remove channel effects and automation, you will have to delete all tracks with Ctrl+Shift+T
Yes I know, but it seems sooo unneeded to do so much effort for something as simple as this, IMO it should be included as a menuitem. Especially as it is so easy to implement.
i’ve sometimes been missing a delete unused tracks function to be honest and i know at least one further person who’d be severly happy with it (innit, bcx? ).