Browse Source

Cleanup

master
falkTX 7 years ago
parent
commit
a671cba8d1
7 changed files with 69 additions and 68 deletions
  1. +9
    -13
      plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp
  2. +5
    -7
      plugins/AmplitudeImposer/DistrhoUIAmplitudeImposer.cpp
  3. +9
    -13
      plugins/CycleShifter/DistrhoPluginCycleShifter.cpp
  4. +5
    -7
      plugins/CycleShifter/DistrhoUICycleShifter.cpp
  5. +19
    -19
      plugins/SoulForce/DistrhoPluginSoulForce.cpp
  6. +13
    -0
      plugins/SoulForce/DistrhoPluginSoulForce.hpp
  7. +9
    -9
      plugins/SoulForce/DistrhoUISoulForce.cpp

+ 9
- 13
plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp View File

@@ -113,12 +113,10 @@ void DistrhoPluginAmplitudeImposer::initParameter(uint32_t index, Parameter& par
void DistrhoPluginAmplitudeImposer::initProgramName(uint32_t index, String& programName)
{
switch(index)
{
case 0:
programName = "Default";
break;
}
if (index != 0)
return
programName = "Default";
}
// -----------------------------------------------------------------------
@@ -152,13 +150,11 @@ void DistrhoPluginAmplitudeImposer::setParameterValue(uint32_t index, float valu
void DistrhoPluginAmplitudeImposer::loadProgram(uint32_t index)
{
switch(index)
{
case 0:
fDepth = 1.0f;
fThreshold = 0.5f;
break;
}
if (index != 0)
return
fDepth = 1.0f;
fThreshold = 0.5f;
}
// -----------------------------------------------------------------------


+ 5
- 7
plugins/AmplitudeImposer/DistrhoUIAmplitudeImposer.cpp View File

@@ -74,13 +74,11 @@ void DistrhoUIAmplitudeImposer::parameterChanged(uint32_t index, float value)

void DistrhoUIAmplitudeImposer::programLoaded(uint32_t index)
{
switch(index)
{
case 0:
fSliderDepth->setValue(1.0f);
fSliderThres->setValue(0.5f);
break;
}
if (index != 0)
return;

fSliderDepth->setValue(1.0f);
fSliderThres->setValue(0.5f);
}

// -----------------------------------------------------------------------


+ 9
- 13
plugins/CycleShifter/DistrhoPluginCycleShifter.cpp View File

@@ -66,12 +66,10 @@ void DistrhoPluginCycleShifter::initParameter(uint32_t index, Parameter& paramet
void DistrhoPluginCycleShifter::initProgramName(uint32_t index, String& programName)
{
switch(index)
{
case 0:
programName = "Default";
break;
}
if (index != 0)
return;
programName = "Default";
}
// -----------------------------------------------------------------------
@@ -105,13 +103,11 @@ void DistrhoPluginCycleShifter::setParameterValue(uint32_t index, float value)
void DistrhoPluginCycleShifter::loadProgram(uint32_t index)
{
switch(index)
{
case 0:
fNewCycleVolume = 1.0f;
fInputVolume = 1.0f;
break;
}
if (index != 0)
return;
fNewCycleVolume = 1.0f;
fInputVolume = 1.0f;
}
// -----------------------------------------------------------------------


+ 5
- 7
plugins/CycleShifter/DistrhoUICycleShifter.cpp View File

@@ -74,13 +74,11 @@ void DistrhoUICycleShifter::parameterChanged(uint32_t index, float value)

void DistrhoUICycleShifter::programLoaded(uint32_t index)
{
switch(index)
{
case 0:
fSliderNewCycleVol->setValue(1.0f);
fSliderInputVol->setValue(1.0f);
break;
}
if (index != 0)
return;

fSliderNewCycleVol->setValue(1.0f);
fSliderInputVol->setValue(1.0f);
}

// -----------------------------------------------------------------------


+ 19
- 19
plugins/SoulForce/DistrhoPluginSoulForce.cpp View File

@@ -29,7 +29,7 @@ START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------
DistrhoPluginSoulForce::DistrhoPluginSoulForce()
: Plugin(kParameterCount, 9, 0), // 9 programs, 0 states
: Plugin(kParameterCount, kProgramCount, 0),
coeff(0.5f),
wave(0.0f),
env(0.0f),
@@ -79,31 +79,31 @@ void DistrhoPluginSoulForce::initProgramName(uint32_t index, String& programName
{
switch(index)
{
case 0:
case kProgramDefault:
programName = "Default";
break;
case 1:
case kProgramStayDown:
programName = "Stay Down";
break;
case 2:
case kProgramLookingForTheWorld:
programName = "Looking for the World";
break;
case 3:
case kProgramGuerillaLove:
programName = "Guerilla Love";
break;
case 4:
case kProgramTumbleToThePower:
programName = "Tumble to the Power";
break;
case 5:
case kProgramDoYourselfFavour:
programName = "Do Yourself a Favour";
break;
case 6:
case kProgramPastIsPast:
programName = "Past is Past";
break;
case 7:
case kProgramYouAndOnlyYou:
programName = "You and Only You";
break;
case 8:
case kProgramSoulForce:
programName = "Soul Force";
break;
}
@@ -137,55 +137,55 @@ void DistrhoPluginSoulForce::loadProgram(uint32_t index)
{
switch(index)
{
case 0:
case kProgramDefault:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 1:
case kProgramStayDown:
parameters[kParameterShape] = 0.4f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 2:
case kProgramLookingForTheWorld:
parameters[kParameterShape] = 1.0f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 3:
case kProgramGuerillaLove:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 4:
case kProgramTumbleToThePower:
parameters[kParameterShape] = 0.0f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 5:
case kProgramDoYourselfFavour:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 1.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 6:
case kProgramPastIsPast:
parameters[kParameterShape] = 0.0f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 1.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 7:
case kProgramYouAndOnlyYou:
parameters[kParameterShape] = 0.3f;
parameters[kParameterFeedback] = 0.5f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 8:
case kProgramSoulForce:
parameters[kParameterShape] = 0.3f;
parameters[kParameterFeedback] = 0.5f;
parameters[kParameterSource] = 1.0f;


+ 13
- 0
plugins/SoulForce/DistrhoPluginSoulForce.hpp View File

@@ -42,6 +42,19 @@ public:
kParameterCount
};
enum Programs {
kProgramDefault,
kProgramStayDown,
kProgramLookingForTheWorld,
kProgramGuerillaLove,
kProgramTumbleToThePower,
kProgramDoYourselfFavour,
kProgramPastIsPast,
kProgramYouAndOnlyYou,
kProgramSoulForce,
kProgramCount
};
DistrhoPluginSoulForce();
protected:


+ 9
- 9
plugins/SoulForce/DistrhoUISoulForce.cpp View File

@@ -108,47 +108,47 @@ void DistrhoUISoulForce::programLoaded(uint32_t index)
{
switch(index)
{
case 0:
case DistrhoPluginSoulForce::kProgramDefault:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
break;
case 1:
case DistrhoPluginSoulForce::kProgramStayDown:
fKnobShape->setValue(0.4f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
break;
case 2:
case DistrhoPluginSoulForce::kProgramLookingForTheWorld:
fKnobShape->setValue(1.0f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
break;
case 3:
case DistrhoPluginSoulForce::kProgramGuerillaLove:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(false);
break;
case 4:
case DistrhoPluginSoulForce::kProgramTumbleToThePower:
fKnobShape->setValue(0.0f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(false);
break;
case 5:
case DistrhoPluginSoulForce::kProgramDoYourselfFavour:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(true);
break;
case 6:
case DistrhoPluginSoulForce::kProgramPastIsPast:
fKnobShape->setValue(0.0f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(true);
break;
case 7:
case DistrhoPluginSoulForce::kProgramYouAndOnlyYou:
fKnobShape->setValue(0.3f);
fKnobFBack->setValue(0.5f);
fSwitchSource->setDown(false);
break;
case 8:
case DistrhoPluginSoulForce::kProgramSoulForce:
fKnobShape->setValue(0.3f);
fKnobFBack->setValue(0.5f);
fSwitchSource->setDown(true);


Loading…
Cancel
Save