milkytracker/MilkyTracker

Convert pattern to sample doesn't restore changed settings after finishing

caseyjoy opened this issue · 1 comments

OS: Ubuntu 21.10
Milkytracker versions: latest Github source build (feature added in #243)
Issue: When using the convert pattern to sample feature with Ctrl-shift-v or Ext. Paste->Capture pattern..., the HDRecorder settings are not stored and restored.
Steps to reproduce:

  • Press Ctrl-shift-v to convert pattern to sample
  • Press Ctrl-R to open HD Recorder menu

or

  • Press Ctrl-R to open HD Recorder menu
  • Press Ctrl-shift-v to convert pattern to sample
  • Press a button on the HD recorder menu

This causes several problems:

  • if the user doesn't realize the settings have been changed, it will appear that the render to file feature is broken until they realize they need to toggle the recording mode back to file
  • the next time the user tries to use the recording menu their settings will be changed, so they'll need to put them back if they want to use them again
  • if the recording menu is open, the settings will seem to stay set until interacting with it or closing and reopening it, after which they will be changed

Working on a fix for this one.

It's looking like a better solution than storing and restoring the settings for sectionHDRecorder might be to not touch sectionHDRecorder at all, and use the underlying functionality and settings instead (since we probably want to use the main tracker volume/amp/mixer resolution instead of the sectionHDRecorder one the user was potentially using to render the song out earlier), potentially similar to how SectionHDRecorder::exportWAVAsSample does it.