Browse Source

Save param-outs midi-cc and channel info; Set version as 2.0-beta1

tags/1.9.4
falkTX 10 years ago
parent
commit
c106ae8bb8
7 changed files with 29 additions and 15 deletions
  1. +2
    -2
      resources/ui/carla_edit.ui
  2. +13
    -6
      source/backend/plugin/CarlaPlugin.cpp
  3. +1
    -1
      source/carla_shared.py
  4. +6
    -2
      source/carla_widgets.py
  5. +2
    -2
      source/includes/CarlaDefines.h
  6. +4
    -2
      source/utils/CarlaStateUtils.cpp
  7. +1
    -0
      source/utils/CarlaStateUtils.hpp

+ 2
- 2
resources/ui/carla_edit.ui View File

@@ -298,7 +298,7 @@
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="radioButton">
<widget class="QRadioButton" name="rb_balance">
<property name="text">
<string>Use Balance</string>
</property>
@@ -308,7 +308,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<widget class="QRadioButton" name="rb_pan">
<property name="text">
<string>Use Panning</string>
</property>


+ 13
- 6
source/backend/plugin/CarlaPlugin.cpp View File

@@ -501,13 +501,14 @@ const SaveState& CarlaPlugin::getSaveState()
{
const ParameterData& paramData(pData->param.data[i]);

if (paramData.type != PARAMETER_INPUT || (paramData.hints & PARAMETER_IS_ENABLED) == 0)
if ((paramData.hints & PARAMETER_IS_ENABLED) == 0)
continue;

StateParameter* const stateParameter(new StateParameter());

stateParameter->index = paramData.index;
stateParameter->midiCC = paramData.midiCC;
stateParameter->isInput = (paramData.type == PARAMETER_INPUT);
stateParameter->index = paramData.index;
stateParameter->midiCC = paramData.midiCC;
stateParameter->midiChannel = paramData.midiChannel;

getParameterName(i, strBuf);
@@ -691,10 +692,16 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState)
// Now set parameter
if (index >= 0 && index < static_cast<int32_t>(pData->param.count))
{
if (pData->param.data[index].hints & PARAMETER_USES_SAMPLERATE)
stateParameter->value *= sampleRate;
//CARLA_SAFE_ASSERT(stateParameter->isInput == (pData

if (stateParameter->isInput)
{
if (pData->param.data[index].hints & PARAMETER_USES_SAMPLERATE)
stateParameter->value *= sampleRate;

setParameterValue(static_cast<uint32_t>(index), stateParameter->value, true, true, true);
}

setParameterValue(static_cast<uint32_t>(index), stateParameter->value, true, true, true);
#ifndef BUILD_BRIDGE
setParameterMidiCC(static_cast<uint32_t>(index), stateParameter->midiCC, true, true);
setParameterMidiChannel(static_cast<uint32_t>(index), stateParameter->midiChannel, true, true);


+ 1
- 1
source/carla_shared.py View File

@@ -54,7 +54,7 @@ elif WINDOWS:
# ------------------------------------------------------------------------------------------------------------
# Set Version

VERSION = "1.9.0"
VERSION = "1.9.3 (2.0-beta1)"

# ------------------------------------------------------------------------------------------------------------
# Set TMP


+ 6
- 2
source/carla_widgets.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# Carla widgets code
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -103,7 +103,7 @@ class CarlaAboutW(QDialog):
self.ui.l_about.setText(self.tr(""
"<br>Version %s"
"<br>Carla is a Multi-Plugin Host for JACK%s.<br>"
"<br>Copyright (C) 2011-2013 falkTX<br>"
"<br>Copyright (C) 2011-2014 falkTX<br>"
"" % (VERSION, extraInfo)))

if gCarla.isControl or gCarla.isPlugin or gCarla.host is None:
@@ -436,6 +436,10 @@ class PluginEdit(QDialog):
self.ui.scrollArea.setEnabled(False)
self.ui.scrollArea.setVisible(False)

# todo
self.ui.rb_balance.setEnabled(False)
self.ui.rb_pan.setEnabled(False)

self.reloadAll()

# -------------------------------------------------------------


+ 2
- 2
source/includes/CarlaDefines.h View File

@@ -24,8 +24,8 @@
#endif

/* Set Version */
#define CARLA_VERSION_HEX 0x01092
#define CARLA_VERSION_STRING "1.9.2"
#define CARLA_VERSION_HEX 0x01093
#define CARLA_VERSION_STRING "1.9.3 (2.0-beta1)"

/* Check OS */
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)


+ 4
- 2
source/utils/CarlaStateUtils.cpp View File

@@ -30,7 +30,8 @@ CARLA_BACKEND_START_NAMESPACE
// StateParameter

StateParameter::StateParameter() noexcept
: index(-1),
: isInput(true),
index(-1),
name(nullptr),
symbol(nullptr),
value(0.0f),
@@ -506,7 +507,8 @@ void fillXmlStringFromSaveState(QString& content, const SaveState& saveState)
if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0')
parameter += QString(" <Symbol>%1</Symbol>\n").arg(xmlSafeString(stateParameter->symbol, true));

parameter += QString(" <Value>%1</Value>\n").arg(stateParameter->value);
if (stateParameter->isInput)
parameter += QString(" <Value>%1</Value>\n").arg(stateParameter->value);

if (stateParameter->midiCC > 0)
{


+ 1
- 0
source/utils/CarlaStateUtils.hpp View File

@@ -35,6 +35,7 @@ CARLA_BACKEND_START_NAMESPACE
// -----------------------------------------------------------------------

struct StateParameter {
bool isInput;
int32_t index;
const char* name;
const char* symbol;


Loading…
Cancel
Save