diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp
index 5a4b5b890..0c62cf56c 100644
--- a/source/backend/plugin/CarlaPlugin.cpp
+++ b/source/backend/plugin/CarlaPlugin.cpp
@@ -675,9 +675,7 @@ const SaveState& CarlaPlugin::getSaveState()
if (data != nullptr && dataSize > 0)
{
- QByteArray chunk(QByteArray((char*)data, dataSize).toBase64());
-
- saveState.chunk = carla_strdup(chunk.constData());
+ saveState.chunk = carla_strdup(QByteArray((char*)data, dataSize).toBase64().constData());
// Don't save anything else if using chunks
return saveState;
@@ -720,7 +718,7 @@ const SaveState& CarlaPlugin::getSaveState()
stateParameter->index = paramData.index;
stateParameter->midiCC = paramData.midiCC;
- stateParameter->midiChannel = paramData.midiChannel + 1;
+ stateParameter->midiChannel = paramData.midiChannel;
getParameterName(i, strBuf);
stateParameter->name = carla_strdup(strBuf);
diff --git a/source/carla_shared.py b/source/carla_shared.py
index 977c79326..cb8d0232e 100644
--- a/source/carla_shared.py
+++ b/source/carla_shared.py
@@ -963,7 +963,7 @@ class PluginParameter(QWidget):
self.ui.widget.updateAll()
self.setMidiControl(pInfo['midiCC'])
- self.setMidiChannel(pInfo['midiChannel']+1)
+ self.setMidiChannel(pInfo['midiChannel'])
# -------------------------------------------------------------
# Set-up connections
@@ -1331,7 +1331,7 @@ class PluginEdit(QDialog):
'stepSmall': paramRanges['stepSmall'],
'stepLarge': paramRanges['stepLarge'],
'midiCC': paramData['midiCC'],
- 'midiChannel': paramData['midiChannel'],
+ 'midiChannel': paramData['midiChannel']+1,
'current': paramValue
}
@@ -1412,7 +1412,7 @@ class PluginEdit(QDialog):
'stepSmall': 0.0,
'stepLarge': 0.0,
'midiCC': -1,
- 'midiChannel': 0,
+ 'midiChannel': 1,
'current': 0.0
}
@@ -1532,7 +1532,7 @@ class PluginEdit(QDialog):
def setParameterMidiChannel(self, parameterId, channel):
for paramType, paramId, paramWidget in self.fParameterList:
if paramId == parameterId:
- paramWidget.setMidiChannel(channel)
+ paramWidget.setMidiChannel(channel+1)
break
def setProgram(self, index):
@@ -1937,7 +1937,7 @@ class PluginEdit(QDialog):
elif not self.fPluginInfo['hints'] & PLUGIN_IS_SYNTH:
return
- if self.fControlChannel == -1:
+ if self.fControlChannel < 0:
self.ui.cb_midi_programs.setEnabled(False)
return
diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp
index aa474af81..15d0fe76a 100644
--- a/source/utils/CarlaLv2Utils.hpp
+++ b/source/utils/CarlaLv2Utils.hpp
@@ -1315,7 +1315,7 @@ bool is_lv2_feature_supported(const LV2_URI uri)
if (std::strcmp(uri, LV2_URID__unmap) == 0)
return true;
if (std::strcmp(uri, LV2_WORKER__schedule) == 0)
- return true;
+ return false; // TODO
return false;
}
diff --git a/source/utils/CarlaStateUtils.hpp b/source/utils/CarlaStateUtils.hpp
index d43a69b83..87fb3df9e 100644
--- a/source/utils/CarlaStateUtils.hpp
+++ b/source/utils/CarlaStateUtils.hpp
@@ -135,7 +135,7 @@ struct SaveState {
balanceLeft(-1.0f),
balanceRight(1.0f),
panning(0.0f),
- ctrlChannel(0),
+ ctrlChannel(-1),
currentProgramIndex(-1),
currentProgramName(nullptr),
currentMidiBank(-1),
@@ -187,7 +187,7 @@ struct SaveState {
balanceLeft = -1.0f;
balanceRight = 1.0f;
panning = 0.0f;
- ctrlChannel = 0;
+ ctrlChannel = -1;
currentProgramIndex = -1;
currentMidiBank = -1;
currentMidiProgram = -1;
@@ -541,7 +541,10 @@ const QString& getXMLFromSaveState(const SaveState& saveState)
if (saveState.panning != 0.0f)
data += QString(" %1\n").arg(saveState.panning);
- data += QString(" %1\n").arg(saveState.ctrlChannel+1);
+ if (saveState.ctrlChannel < 0)
+ data += QString(" N\n");
+ else
+ data += QString(" %1\n").arg(saveState.ctrlChannel+1);
content += data;
}