Skip to content

Commit 6c6d502

Browse files
author
falkTX
committed
Add argotlunar
1 parent 1b9285d commit 6c6d502

38 files changed

Lines changed: 6554 additions & 0 deletions

ports/Makefile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -----------------------------------------
2+
# Compile all the Plugins
3+
4+
all: plugins
5+
6+
plugins: lv2 vst
7+
8+
# -----------------------------------------
9+
# lv2
10+
11+
lv2:
12+
install -d ../bin/lv2
13+
$(MAKE) -C argotlunar/LV2
14+
$(MAKE) -C cabbage/LV2-fx
15+
$(MAKE) -C cabbage/LV2-ins
16+
$(MAKE) -C cabbage/LV2-midi
17+
18+
# -----------------------------------------
19+
# vst
20+
21+
vst:
22+
install -d ../bin/vst
23+
$(MAKE) -C argotlunar/VST
24+
$(MAKE) -C cabbage/VST-fx
25+
$(MAKE) -C cabbage/VST-ins
26+
$(MAKE) -C cabbage/VST-midi
27+
28+
# -----------------------------------------
29+
# clean
30+
31+
clean:
32+
# LV2
33+
$(MAKE) clean -C argotlunar/LV2
34+
$(MAKE) clean -C cabbage/LV2-fx
35+
$(MAKE) clean -C cabbage/LV2-ins
36+
$(MAKE) clean -C cabbage/LV2-midi
37+
38+
# VST
39+
$(MAKE) clean -C argotlunar/VST
40+
$(MAKE) clean -C cabbage/VST-fx
41+
$(MAKE) clean -C cabbage/VST-ins
42+
$(MAKE) clean -C cabbage/VST-midi
43+
44+
rm -rf */LV2/intermediate
45+
rm -rf */VST/intermediate
46+
47+
distclean: clean
48+
rm -rf */LV2/*.lv2
49+
rm -f */*/Makefile
50+
rm -f */*/*.make
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
3+
IMPORTANT! This file is auto-generated each time you save your
4+
project - if you alter its contents, your changes may be overwritten!
5+
6+
This is the header file that your files should include in order to get all the
7+
JUCE library headers. You should avoid including the JUCE headers directly in
8+
your own source files, because that wouldn't pick up the correct configuration
9+
options for your app.
10+
11+
*/
12+
13+
#ifndef __APPHEADERFILE_ULIIGD__
14+
#define __APPHEADERFILE_ULIIGD__
15+
16+
#include "JucePluginMain.h"
17+
18+
#if ! DONT_SET_USING_JUCE_NAMESPACE
19+
// If your code uses a lot of JUCE classes, then this will obviously save you
20+
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
21+
using namespace juce;
22+
#endif
23+
24+
namespace ProjectInfo
25+
{
26+
const char* const projectName = "Argotlunar";
27+
const char* const versionString = "2.0.6";
28+
const int versionNumber = 0x20006;
29+
}
30+
31+
#endif // __APPHEADERFILE_ULIIGD__
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/*
2+
3+
IMPORTANT! This file is auto-generated each time you save your
4+
project - if you alter its contents, your changes may be overwritten!
5+
6+
There's a section below where you can add your own custom code safely, and the
7+
Introjucer will preserve the contents of that block, but the best way to change
8+
any of these definitions is by using the Introjucer's project settings.
9+
10+
Any commented-out settings will assume their default values.
11+
12+
*/
13+
14+
#ifndef __JUCE_APPCONFIG_ULIIGD__
15+
#define __JUCE_APPCONFIG_ULIIGD__
16+
17+
//==============================================================================
18+
// Audio plugin settings..
19+
20+
#ifndef JucePlugin_Name
21+
#define JucePlugin_Name "Argotlunar"
22+
#endif
23+
#ifndef JucePlugin_Desc
24+
#define JucePlugin_Desc "Argotlunar"
25+
#endif
26+
#ifndef JucePlugin_Manufacturer
27+
#define JucePlugin_Manufacturer "Michael Ourednik"
28+
#endif
29+
#ifndef JucePlugin_ManufacturerCode
30+
#define JucePlugin_ManufacturerCode 'ARG1'
31+
#endif
32+
#ifndef JucePlugin_PluginCode
33+
#define JucePlugin_PluginCode 'ARG1'
34+
#endif
35+
#ifndef JucePlugin_MaxNumInputChannels
36+
#define JucePlugin_MaxNumInputChannels 2
37+
#endif
38+
#ifndef JucePlugin_MaxNumOutputChannels
39+
#define JucePlugin_MaxNumOutputChannels 2
40+
#endif
41+
#ifndef JucePlugin_PreferredChannelConfigurations
42+
#define JucePlugin_PreferredChannelConfigurations {2, 2}
43+
#endif
44+
#ifndef JucePlugin_IsSynth
45+
#define JucePlugin_IsSynth 0
46+
#endif
47+
#ifndef JucePlugin_WantsMidiInput
48+
#define JucePlugin_WantsMidiInput 0
49+
#endif
50+
#ifndef JucePlugin_ProducesMidiOutput
51+
#define JucePlugin_ProducesMidiOutput 0
52+
#endif
53+
#ifndef JucePlugin_SilenceInProducesSilenceOut
54+
#define JucePlugin_SilenceInProducesSilenceOut 0
55+
#endif
56+
#ifndef JucePlugin_EditorRequiresKeyboardFocus
57+
#define JucePlugin_EditorRequiresKeyboardFocus 1
58+
#endif
59+
#ifndef JucePlugin_Version
60+
#define JucePlugin_Version 2.0.6
61+
#endif
62+
#ifndef JucePlugin_VersionCode
63+
#define JucePlugin_VersionCode 0x20006
64+
#endif
65+
#ifndef JucePlugin_VersionString
66+
#define JucePlugin_VersionString "2.0.6"
67+
#endif
68+
#ifndef JucePlugin_VSTUniqueID
69+
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
70+
#endif
71+
#ifndef JucePlugin_VSTCategory
72+
#define JucePlugin_VSTCategory kPlugCategEffect
73+
#endif
74+
#ifndef JucePlugin_AUMainType
75+
#define JucePlugin_AUMainType kAudioUnitType_Effect
76+
#endif
77+
#ifndef JucePlugin_AUSubType
78+
#define JucePlugin_AUSubType JucePlugin_PluginCode
79+
#endif
80+
#ifndef JucePlugin_AUExportPrefix
81+
#define JucePlugin_AUExportPrefix ArgotlunarAU
82+
#endif
83+
#ifndef JucePlugin_AUExportPrefixQuoted
84+
#define JucePlugin_AUExportPrefixQuoted "ArgotlunarAU"
85+
#endif
86+
#ifndef JucePlugin_AUManufacturerCode
87+
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
88+
#endif
89+
#ifndef JucePlugin_CFBundleIdentifier
90+
#define JucePlugin_CFBundleIdentifier com.MichaelOurednik.Argotlunar
91+
#endif
92+
#ifndef JucePlugin_RTASCategory
93+
#define JucePlugin_RTASCategory ePlugInCategory_None
94+
#endif
95+
#ifndef JucePlugin_RTASManufacturerCode
96+
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
97+
#endif
98+
#ifndef JucePlugin_RTASProductId
99+
#define JucePlugin_RTASProductId JucePlugin_PluginCode
100+
#endif
101+
#ifndef JucePlugin_RTASDisableBypass
102+
#define JucePlugin_RTASDisableBypass 0
103+
#endif
104+
#ifndef JucePlugin_RTASDisableMultiMono
105+
#define JucePlugin_RTASDisableMultiMono 0
106+
#endif
107+
#ifndef JucePlugin_AAXIdentifier
108+
#define JucePlugin_AAXIdentifier com.yourcompany.Argotlunar
109+
#endif
110+
#ifndef JucePlugin_AAXManufacturerCode
111+
#define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode
112+
#endif
113+
#ifndef JucePlugin_AAXProductId
114+
#define JucePlugin_AAXProductId JucePlugin_PluginCode
115+
#endif
116+
#ifndef JucePlugin_AAXPluginId
117+
#define JucePlugin_AAXPluginId JucePlugin_PluginCode
118+
#endif
119+
#ifndef JucePlugin_AAXCategory
120+
#define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics
121+
#endif
122+
#ifndef JucePlugin_AAXDisableBypass
123+
#define JucePlugin_AAXDisableBypass 0
124+
#endif
125+
126+
#define JucePlugin_LV2URI "http://argotlunar.info/"
127+
#define JucePlugin_WantsLV2TimePos 1
128+
129+
#endif // __JUCE_APPCONFIG_ULIIGD__

ports/argotlunar/LV2/premake.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
dofile("../../../scripts/make-project.lua")
3+
4+
package = make_juce_lv2_project("argotlunar")
5+
6+
package.includepaths = {
7+
package.includepaths,
8+
"../Source",
9+
"../JuceLibraryCode"
10+
}
11+
12+
package.files = {
13+
matchfiles (
14+
"../Source/*.cpp",
15+
"../../../libs/juce-plugin/JucePluginMain.cpp"
16+
)
17+
}

ports/argotlunar/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Argotlunar
2+
==========
3+
4+
Realtime granulator VST plugin.
5+
6+
Uses the JUCE toolkit. This version is based on JUCE Git 2013-02-17.
7+
8+
Licensed under GPLv2
9+
10+
[http://argotlunar.info](http://argotlunar.info)
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#include "CombFilter.h"
2+
3+
CombFilter::CombFilter(float samplerate)
4+
{
5+
this->samplerate = samplerate;
6+
buflen = (int)(samplerate / 22.0f);
7+
buffer = new float[buflen];
8+
rampsamples = (int)(samplerate / 1000.0f); // initial 1ms ramp to avoid clicks
9+
ramp_increment = 1.0f / rampsamples;
10+
}
11+
12+
CombFilter::~CombFilter()
13+
{
14+
delete[] buffer;
15+
}
16+
17+
// accepts params between 0.0f - 1.0f
18+
void CombFilter::initialize(float freq_param, float q_param)
19+
{
20+
float freq_hz = pow(10.0f, freq_param * 3.0f) * 22.05f;
21+
delay = (int)((1.0f / freq_hz) * samplerate);
22+
resonance = q_param;
23+
buf_read_pos = buflen - delay;
24+
25+
if (buf_read_pos == buflen) {
26+
buf_read_pos = 0;
27+
}
28+
for(int i = 0; i < buflen; i++) {
29+
buffer[i] = 10E-12f;
30+
}
31+
32+
delay_buf_write_pos = 0;
33+
process_counter = 0;
34+
ramp = 0.0f;
35+
}
36+
37+
void CombFilter::process(float* input, int sampleframes)
38+
{
39+
if ((delay_buf_write_pos + sampleframes) < buflen
40+
&& (buf_read_pos + sampleframes) < buflen
41+
&& (process_counter + sampleframes) > rampsamples) {
42+
for (int i = 0; i < sampleframes; i++) {
43+
processSample(&input[i]);
44+
}
45+
} else {
46+
for (int i = 0; i < sampleframes; i++) {
47+
processSample(&input[i]);
48+
if (delay_buf_write_pos == buflen) {
49+
delay_buf_write_pos = 0;
50+
}
51+
if (buf_read_pos == buflen) {
52+
buf_read_pos = 0;
53+
}
54+
if (process_counter < rampsamples) {
55+
process_counter++;
56+
ramp += ramp_increment;
57+
}
58+
}
59+
}
60+
}
61+
/*
62+
inline void CombFilter::processSample(float* input)
63+
{
64+
buffer[delay_buf_write_pos] = *input * resonance * ramp;
65+
*input = (*input * 0.5f) + (buffer[buf_read_pos] * 0.5f);
66+
delay_buf_write_pos++;
67+
buf_read_pos++;
68+
process_counter++;
69+
}
70+
*/
71+
inline void CombFilter::processSample(float* input)
72+
{
73+
*input = *input + buffer[buf_read_pos] * resonance;
74+
buffer[delay_buf_write_pos] = *input ;
75+
delay_buf_write_pos++;
76+
buf_read_pos++;
77+
process_counter++;
78+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef COMBFILTER_H
2+
#define COMBFILTER_H
3+
4+
#include <math.h>
5+
#include "Debug.h"
6+
7+
class CombFilter
8+
{
9+
public:
10+
CombFilter(float samplerate);
11+
~CombFilter();
12+
void initialize(float freq_param, float q_param);
13+
void process(float* input, int sampleframes);
14+
15+
private:
16+
inline void processSample(float* input);
17+
18+
float *buffer;
19+
float delaysample;
20+
float output;
21+
float samplerate;
22+
float ramp_increment;
23+
float ramp;
24+
float resonance;
25+
int rampsamples;
26+
int delay;
27+
int buflen;
28+
int delay_buf_write_pos, buf_read_pos;
29+
int process_counter;
30+
};
31+
32+
#endif //COMBFILTER_H

ports/argotlunar/Source/Debug.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#ifndef DEBUG_H
2+
#define DEBUG_H
3+
4+
#ifdef LINUX
5+
#define DEBUG
6+
#endif
7+
8+
#ifdef DEBUG
9+
#include <iostream>
10+
11+
namespace dbg
12+
{
13+
inline void string(std::string text)
14+
{
15+
std::cout << text << "\n";
16+
}
17+
inline void value(std::string text, float val)
18+
{
19+
std::cout << text << ": " << val << "\n";
20+
}
21+
}
22+
#endif //DEBUG
23+
#endif //DEBUG_H
24+

0 commit comments

Comments
 (0)