commit ca8c1e037844af7b1556f6e1588f4f3c540ce125
parent 32aa98dd92001a2a805fe4de6237edfd5f56e1e6
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sat, 17 Jul 2021 02:11:31 +0200
backup single mode single as part of arrangement request
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/source/virusLib/microcontroller.cpp b/source/virusLib/microcontroller.cpp
@@ -324,10 +324,20 @@ bool Microcontroller::sendSysex(const std::vector<uint8_t>& _data, bool _cancelI
auto buildArrangementResponse = [&]()
{
+ // If we are in multi mode, we return the Single mode single first. If in single mode, it is returned last.
+ // The reason is that we want to backup everything but the last loaded multi/single defines the play mode when restoring
+ const bool isMultiMode = m_globalSettings[PLAY_MODE] == PlayModeMulti;
+
+ if(isMultiMode)
+ buildSingleResponse(0, SINGLE);
+
buildMultiResponse(0, 0);
for(uint8_t p=0; p<16; ++p)
buildPresetResponse(DUMP_SINGLE, 0, p, m_singleEditBuffers[p]);
+
+ if(!isMultiMode)
+ buildSingleResponse(0, SINGLE);
};
switch (cmd)