I added the code, including SEQ_SONG_ActiveGet()== 0 because I only want the seq_core_trk_muted set back to the previous state when not in Song Mode. (I often forget to go back to phrase mode before leaving the song screen and that in the end I would take over the mutes from the song screen).
Without the code I added, I think you’ll always keep the mutes from the song screen in seq_core_trk_muted, if I’m not mistaking.
Yes of course, there are no “shadowed” mutes for song mode, they are just controlled from the song list.
Your modification can cause the problem that Mutes could get inconsistent over long term, because the user isn’t aware of this dependency (mutes copied only if song is not playing)
Do you have any suggestions on how to resolve the problem of the mutes, that have been put in a song, not being set back to the state they were before they were changed by the song, when exiting the song screen?
Your idea doesn’t harmonize with the initial concept behind Song/Phrase mode, therefore there won’t be a proper solution.
In distance, with such an automation you are adding new cases which might be annoying or confusing, such as:
unintended re-latching of mutes if the user temporary switches to another page (e.g. mixer page, or effects), and back to song page while song is playing
mutes could have been latched for a different pattern set with a different organization of instruments, so that the expired setup will mute different instruments
actually I think it’s much better if the pattern set and mute setup stays active at the end of a song, e.g. it allows to continue jamming live (“encore!”)
What are the advantages of this restore operation, and compare it with the disadvantages.
Note: if somebody just wants to mute all tracks, or unmute all tracks for editing purposes, he could use the appr. functions in the Utility menu (GP15 and GP16)