Skip to content

Commit

Permalink
Add argotlunar
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Mar 23, 2015
1 parent 1b9285d commit 6c6d502
Show file tree
Hide file tree
Showing 38 changed files with 6,554 additions and 0 deletions.
50 changes: 50 additions & 0 deletions ports/Makefile
@@ -0,0 +1,50 @@
# -----------------------------------------
# Compile all the Plugins

all: plugins

plugins: lv2 vst

# -----------------------------------------
# lv2

lv2:
install -d ../bin/lv2
$(MAKE) -C argotlunar/LV2
$(MAKE) -C cabbage/LV2-fx
$(MAKE) -C cabbage/LV2-ins
$(MAKE) -C cabbage/LV2-midi

# -----------------------------------------
# vst

vst:
install -d ../bin/vst
$(MAKE) -C argotlunar/VST
$(MAKE) -C cabbage/VST-fx
$(MAKE) -C cabbage/VST-ins
$(MAKE) -C cabbage/VST-midi

# -----------------------------------------
# clean

clean:
# LV2
$(MAKE) clean -C argotlunar/LV2
$(MAKE) clean -C cabbage/LV2-fx
$(MAKE) clean -C cabbage/LV2-ins
$(MAKE) clean -C cabbage/LV2-midi

# VST
$(MAKE) clean -C argotlunar/VST
$(MAKE) clean -C cabbage/VST-fx
$(MAKE) clean -C cabbage/VST-ins
$(MAKE) clean -C cabbage/VST-midi

rm -rf */LV2/intermediate
rm -rf */VST/intermediate

distclean: clean
rm -rf */LV2/*.lv2
rm -f */*/Makefile
rm -f */*/*.make
31 changes: 31 additions & 0 deletions ports/argotlunar/JuceLibraryCode/JuceHeader.h
@@ -0,0 +1,31 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
This is the header file that your files should include in order to get all the
JUCE library headers. You should avoid including the JUCE headers directly in
your own source files, because that wouldn't pick up the correct configuration
options for your app.
*/

#ifndef __APPHEADERFILE_ULIIGD__
#define __APPHEADERFILE_ULIIGD__

#include "JucePluginMain.h"

#if ! DONT_SET_USING_JUCE_NAMESPACE
// If your code uses a lot of JUCE classes, then this will obviously save you
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
using namespace juce;
#endif

namespace ProjectInfo
{
const char* const projectName = "Argotlunar";
const char* const versionString = "2.0.6";
const int versionNumber = 0x20006;
}

#endif // __APPHEADERFILE_ULIIGD__
129 changes: 129 additions & 0 deletions ports/argotlunar/JuceLibraryCode/JucePluginCharacteristics.h
@@ -0,0 +1,129 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
There's a section below where you can add your own custom code safely, and the
Introjucer will preserve the contents of that block, but the best way to change
any of these definitions is by using the Introjucer's project settings.
Any commented-out settings will assume their default values.
*/

#ifndef __JUCE_APPCONFIG_ULIIGD__
#define __JUCE_APPCONFIG_ULIIGD__

//==============================================================================
// Audio plugin settings..

#ifndef JucePlugin_Name
#define JucePlugin_Name "Argotlunar"
#endif
#ifndef JucePlugin_Desc
#define JucePlugin_Desc "Argotlunar"
#endif
#ifndef JucePlugin_Manufacturer
#define JucePlugin_Manufacturer "Michael Ourednik"
#endif
#ifndef JucePlugin_ManufacturerCode
#define JucePlugin_ManufacturerCode 'ARG1'
#endif
#ifndef JucePlugin_PluginCode
#define JucePlugin_PluginCode 'ARG1'
#endif
#ifndef JucePlugin_MaxNumInputChannels
#define JucePlugin_MaxNumInputChannels 2
#endif
#ifndef JucePlugin_MaxNumOutputChannels
#define JucePlugin_MaxNumOutputChannels 2
#endif
#ifndef JucePlugin_PreferredChannelConfigurations
#define JucePlugin_PreferredChannelConfigurations {2, 2}
#endif
#ifndef JucePlugin_IsSynth
#define JucePlugin_IsSynth 0
#endif
#ifndef JucePlugin_WantsMidiInput
#define JucePlugin_WantsMidiInput 0
#endif
#ifndef JucePlugin_ProducesMidiOutput
#define JucePlugin_ProducesMidiOutput 0
#endif
#ifndef JucePlugin_SilenceInProducesSilenceOut
#define JucePlugin_SilenceInProducesSilenceOut 0
#endif
#ifndef JucePlugin_EditorRequiresKeyboardFocus
#define JucePlugin_EditorRequiresKeyboardFocus 1
#endif
#ifndef JucePlugin_Version
#define JucePlugin_Version 2.0.6
#endif
#ifndef JucePlugin_VersionCode
#define JucePlugin_VersionCode 0x20006
#endif
#ifndef JucePlugin_VersionString
#define JucePlugin_VersionString "2.0.6"
#endif
#ifndef JucePlugin_VSTUniqueID
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
#endif
#ifndef JucePlugin_VSTCategory
#define JucePlugin_VSTCategory kPlugCategEffect
#endif
#ifndef JucePlugin_AUMainType
#define JucePlugin_AUMainType kAudioUnitType_Effect
#endif
#ifndef JucePlugin_AUSubType
#define JucePlugin_AUSubType JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AUExportPrefix
#define JucePlugin_AUExportPrefix ArgotlunarAU
#endif
#ifndef JucePlugin_AUExportPrefixQuoted
#define JucePlugin_AUExportPrefixQuoted "ArgotlunarAU"
#endif
#ifndef JucePlugin_AUManufacturerCode
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_CFBundleIdentifier
#define JucePlugin_CFBundleIdentifier com.MichaelOurednik.Argotlunar
#endif
#ifndef JucePlugin_RTASCategory
#define JucePlugin_RTASCategory ePlugInCategory_None
#endif
#ifndef JucePlugin_RTASManufacturerCode
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_RTASProductId
#define JucePlugin_RTASProductId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_RTASDisableBypass
#define JucePlugin_RTASDisableBypass 0
#endif
#ifndef JucePlugin_RTASDisableMultiMono
#define JucePlugin_RTASDisableMultiMono 0
#endif
#ifndef JucePlugin_AAXIdentifier
#define JucePlugin_AAXIdentifier com.yourcompany.Argotlunar
#endif
#ifndef JucePlugin_AAXManufacturerCode
#define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_AAXProductId
#define JucePlugin_AAXProductId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AAXPluginId
#define JucePlugin_AAXPluginId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AAXCategory
#define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics
#endif
#ifndef JucePlugin_AAXDisableBypass
#define JucePlugin_AAXDisableBypass 0
#endif

#define JucePlugin_LV2URI "http://argotlunar.info/"
#define JucePlugin_WantsLV2TimePos 1

#endif // __JUCE_APPCONFIG_ULIIGD__
17 changes: 17 additions & 0 deletions ports/argotlunar/LV2/premake.lua
@@ -0,0 +1,17 @@

dofile("../../../scripts/make-project.lua")

package = make_juce_lv2_project("argotlunar")

package.includepaths = {
package.includepaths,
"../Source",
"../JuceLibraryCode"
}

package.files = {
matchfiles (
"../Source/*.cpp",
"../../../libs/juce-plugin/JucePluginMain.cpp"
)
}
10 changes: 10 additions & 0 deletions ports/argotlunar/README.md
@@ -0,0 +1,10 @@
Argotlunar
==========

Realtime granulator VST plugin.

Uses the JUCE toolkit. This version is based on JUCE Git 2013-02-17.

Licensed under GPLv2

[http://argotlunar.info](http://argotlunar.info)
78 changes: 78 additions & 0 deletions ports/argotlunar/Source/CombFilter.cpp
@@ -0,0 +1,78 @@
#include "CombFilter.h"

CombFilter::CombFilter(float samplerate)
{
this->samplerate = samplerate;
buflen = (int)(samplerate / 22.0f);
buffer = new float[buflen];
rampsamples = (int)(samplerate / 1000.0f); // initial 1ms ramp to avoid clicks
ramp_increment = 1.0f / rampsamples;
}

CombFilter::~CombFilter()
{
delete[] buffer;
}

// accepts params between 0.0f - 1.0f
void CombFilter::initialize(float freq_param, float q_param)
{
float freq_hz = pow(10.0f, freq_param * 3.0f) * 22.05f;
delay = (int)((1.0f / freq_hz) * samplerate);
resonance = q_param;
buf_read_pos = buflen - delay;

if (buf_read_pos == buflen) {
buf_read_pos = 0;
}
for(int i = 0; i < buflen; i++) {
buffer[i] = 10E-12f;
}

delay_buf_write_pos = 0;
process_counter = 0;
ramp = 0.0f;
}

void CombFilter::process(float* input, int sampleframes)
{
if ((delay_buf_write_pos + sampleframes) < buflen
&& (buf_read_pos + sampleframes) < buflen
&& (process_counter + sampleframes) > rampsamples) {
for (int i = 0; i < sampleframes; i++) {
processSample(&input[i]);
}
} else {
for (int i = 0; i < sampleframes; i++) {
processSample(&input[i]);
if (delay_buf_write_pos == buflen) {
delay_buf_write_pos = 0;
}
if (buf_read_pos == buflen) {
buf_read_pos = 0;
}
if (process_counter < rampsamples) {
process_counter++;
ramp += ramp_increment;
}
}
}
}
/*
inline void CombFilter::processSample(float* input)
{
buffer[delay_buf_write_pos] = *input * resonance * ramp;
*input = (*input * 0.5f) + (buffer[buf_read_pos] * 0.5f);
delay_buf_write_pos++;
buf_read_pos++;
process_counter++;
}
*/
inline void CombFilter::processSample(float* input)
{
*input = *input + buffer[buf_read_pos] * resonance;
buffer[delay_buf_write_pos] = *input ;
delay_buf_write_pos++;
buf_read_pos++;
process_counter++;
}
32 changes: 32 additions & 0 deletions ports/argotlunar/Source/CombFilter.h
@@ -0,0 +1,32 @@
#ifndef COMBFILTER_H
#define COMBFILTER_H

#include <math.h>
#include "Debug.h"

class CombFilter
{
public:
CombFilter(float samplerate);
~CombFilter();
void initialize(float freq_param, float q_param);
void process(float* input, int sampleframes);

private:
inline void processSample(float* input);

float *buffer;
float delaysample;
float output;
float samplerate;
float ramp_increment;
float ramp;
float resonance;
int rampsamples;
int delay;
int buflen;
int delay_buf_write_pos, buf_read_pos;
int process_counter;
};

#endif //COMBFILTER_H
24 changes: 24 additions & 0 deletions ports/argotlunar/Source/Debug.h
@@ -0,0 +1,24 @@
#ifndef DEBUG_H
#define DEBUG_H

#ifdef LINUX
#define DEBUG
#endif

#ifdef DEBUG
#include <iostream>

namespace dbg
{
inline void string(std::string text)
{
std::cout << text << "\n";
}
inline void value(std::string text, float val)
{
std::cout << text << ": " << val << "\n";
}
}
#endif //DEBUG
#endif //DEBUG_H

0 comments on commit 6c6d502

Please sign in to comment.