@@ -1,10 +1,11 @@ | |||||
SLUG = AudibleInstruments | |||||
VERSION = 0.5.0 | |||||
FLAGS += \ | FLAGS += \ | ||||
-DTEST \ | -DTEST \ | ||||
-I./eurorack \ | -I./eurorack \ | ||||
-Wno-unused-local-typedefs | -Wno-unused-local-typedefs | ||||
SOURCES += $(wildcard src/*.cpp) | SOURCES += $(wildcard src/*.cpp) | ||||
SOURCES += eurorack/stmlib/utils/random.cc | SOURCES += eurorack/stmlib/utils/random.cc | ||||
SOURCES += eurorack/stmlib/dsp/atan.cc | SOURCES += eurorack/stmlib/dsp/atan.cc | ||||
@@ -47,13 +48,7 @@ SOURCES += eurorack/frames/keyframer.cc | |||||
SOURCES += eurorack/frames/resources.cc | SOURCES += eurorack/frames/resources.cc | ||||
SOURCES += eurorack/frames/poly_lfo.cc | SOURCES += eurorack/frames/poly_lfo.cc | ||||
include ../../plugin.mk | |||||
DISTRIBUTABLES += $(wildcard LICENSE*) res | |||||
dist: all | |||||
mkdir -p dist/AudibleInstruments | |||||
cp LICENSE* dist/AudibleInstruments/ | |||||
cp $(TARGET) dist/AudibleInstruments/ | |||||
cp -R res dist/AudibleInstruments/ | |||||
cd dist && zip -5 -r AudibleInstruments-$(VERSION)-$(ARCH).zip AudibleInstruments | |||||
include ../../plugin.mk |
@@ -163,7 +163,7 @@ void Braids::step() { | |||||
for (int i = 0; i < 24; i++) { | for (int i = 0; i < 24; i++) { | ||||
in[i].samples[0] = render_buffer[i] / 32768.0; | in[i].samples[0] = render_buffer[i] / 32768.0; | ||||
} | } | ||||
src.setRatio(engineGetSampleRate() / 96000.0); | |||||
src.setRates(96000, engineGetSampleRate()); | |||||
int inLen = 24; | int inLen = 24; | ||||
int outLen = outputBuffer.capacity(); | int outLen = outputBuffer.capacity(); | ||||
@@ -40,7 +40,7 @@ struct Branches : Module { | |||||
Branches() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} | Branches() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} | ||||
void step() override; | void step() override; | ||||
void reset() override { | |||||
void onReset() override { | |||||
for (int i = 0; i < 2; i++) { | for (int i = 0; i < 2; i++) { | ||||
mode[i] = false; | mode[i] = false; | ||||
outcome[i] = false; | outcome[i] = false; | ||||
@@ -74,7 +74,7 @@ struct Clouds : Module { | |||||
~Clouds(); | ~Clouds(); | ||||
void step() override; | void step() override; | ||||
void reset() override { | |||||
void onReset() override { | |||||
freeze = false; | freeze = false; | ||||
blendMode = 0; | blendMode = 0; | ||||
playback = clouds::PLAYBACK_MODE_GRANULAR; | playback = clouds::PLAYBACK_MODE_GRANULAR; | ||||
@@ -119,7 +119,7 @@ Clouds::Clouds() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { | |||||
memset(processor, 0, sizeof(*processor)); | memset(processor, 0, sizeof(*processor)); | ||||
processor->Init(block_mem, memLen, block_ccm, ccmLen); | processor->Init(block_mem, memLen, block_ccm, ccmLen); | ||||
reset(); | |||||
onReset(); | |||||
} | } | ||||
Clouds::~Clouds() { | Clouds::~Clouds() { | ||||
@@ -154,7 +154,7 @@ void Clouds::step() { | |||||
clouds::ShortFrame input[32] = {}; | clouds::ShortFrame input[32] = {}; | ||||
// Convert input buffer | // Convert input buffer | ||||
{ | { | ||||
inputSrc.setRatio(32000.0 / engineGetSampleRate()); | |||||
inputSrc.setRates(engineGetSampleRate(), 32000); | |||||
Frame<2> inputFrames[32]; | Frame<2> inputFrames[32]; | ||||
int inLen = inputBuffer.size(); | int inLen = inputBuffer.size(); | ||||
int outLen = 32; | int outLen = 32; | ||||
@@ -219,7 +219,7 @@ void Clouds::step() { | |||||
outputFrames[i].samples[1] = output[i].r / 32768.0; | outputFrames[i].samples[1] = output[i].r / 32768.0; | ||||
} | } | ||||
outputSrc.setRatio(engineGetSampleRate() / 32000.0); | |||||
outputSrc.setRates(32000, engineGetSampleRate()); | |||||
int inLen = 32; | int inLen = 32; | ||||
int outLen = outputBuffer.capacity(); | int outLen = outputBuffer.capacity(); | ||||
outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | ||||
@@ -140,7 +140,7 @@ void Elements::step() { | |||||
// Convert input buffer | // Convert input buffer | ||||
{ | { | ||||
inputSrc.setRatio(32000.0 / engineGetSampleRate()); | |||||
inputSrc.setRates(engineGetSampleRate(), 32000); | |||||
Frame<2> inputFrames[16]; | Frame<2> inputFrames[16]; | ||||
int inLen = inputBuffer.size(); | int inLen = inputBuffer.size(); | ||||
int outLen = 16; | int outLen = 16; | ||||
@@ -191,7 +191,7 @@ void Elements::step() { | |||||
outputFrames[i].samples[1] = aux[i]; | outputFrames[i].samples[1] = aux[i]; | ||||
} | } | ||||
outputSrc.setRatio(engineGetSampleRate() / 32000.0); | |||||
outputSrc.setRates(32000, engineGetSampleRate()); | |||||
int inLen = 16; | int inLen = 16; | ||||
int outLen = outputBuffer.capacity(); | int outLen = outputBuffer.capacity(); | ||||
outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | ||||
@@ -117,7 +117,7 @@ struct Frames : Module { | |||||
} | } | ||||
} | } | ||||
void reset() override { | |||||
void onReset() override { | |||||
poly_lfo_mode = false; | poly_lfo_mode = false; | ||||
keyframer.Clear(); | keyframer.Clear(); | ||||
for (int i = 0; i < 4; i++) { | for (int i = 0; i < 4; i++) { | ||||
@@ -125,7 +125,7 @@ struct Frames : Module { | |||||
keyframer.mutable_settings(i)->response = 0; | keyframer.mutable_settings(i)->response = 0; | ||||
} | } | ||||
} | } | ||||
void randomize() override { | |||||
void onRandomize() override { | |||||
// TODO | // TODO | ||||
// Maybe something useful should go in here? | // Maybe something useful should go in here? | ||||
} | } | ||||
@@ -138,7 +138,7 @@ Frames::Frames() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { | |||||
memset(&poly_lfo, 0, sizeof(poly_lfo)); | memset(&poly_lfo, 0, sizeof(poly_lfo)); | ||||
poly_lfo.Init(); | poly_lfo.Init(); | ||||
reset(); | |||||
onReset(); | |||||
} | } | ||||
@@ -97,12 +97,12 @@ struct Rings : Module { | |||||
} | } | ||||
} | } | ||||
void reset() override { | |||||
void onReset() override { | |||||
polyphonyMode = 0; | polyphonyMode = 0; | ||||
model = rings::RESONATOR_MODEL_MODAL; | model = rings::RESONATOR_MODEL_MODAL; | ||||
} | } | ||||
void randomize() override { | |||||
void onRandomize() override { | |||||
polyphonyMode = randomu32() % 3; | polyphonyMode = randomu32() % 3; | ||||
model = (rings::ResonatorModel) (randomu32() % 3); | model = (rings::ResonatorModel) (randomu32() % 3); | ||||
} | } | ||||
@@ -155,7 +155,7 @@ void Rings::step() { | |||||
float in[24] = {}; | float in[24] = {}; | ||||
// Convert input buffer | // Convert input buffer | ||||
{ | { | ||||
inputSrc.setRatio(48000.0 / engineGetSampleRate()); | |||||
inputSrc.setRates(engineGetSampleRate(), 48000); | |||||
int inLen = inputBuffer.size(); | int inLen = inputBuffer.size(); | ||||
int outLen = 24; | int outLen = 24; | ||||
inputSrc.process(inputBuffer.startData(), &inLen, (Frame<1>*) in, &outLen); | inputSrc.process(inputBuffer.startData(), &inLen, (Frame<1>*) in, &outLen); | ||||
@@ -223,7 +223,7 @@ void Rings::step() { | |||||
outputFrames[i].samples[1] = aux[i]; | outputFrames[i].samples[1] = aux[i]; | ||||
} | } | ||||
outputSrc.setRatio(engineGetSampleRate() / 48000.0); | |||||
outputSrc.setRates(48000, engineGetSampleRate()); | |||||
int inLen = 24; | int inLen = 24; | ||||
int outLen = outputBuffer.capacity(); | int outLen = outputBuffer.capacity(); | ||||
outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | outputSrc.process(outputFrames, &inLen, outputBuffer.endData(), &outLen); | ||||
@@ -57,13 +57,13 @@ struct Tides : Module { | |||||
void step() override; | void step() override; | ||||
void reset() override { | |||||
void onReset() override { | |||||
generator.set_range(tides::GENERATOR_RANGE_MEDIUM); | generator.set_range(tides::GENERATOR_RANGE_MEDIUM); | ||||
generator.set_mode(tides::GENERATOR_MODE_LOOPING); | generator.set_mode(tides::GENERATOR_MODE_LOOPING); | ||||
sheep = false; | sheep = false; | ||||
} | } | ||||
void randomize() override { | |||||
void onRandomize() override { | |||||
generator.set_range((tides::GeneratorRange) (randomu32() % 3)); | generator.set_range((tides::GeneratorRange) (randomu32() % 3)); | ||||
generator.set_mode((tides::GeneratorMode) (randomu32() % 3)); | generator.set_mode((tides::GeneratorMode) (randomu32() % 3)); | ||||
} | } | ||||
@@ -101,7 +101,7 @@ Tides::Tides() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { | |||||
memset(&generator, 0, sizeof(generator)); | memset(&generator, 0, sizeof(generator)); | ||||
generator.Init(); | generator.Init(); | ||||
generator.set_sync(false); | generator.set_sync(false); | ||||
reset(); | |||||
onReset(); | |||||
} | } | ||||
void Tides::step() { | void Tides::step() { | ||||
@@ -58,12 +58,12 @@ struct Warps : Module { | |||||
} | } | ||||
} | } | ||||
void reset() override { | |||||
void onReset() override { | |||||
warps::Parameters *p = modulator.mutable_parameters(); | warps::Parameters *p = modulator.mutable_parameters(); | ||||
p->carrier_shape = 0; | p->carrier_shape = 0; | ||||
} | } | ||||
void randomize() override { | |||||
void onRandomize() override { | |||||
warps::Parameters *p = modulator.mutable_parameters(); | warps::Parameters *p = modulator.mutable_parameters(); | ||||
p->carrier_shape = randomu32() % 4; | p->carrier_shape = randomu32() % 4; | ||||
} | } | ||||