Browse Source

Initial commit, includes SoulForce

master
falkTX 6 years ago
commit
31869f08a5
28 changed files with 77341 additions and 0 deletions
  1. +16
    -0
      .gitignore
  2. +3
    -0
      .gitmodules
  3. +41
    -0
      Makefile
  4. +153
    -0
      Makefile.mk
  5. +11
    -0
      README.md
  6. +3
    -0
      bin/README
  7. +1
    -0
      dpf
  8. +149
    -0
      plugins/Makefile.mk
  9. +76100
    -0
      plugins/SoulForce/DistrhoArtworkSoulForce.cpp
  10. +60
    -0
      plugins/SoulForce/DistrhoArtworkSoulForce.hpp
  11. +37
    -0
      plugins/SoulForce/DistrhoPluginInfo.h
  12. +310
    -0
      plugins/SoulForce/DistrhoPluginSoulForce.cpp
  13. +116
    -0
      plugins/SoulForce/DistrhoPluginSoulForce.hpp
  14. +207
    -0
      plugins/SoulForce/DistrhoUISoulForce.cpp
  15. +81
    -0
      plugins/SoulForce/DistrhoUISoulForce.hpp
  16. +53
    -0
      plugins/SoulForce/Makefile
  17. BIN
      plugins/SoulForce/Screenshot.png
  18. BIN
      plugins/SoulForce/artwork/SoulForcePedal.blend
  19. BIN
      plugins/SoulForce/artwork/about.png
  20. BIN
      plugins/SoulForce/artwork/background.png
  21. BIN
      plugins/SoulForce/artwork/button_down.png
  22. BIN
      plugins/SoulForce/artwork/button_up.png
  23. BIN
      plugins/SoulForce/artwork/knob-feedback.png
  24. BIN
      plugins/SoulForce/artwork/knob-shape.png
  25. BIN
      plugins/SoulForce/artwork/led_off.png
  26. BIN
      plugins/SoulForce/artwork/led_on.png
  27. BIN
      plugins/SoulForce/artwork/switch_left.png
  28. BIN
      plugins/SoulForce/artwork/switch_right.png

+ 16
- 0
.gitignore View File

@@ -0,0 +1,16 @@
*.a
*.d
*.o

*.exe
*.dll
*.dylib
*.so
*.zip

.kdev_include_paths
.kdev4/

bin/*-dssi/
bin/*.lv2/
bin/SoulForce

+ 3
- 0
.gitmodules View File

@@ -0,0 +1,3 @@
[submodule "dpf"]
path = dpf
url = git://github.com/DISTRHO/DPF

+ 41
- 0
Makefile View File

@@ -0,0 +1,41 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#

include Makefile.mk

all: libs plugins gen

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

libs:
ifeq ($(HAVE_DGL),true)
$(MAKE) -C dpf/dgl
endif

plugins: libs
$(MAKE) all -C plugins/SoulForce

gen: plugins dpf/utils/lv2_ttl_generator
@$(CURDIR)/dpf/utils/generate-ttl.sh
ifeq ($(MACOS),true)
@$(CURDIR)/dpf/utils/generate-vst-bundles.sh
endif

dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator

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

clean:
ifeq ($(HAVE_DGL),true)
$(MAKE) clean -C dpf/dgl
endif
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
$(MAKE) clean -C plugins/SoulForce

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

.PHONY: plugins

+ 153
- 0
Makefile.mk View File

@@ -0,0 +1,153 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#

AR ?= ar
CC ?= gcc
CXX ?= g++

# --------------------------------------------------------------
# Fallback to Linux if no other OS defined

ifneq ($(HAIKU),true)
ifneq ($(MACOS),true)
ifneq ($(WIN32),true)
LINUX=true
endif
endif
endif

# --------------------------------------------------------------
# Set build and link flags

BASE_FLAGS = -Wall -Wextra -pipe
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections

ifneq ($(MACOS),true)
# MacOS doesn't support this
BASE_OPTS += -mfpmath=sse
endif

ifeq ($(MACOS),true)
# MacOS linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs
else
# Common linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(MODDUO),true)
# MOD Duo optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mtune=cortex-a7 -mfpu=neon -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(RASPPI),true)
# Raspberry-Pi optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(PANDORA),true)
# OpenPandora optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(NOOPT),true)
# No optimization flags
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
endif

ifneq ($(WIN32),true)
# not needed for Windows
BASE_FLAGS += -fPIC -DPIC
endif

ifeq ($(DEBUG),true)
BASE_FLAGS += -DDEBUG -O0 -g
LINK_OPTS =
else
BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden
endif

BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)

ifeq ($(MACOS),true)
# No C++11 support
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif

# --------------------------------------------------------------
# Check for optional libs

ifeq ($(LINUX),true)
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
HAVE_JACK = $(shell pkg-config --exists jack && echo true)
HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true)
endif

ifeq ($(MACOS),true)
HAVE_DGL = true
endif

ifeq ($(WIN32),true)
HAVE_DGL = true
endif

# --------------------------------------------------------------
# Set libs stuff

ifeq ($(HAVE_DGL),true)

ifeq ($(LINUX),true)
DGL_FLAGS = $(shell pkg-config --cflags gl x11)
DGL_LIBS = $(shell pkg-config --libs gl x11)
endif

ifeq ($(MACOS),true)
DGL_LIBS = -framework OpenGL -framework Cocoa
endif

ifeq ($(WIN32),true)
DGL_LIBS = -lopengl32 -lgdi32
endif

endif # HAVE_DGL

# --------------------------------------------------------------
# Set app extension

ifeq ($(WIN32),true)
APP_EXT = .exe
endif

# --------------------------------------------------------------
# Set shared lib extension

LIB_EXT = .so

ifeq ($(MACOS),true)
LIB_EXT = .dylib
endif

ifeq ($(WIN32),true)
LIB_EXT = .dll
endif

# --------------------------------------------------------------
# Set shared library CLI arg

SHARED = -shared

ifeq ($(MACOS),true)
SHARED = -dynamiclib
endif

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

+ 11
- 0
README.md View File

@@ -0,0 +1,11 @@
# DISTRHO ndc Plugs

DPF'ied ports of some plugins from Niall Moody.<br/>
See [http://www.niallmoody.com/ndcplugs/plugins.htm](http://www.niallmoody.com/ndcplugs/plugins.htm) for the original author's page.

This collection currently includes:<br/>
- SoulForce

## Screenshots
Soul Force:<br/>
![Soul Force](https://raw.githubusercontent.com/DISTRHO/ndc-Plugs/master/plugins/SoulForce/Screenshot.png "Soul Force")<br/>

+ 3
- 0
bin/README View File

@@ -0,0 +1,3 @@
All final plugin builds will be placed in this folder.

There is no "make install" process, simply copy those files to their appropriate place.

+ 1
- 0
dpf

@@ -0,0 +1 @@
Subproject commit 784f0808a7352b04032d07fb6969f53cccd90c27

+ 149
- 0
plugins/Makefile.mk View File

@@ -0,0 +1,149 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#

# NAME, OBJS_DSP and OBJS_UI have been defined before

include ../../Makefile.mk

# --------------------------------------------------------------
# Basic setup

TARGET_DIR = ../../bin

BUILD_C_FLAGS += -I.
BUILD_CXX_FLAGS += -I. -I../../dpf/distrho -I../../dpf/dgl

ifeq ($(HAVE_DGL),true)
BASE_FLAGS += -DHAVE_DGL
endif

ifeq ($(HAVE_JACK),true)
BASE_FLAGS += -DHAVE_JACK
endif

ifeq ($(HAVE_LIBLO),true)
BASE_FLAGS += -DHAVE_LIBLO
endif

# --------------------------------------------------------------
# Set plugin binary file targets

jack = $(TARGET_DIR)/$(NAME)$(APP_EXT)
ladspa_dsp = $(TARGET_DIR)/$(NAME)-ladspa$(LIB_EXT)
dssi_dsp = $(TARGET_DIR)/$(NAME)-dssi$(LIB_EXT)
dssi_ui = $(TARGET_DIR)/$(NAME)-dssi/$(NAME)_ui$(APP_EXT)
lv2 = $(TARGET_DIR)/$(NAME).lv2/$(NAME)$(LIB_EXT)
lv2_dsp = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_dsp$(LIB_EXT)
lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui$(LIB_EXT)
vst = $(TARGET_DIR)/$(NAME)-vst$(LIB_EXT)

# --------------------------------------------------------------
# Set distrho code files

DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp

ifeq ($(HAVE_DGL),true)
DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a
endif

# --------------------------------------------------------------
# Handle plugins without UI

ifneq ($(HAVE_DGL),true)
dssi_ui =
lv2_ui =
DISTRHO_UI_FILES =
DGL_LIBS =
OBJS_UI =
endif

# --------------------------------------------------------------
# all needs to be first

all:

# --------------------------------------------------------------
# Common

%.c.o: %.c
$(CC) $< $(BUILD_C_FLAGS) -MD -MP -c -o $@

%.cpp.o: %.cpp
$(CXX) $< $(BUILD_CXX_FLAGS) -MD -MP -c -o $@

clean:
rm -f *.d *.o font/*.d font/*.o
rm -rf $(TARGET_DIR)/$(NAME) $(TARGET_DIR)/$(NAME)-* $(TARGET_DIR)/$(NAME).lv2/

# --------------------------------------------------------------
# JACK

jack: $(jack)

$(jack): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs jack) -DDISTRHO_PLUGIN_TARGET_JACK -o $@

# --------------------------------------------------------------
# LADSPA

ladspa: $(ladspa_dsp)

$(ladspa_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LADSPA -o $@

# --------------------------------------------------------------
# DSSI

dssi: $(dssi_dsp) $(dssi_ui)
dssi_dsp: $(dssi_dsp)
dssi_ui: $(dssi_ui)

$(dssi_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@

$(dssi_ui): $(OBJS_UI) $(DISTRHO_UI_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs liblo) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@

# --------------------------------------------------------------
# LV2

lv2_one: $(lv2)
lv2_dsp: $(lv2_dsp)
lv2_sep: $(lv2_dsp) $(lv2_ui)

$(lv2): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@

$(lv2_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@

$(lv2_ui): $(OBJS_UI) $(DISTRHO_UI_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@

# --------------------------------------------------------------
# VST

vst: $(vst)

$(vst): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_VST -o $@

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

-include $(OBJS_DSP:%.o=%.d)
ifeq ($(HAVE_DGL),true)
-include $(OBJS_UI:%.o=%.d)
endif

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

+ 76100
- 0
plugins/SoulForce/DistrhoArtworkSoulForce.cpp
File diff suppressed because it is too large
View File


+ 60
- 0
plugins/SoulForce/DistrhoArtworkSoulForce.hpp View File

@@ -0,0 +1,60 @@
/* (Auto-generated binary data file). */

#ifndef BINARY_DISTRHOARTWORKSOULFORCE_HPP
#define BINARY_DISTRHOARTWORKSOULFORCE_HPP

namespace DistrhoArtworkSoulForce
{
extern const char* aboutData;
const unsigned int aboutDataSize = 378080;
const unsigned int aboutWidth = 278;
const unsigned int aboutHeight = 340;

extern const char* backgroundData;
const unsigned int backgroundDataSize = 283560;
const unsigned int backgroundWidth = 278;
const unsigned int backgroundHeight = 340;

extern const char* button_downData;
const unsigned int button_downDataSize = 4959;
const unsigned int button_downWidth = 29;
const unsigned int button_downHeight = 57;

extern const char* button_upData;
const unsigned int button_upDataSize = 4959;
const unsigned int button_upWidth = 29;
const unsigned int button_upHeight = 57;

extern const char* knob_feedbackData;
const unsigned int knob_feedbackDataSize = 2097600;
const unsigned int knob_feedbackWidth = 80;
const unsigned int knob_feedbackHeight = 8740;

extern const char* knob_shapeData;
const unsigned int knob_shapeDataSize = 2097600;
const unsigned int knob_shapeWidth = 80;
const unsigned int knob_shapeHeight = 8740;

extern const char* led_offData;
const unsigned int led_offDataSize = 3570;
const unsigned int led_offWidth = 34;
const unsigned int led_offHeight = 35;

extern const char* led_onData;
const unsigned int led_onDataSize = 3570;
const unsigned int led_onWidth = 34;
const unsigned int led_onHeight = 35;

extern const char* switch_leftData;
const unsigned int switch_leftDataSize = 6273;
const unsigned int switch_leftWidth = 51;
const unsigned int switch_leftHeight = 41;

extern const char* switch_rightData;
const unsigned int switch_rightDataSize = 6273;
const unsigned int switch_rightWidth = 51;
const unsigned int switch_rightHeight = 41;
}

#endif // BINARY_DISTRHOARTWORKSOULFORCE_HPP


+ 37
- 0
plugins/SoulForce/DistrhoPluginInfo.h View File

@@ -0,0 +1,37 @@
/*
* DISTRHO SoulForce, a DPF'ied SoulForce.
* Copyright (c) 2006 Niall Moody
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_NAME "Soul Force"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/soulforce.htm"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

+ 310
- 0
plugins/SoulForce/DistrhoPluginSoulForce.cpp View File

@@ -0,0 +1,310 @@
/*
* DISTRHO SoulForce, a DPF'ied SoulForce.
* Copyright (c) 2006 Niall Moody
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include "DistrhoPluginSoulForce.hpp"
START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------
DistrhoPluginSoulForce::DistrhoPluginSoulForce()
: Plugin(kParameterCount, 9, 0), // 9 programs, 0 states
coeff(0.5f),
wave(0.0f),
env(0.0f),
footEnv(0.0f)
{
// set initial values
d_setProgram(0);
}
// -----------------------------------------------------------------------
// Init
void DistrhoPluginSoulForce::d_initParameter(uint32_t index, Parameter& parameter)
{
parameter.hints = kParameterIsAutomable;
parameter.ranges.min = 0.0f;
parameter.ranges.max = 1.0f;
switch (index)
{
case kParameterShape:
parameter.name = "Shape";
parameter.symbol = "shape";
parameter.ranges.def = 0.5f;
break;
case kParameterFeedback:
parameter.name = "FBack";
parameter.symbol = "fback";
parameter.ranges.def = 0.0f;
break;
case kParameterSource:
parameter.hints |= kParameterIsBoolean;
parameter.name = "Source";
parameter.symbol = "source";
parameter.ranges.def = 0.0f;
break;
case kParameterFootswitch:
parameter.hints |= kParameterIsBoolean;
parameter.name = "Foot";
parameter.symbol = "foot";
parameter.ranges.def = 1.0f;
break;
}
}
void DistrhoPluginSoulForce::d_initProgramName(uint32_t index, d_string& programName)
{
switch(index)
{
case 0:
programName = "Default";
break;
case 1:
programName = "Stay Down";
break;
case 2:
programName = "Looking for the World";
break;
case 3:
programName = "Guerilla Love";
break;
case 4:
programName = "Tumble to the Power";
break;
case 5:
programName = "Do Yourself a Favour";
break;
case 6:
programName = "Past is Past";
break;
case 7:
programName = "You and Only You";
break;
case 8:
programName = "Soul Force";
break;
}
}
// -----------------------------------------------------------------------
// Internal data
float DistrhoPluginSoulForce::d_getParameterValue(uint32_t index) const
{
return parameters[index];
}
void DistrhoPluginSoulForce::d_setParameterValue(uint32_t index, float value)
{
parameters[index] = value;
switch(index)
{
case kParameterShape:
coeff = (1.0f-(1.0f/((value * 0.99f)+0.005f)));
break;
case kParameterFeedback:
if (d_isZero(value))
coeff = (1.0f-(1.0f/((parameters[kParameterShape] * 0.99f)+0.005f)));
break;
}
}
void DistrhoPluginSoulForce::d_setProgram(uint32_t index)
{
switch(index)
{
case 0:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 1:
parameters[kParameterShape] = 0.4f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 2:
parameters[kParameterShape] = 1.0f;
parameters[kParameterFeedback] = 0.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 3:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 4:
parameters[kParameterShape] = 0.0f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 5:
parameters[kParameterShape] = 0.5f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 1.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 6:
parameters[kParameterShape] = 0.0f;
parameters[kParameterFeedback] = 1.0f;
parameters[kParameterSource] = 1.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 7:
parameters[kParameterShape] = 0.3f;
parameters[kParameterFeedback] = 0.5f;
parameters[kParameterSource] = 0.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
case 8:
parameters[kParameterShape] = 0.3f;
parameters[kParameterFeedback] = 0.5f;
parameters[kParameterSource] = 1.0f;
parameters[kParameterFootswitch] = 1.0f;
break;
}
}
// -----------------------------------------------------------------------
// Process
void DistrhoPluginSoulForce::d_run(const float** inputs, float** outputs, uint32_t frames)
{
float tempf, tempf2;
float inLeft, inRight;
//frames = sampleFrames;
// Calculate audio.
for (uint32_t i=0; i<frames; ++i)
{
// For footEnv, later.
inLeft = inputs[0][i];
inRight = inputs[1][i];
// Update coeff, if necessary.
if (parameters[kParameterFeedback] > 0.0f)
{
if (parameters[kParameterSource] > 0.5f)
{
tempf2 = (1.0f-parameters[kParameterFeedback]) * parameters[kParameterShape];
tempf2 += parameters[kParameterFeedback] * wave;
coeff = (1.0f-(1.0f/((tempf2 * 0.99f)+0.005f)));
}
else
{
if ((tempf = std::abs(inLeft)) > env)
{
env = tempf;
}
else if (env > 0.0f)
{
env -= 0.001f;
if (env < 0.0f)
env = 0.0f;
}
tempf2 = (1.0f-parameters[kParameterFeedback]) * parameters[kParameterShape];
tempf2 += parameters[kParameterFeedback] * env;
coeff = (1.0f-(1.0f/((tempf2 * 0.99f)+0.005f)));
}
}
tempf = inLeft;
if (tempf > 0.0f)
{
tempf = tempf/(tempf+(coeff*(tempf-1.0f)));
}
else if (d_isZero(tempf))
{
tempf = 0.0f;
}
else
{
tempf = std::abs(tempf);
tempf = 1.0f - (tempf/(tempf+(coeff*(tempf-1.0f))));
tempf -= 1.0f;
}
if (parameters[kParameterShape] < 0.5f)
tempf *= ((0.5f-parameters[kParameterShape])*16.0f)+1.0f;
if (parameters[kParameterSource] > 0.5f)
tempf *= 1.0f + (parameters[kParameterFeedback] * 2.0f);
outputs[0][i] = tempf;
tempf = inRight;
if (tempf > 0.0f)
{
tempf = tempf/(tempf+(coeff*(tempf-1.0f)));
}
else if (d_isZero(tempf))
{
tempf = 0.0f;
}
else
{
tempf = std::abs(tempf);
tempf = 1.0f - (tempf/(tempf+(coeff*(tempf-1.0f))));
tempf -= 1.0f;
}
if (parameters[kParameterShape] < 0.5f)
tempf *= ((0.5f-parameters[kParameterShape])*16.0f)+1.0f;
if (parameters[kParameterSource] > 0.5f)
tempf *= 1.0f + (parameters[kParameterFeedback] * 2.0f);
outputs[1][i] = tempf;
outputs[0][i] = std::tanh(outputs[0][i]) * 0.9f;
outputs[1][i] = std::tanh(outputs[1][i]) * 0.9f;
wave = outputs[0][i];
// Handle footswitch.
outputs[0][i] *= footEnv;
outputs[0][i] += (1.0f-footEnv) * inLeft;
outputs[1][i] *= footEnv;
outputs[1][i] += (1.0f-footEnv) * inRight;
if (parameters[kParameterFootswitch] > 0.5f && footEnv < 1.0f)
footEnv += 0.01f;
else if (parameters[kParameterFootswitch] < 0.5f && footEnv > 0.0f)
footEnv -= 0.01f;
}
}
// -----------------------------------------------------------------------
Plugin* createPlugin()
{
return new DistrhoPluginSoulForce();
}
// -----------------------------------------------------------------------
END_NAMESPACE_DISTRHO

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

@@ -0,0 +1,116 @@
/*
* DISTRHO SoulForce, a DPF'ied SoulForce.
* Copyright (c) 2006 Niall Moody
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef DISTRHO_PLUGIN_MVERB_HPP_INCLUDED
#define DISTRHO_PLUGIN_MVERB_HPP_INCLUDED
#include "DistrhoPlugin.hpp"
START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------
class DistrhoPluginSoulForce : public Plugin
{
public:
enum Parameters {
kParameterShape,
kParameterFeedback,
kParameterSource,
kParameterFootswitch,
kParameterCount
};
DistrhoPluginSoulForce();
protected:
// -------------------------------------------------------------------
// Information
const char* d_getLabel() const noexcept override
{
return "SoulForce";
}
const char* d_getMaker() const noexcept override
{
return "ndc Plugs";
}
const char* d_getLicense() const noexcept override
{
return ""; // FIXME
}
uint32_t d_getVersion() const noexcept override
{
return 0x1000;
}
int64_t d_getUniqueId() const noexcept override
{
return d_cconst('S', 'l', 'F', 'r');
}
// -------------------------------------------------------------------
// Init
void d_initParameter(uint32_t index, Parameter& parameter) override;
void d_initProgramName(uint32_t index, d_string& programName) override;
// -------------------------------------------------------------------
// Internal data
float d_getParameterValue(uint32_t index) const override;
void d_setParameterValue(uint32_t index, float value) override;
void d_setProgram(uint32_t index) override;
// -------------------------------------------------------------------
// Process
void d_run(const float** inputs, float** outputs, uint32_t frames) override;
// -------------------------------------------------------------------
private:
/// Array of our plugin's parameters.
float parameters[kParameterCount];
/// Waveshaper coefficient.
float coeff;
/// Current wave value for the feedback.
float wave;
/// Envelope value for the feedback.
float env;
/// Footswitch envelope.
float footEnv;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginSoulForce)
};
// -----------------------------------------------------------------------
END_NAMESPACE_DISTRHO
#endif // DISTRHO_PLUGIN_MVERB_HPP_INCLUDED

+ 207
- 0
plugins/SoulForce/DistrhoUISoulForce.cpp View File

@@ -0,0 +1,207 @@
/*
* DISTRHO SoulForce, a DPF'ied SoulForce.
* Copyright (c) 2006 Niall Moody
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#include "DistrhoUISoulForce.hpp"
#include "DistrhoPluginSoulForce.hpp"

START_NAMESPACE_DISTRHO

namespace Art = DistrhoArtworkSoulForce;

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

DistrhoUISoulForce::DistrhoUISoulForce()
: UI(Art::backgroundWidth, Art::backgroundHeight),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR),
fImgLedOff(Art::led_offData, Art::led_offWidth, Art::led_offHeight, GL_BGR),
fImgLedOn(Art::led_onData, Art::led_onWidth, Art::led_onHeight, GL_BGR)
{
// knobs
fKnobShape = new ImageKnob(this,
Image(Art::knob_shapeData, Art::knob_shapeWidth, Art::knob_shapeHeight, GL_BGR));
fKnobShape->setId(DistrhoPluginSoulForce::kParameterShape);
fKnobShape->setAbsolutePos(17, 64);
fKnobShape->setRange(0.0f, 1.0f);
fKnobShape->setDefault(0.5f);
fKnobShape->setImageLayerCount(92);
fKnobShape->setCallback(this);

fKnobFBack = new ImageKnob(this,
Image(Art::knob_feedbackData, Art::knob_feedbackWidth, Art::knob_feedbackHeight, GL_BGR));
fKnobFBack->setId(DistrhoPluginSoulForce::kParameterFeedback);
fKnobFBack->setAbsolutePos(176, 64);
fKnobFBack->setRange(0.0f, 1.0f);
fKnobFBack->setDefault(0.5f);
fKnobFBack->setImageLayerCount(92);
fKnobFBack->setCallback(this);

// switches
fSwitchSource = new ImageSwitch(this,
Image(Art::switch_leftData, Art::switch_leftWidth, Art::switch_leftHeight, GL_BGR),
Image(Art::switch_rightData, Art::switch_rightWidth, Art::switch_rightHeight, GL_BGR));
fSwitchSource->setId(DistrhoPluginSoulForce::kParameterSource);
fSwitchSource->setAbsolutePos(116, 191);
fSwitchSource->setCallback(this);

fSwitchFoot = new ImageSwitch(this,
Image(Art::button_upData, Art::button_upWidth, Art::button_upHeight, GL_BGR),
Image(Art::button_downData, Art::button_downWidth, Art::button_downHeight, GL_BGR));
fSwitchFoot->setId(DistrhoPluginSoulForce::kParameterFootswitch);
fSwitchFoot->setAbsolutePos(125, 282);
fSwitchFoot->setCallback(this);

// set initial values
d_programChanged(0);
}

// -----------------------------------------------------------------------
// DSP Callbacks

void DistrhoUISoulForce::d_parameterChanged(uint32_t index, float value)
{
switch (index)
{
case DistrhoPluginSoulForce::kParameterShape:
fKnobShape->setValue(value);
break;
case DistrhoPluginSoulForce::kParameterFeedback:
fKnobFBack->setValue(value);
break;
case DistrhoPluginSoulForce::kParameterSource:
fSwitchSource->setDown(value > 0.5f);
break;
case DistrhoPluginSoulForce::kParameterFootswitch:
fSwitchFoot->setDown(value > 0.5f);
break;
}
}

void DistrhoUISoulForce::d_programChanged(uint32_t index)
{
switch(index)
{
case 0:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 1:
fKnobShape->setValue(0.4f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 2:
fKnobShape->setValue(1.0f);
fKnobFBack->setValue(0.0f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 3:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 4:
fKnobShape->setValue(0.0f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 5:
fKnobShape->setValue(0.5f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(true);
fSwitchFoot->setDown(true);
break;
case 6:
fKnobShape->setValue(0.0f);
fKnobFBack->setValue(1.0f);
fSwitchSource->setDown(true);
fSwitchFoot->setDown(true);
break;
case 7:
fKnobShape->setValue(0.3f);
fKnobFBack->setValue(0.5f);
fSwitchSource->setDown(false);
fSwitchFoot->setDown(true);
break;
case 8:
fKnobShape->setValue(0.3f);
fKnobFBack->setValue(0.5f);
fSwitchSource->setDown(true);
fSwitchFoot->setDown(true);
break;
}
}

// -----------------------------------------------------------------------
// Widget Callbacks

void DistrhoUISoulForce::imageKnobDragStarted(ImageKnob* knob)
{
d_editParameter(knob->getId(), true);
}

void DistrhoUISoulForce::imageKnobDragFinished(ImageKnob* knob)
{
d_editParameter(knob->getId(), false);
}

void DistrhoUISoulForce::imageKnobValueChanged(ImageKnob* knob, float value)
{
d_setParameterValue(knob->getId(), value);
}

void DistrhoUISoulForce::imageSwitchClicked(ImageSwitch* button, bool down)
{
const uint buttonId(button->getId());

d_editParameter(buttonId, true);
d_setParameterValue(buttonId, down ? 1.0f : 0.0f);
d_editParameter(buttonId, false);
}

void DistrhoUISoulForce::onDisplay()
{
fImgBackground.draw();

if (fSwitchFoot->isDown())
fImgLedOn.drawAt(123, 240);
else
fImgLedOff.drawAt(123, 240);
}

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

UI* createUI()
{
return new DistrhoUISoulForce();
}

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

END_NAMESPACE_DISTRHO

+ 81
- 0
plugins/SoulForce/DistrhoUISoulForce.hpp View File

@@ -0,0 +1,81 @@
/*
* DISTRHO SoulForce, a DPF'ied SoulForce.
* Copyright (c) 2006 Niall Moody
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#ifndef DISTRHO_UI_MVERB_HPP_INCLUDED
#define DISTRHO_UI_MVERB_HPP_INCLUDED

#include "DistrhoUI.hpp"

#include "ImageKnob.hpp"
#include "ImageSlider.hpp"
#include "ImageSwitch.hpp"

#include "DistrhoArtworkSoulForce.hpp"

using DGL::Image;
using DGL::ImageKnob;
using DGL::ImageSwitch;

START_NAMESPACE_DISTRHO

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

class DistrhoUISoulForce : public UI,
public ImageKnob::Callback,
public ImageSwitch::Callback
{
public:
DistrhoUISoulForce();

protected:
// -------------------------------------------------------------------
// DSP Callbacks

void d_parameterChanged(uint32_t index, float value) override;
void d_programChanged(uint32_t index) override;

// -------------------------------------------------------------------
// Widget Callbacks

void imageKnobDragStarted(ImageKnob* knob) override;
void imageKnobDragFinished(ImageKnob* knob) override;
void imageKnobValueChanged(ImageKnob* knob, float value) override;

void imageSwitchClicked(ImageSwitch* imageButton, bool down) override;

void onDisplay() override;

private:
Image fImgBackground, fImgLedOff, fImgLedOn;
ScopedPointer<ImageKnob> fKnobShape, fKnobFBack;
ScopedPointer<ImageSwitch> fSwitchSource, fSwitchFoot;

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUISoulForce)
};

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

END_NAMESPACE_DISTRHO

#endif // DISTRHO_UI_MVERB_HPP_INCLUDED

+ 53
- 0
plugins/SoulForce/Makefile View File

@@ -0,0 +1,53 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#

# --------------------------------------------------------------
# Project name, used for binaries

NAME = SoulForce

# --------------------------------------------------------------
# Files to build

OBJS_DSP = \
DistrhoPluginSoulForce.cpp.o

OBJS_UI = \
DistrhoArtworkSoulForce.cpp.o \
DistrhoUISoulForce.cpp.o

# --------------------------------------------------------------
# Do some magic

include ../Makefile.mk

# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(HAVE_JACK),true)
TARGETS += jack
endif

ifeq ($(LINUX),true)
TARGETS += ladspa
ifeq ($(HAVE_DGL),true)
ifeq ($(HAVE_LIBLO),true)
TARGETS += dssi
endif
endif
endif

ifeq ($(HAVE_DGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

TARGETS += vst

all: $(TARGETS)

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

BIN
plugins/SoulForce/Screenshot.png View File

Before After
Width: 278  |  Height: 340  |  Size: 66KB

BIN
plugins/SoulForce/artwork/SoulForcePedal.blend View File


BIN
plugins/SoulForce/artwork/about.png View File

Before After
Width: 278  |  Height: 340  |  Size: 46KB

BIN
plugins/SoulForce/artwork/background.png View File

Before After
Width: 278  |  Height: 340  |  Size: 58KB

BIN
plugins/SoulForce/artwork/button_down.png View File

Before After
Width: 29  |  Height: 57  |  Size: 2.0KB

BIN
plugins/SoulForce/artwork/button_up.png View File

Before After
Width: 29  |  Height: 57  |  Size: 2.2KB

BIN
plugins/SoulForce/artwork/knob-feedback.png View File

Before After
Width: 80  |  Height: 8740  |  Size: 255KB

BIN
plugins/SoulForce/artwork/knob-shape.png View File

Before After
Width: 80  |  Height: 8740  |  Size: 264KB

BIN
plugins/SoulForce/artwork/led_off.png View File

Before After
Width: 34  |  Height: 35  |  Size: 1.5KB

BIN
plugins/SoulForce/artwork/led_on.png View File

Before After
Width: 34  |  Height: 35  |  Size: 1.9KB

BIN
plugins/SoulForce/artwork/switch_left.png View File

Before After
Width: 51  |  Height: 41  |  Size: 2.7KB

BIN
plugins/SoulForce/artwork/switch_right.png View File

Before After
Width: 51  |  Height: 41  |  Size: 2.7KB

Loading…
Cancel
Save