Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
/build
/dep
/dist
/metamodule-plugins
*.afdesign~lock~
61 changes: 61 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
cmake_minimum_required(VERSION 3.22)

if(NOT "${METAMODULE_SDK_DIR}" STREQUAL "")
message("METAMODULE_SDK_DIR set by CMake variable ${METAMODULE_SDK_DIR}")
elseif (DEFINED ENV{METAMODULE_SDK_DIR})
set(METAMODULE_SDK_DIR "$ENV{METAMODULE_SDK_DIR}")
message("METAMODULE_SDK_DIR set by environment variable ${METAMODULE_SDK_DIR}")
else()
set(METAMODULE_SDK_DIR "${CMAKE_CURRENT_LIST_DIR}/../metamodule-plugin-sdk")
message("METAMODULE_SDK_DIR set to default: ${METAMODULE_SDK_DIR}")
endif()

include(${METAMODULE_SDK_DIR}/plugin.cmake)

project(Vulpes79Ports
VERSION 2.0.1
DESCRIPTION "Vulpes79 ports"
LANGUAGES C CXX ASM
)

add_library(Vulpes79Ports STATIC)

target_sources(Vulpes79Ports
PRIVATE
src/plugin.cpp
src/AcidusVersio.cpp
src/open303/fft4g.c
src/open303/GlobalFunctions.cpp
src/open303/rosic_AnalogEnvelope.cpp
src/open303/rosic_BiquadFilter.cpp
src/open303/rosic_BlendOscillator.cpp
src/open303/rosic_Complex.cpp
src/open303/rosic_DecayEnvelope.cpp
src/open303/rosic_FourierTransformerRadix2.cpp
src/open303/rosic_FunctionTemplates.cpp
src/open303/rosic_LeakyIntegrator.cpp
src/open303/rosic_MidiNoteEvent.cpp
src/open303/rosic_MipMappedWaveTable.cpp
src/open303/rosic_NumberManipulations.cpp
src/open303/rosic_OnePoleFilter.cpp
src/open303/rosic_Open303.cpp
src/open303/rosic_RealFunctions.cpp
src/open303/rosic_TeeBeeFilter.cpp
)

# Add includes and compile options for source repo
target_include_directories(Vulpes79Ports
PRIVATE
src/
)

add_compile_options(-fno-exceptions -fno-strict-aliasing)

# Call this to link and create the plugin file
create_plugin(
SOURCE_LIB Vulpes79Ports # The cmake target name (defined in add_target)
PLUGIN_NAME Vulpes79Ports # This must match the brand "slug" used in VCV Rack
PLUGIN_JSON ${CMAKE_CURRENT_LIST_DIR}/plugin.json # Path to the plugin.json file used by VCV Rack
SOURCE_ASSETS ${CMAKE_CURRENT_LIST_DIR}/assets # Path to the assets/ dir containing the PNGs
DESTINATION ${CMAKE_CURRENT_LIST_DIR}/metamodule-plugins # Path to where you want the plugin file output
)
Binary file added assets/AcidusVersio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions plugin-mm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"MetaModuleBrandName": "Vulpes79Ports",
"MetaModuleBrandSlug": "Vulpes79Ports",
"MetaModulePluginMaintainer": "Vulpes79Ports",
"MetaModulePluginMaintainerEmail": "",
"MetaModulePluginMaintainerUrl": "",
"MetaModuleDescription": "Vulpes79 ports modules optimised for metamodule",
"MetaModuleIncludedModules":
[
{
"slug": "AcidusVersio",
"name": "Acidus Versio"
}
]
}
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Acidus Versio",
"version": "2.0.0",
"license": "MIT",
"brand": "Vulpes79",
"brand": "Vulpes79Ports",
"author": "Vulpes79",
"authorEmail": "",
"authorUrl": "https://github.com/jjbbllkk",
Expand Down
6 changes: 5 additions & 1 deletion src/open303/GlobalDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ inline double dummyFunction(double x) { return x; }

//extract the exponent from a IEEE 754 floating point number (single and double precision):
#define EXPOFFLT(value) (((*((reinterpret_cast<UINT32 *>(&value)))&0x7FFFFFFF)>>23)-127)
#define EXPOFDBL(value) (((*((reinterpret_cast<UINT64 *>(&value)))&0x7FFFFFFFFFFFFFFFULL)>>52)-1023)
#define EXPOFDBL(value) ({ \
UINT64 temp; \
memcpy(&temp, &value, sizeof(UINT64)); \
(int)(((temp & 0x7FFFFFFFFFFFFFFFULL) >> 52) - 1023); \
})
// ULL indicates an unsigned long long literal constant

#endif
2 changes: 1 addition & 1 deletion src/open303/rosic_MipMappedWaveTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ namespace rosic
int waveform; // index of the currently chosen native waveform
double sampleRate; // the sampleRate

double prototypeTable[tableLength];
double prototypeTable[tableLength+4];
// this is the prototype-table with full bandwidth. one additional sample (same as
// prototypeTable[0]) for linear interpolation without need for table wraparound at the last
// sample (-> saves one if-statement each audio-cycle) ...and a three further addtional
Expand Down
16 changes: 5 additions & 11 deletions src/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#include "plugin.hpp"

// Define the global plugin instance
Plugin* pluginInstance;

// --- EXPORT THE ABI VERSION ---
// This is the symbol Rack looks for to verify the version.
extern "C" __attribute__((visibility("default"))) uint32_t rack_plugin_abi_version = 1;
void init(Plugin* p) {
pluginInstance = p;

// --- INITIALIZE THE PLUGIN ---
extern "C" __attribute__((visibility("default"))) void init(Plugin* p) {
pluginInstance = p;

// Register the module model
p->addModel(modelAcidusVersio);
}
// Register all modules
p->addModel(modelAcidusVersio);
}