Skip to content

Commit

Permalink
Release 0.6.1 Added AtNuVrTr and updated Triggers MKI
Browse files Browse the repository at this point in the history
  • Loading branch information
AScustomWorks committed Apr 12, 2018
1 parent 28dcc47 commit cd484dd
Show file tree
Hide file tree
Showing 8 changed files with 602 additions and 403 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RACK_DIR ?= ../..
SLUG = AS
VERSION = 0.6.0.2
VERSION = 0.6.1

FLAGS += -Idep/include
SOURCES += $(wildcard src/*.cpp freeverb/*.cpp)
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ V 0.5.4: Fixed a reset signal issue.

V 0.5.5: 16th clock output now sends unipolar signal, just as the other outputs.

V 0.6.1: Now BPM Clock outputs a short length trigger signal, as most of the available clocks.

### 8 Channel Mixer
Fundamental/Autodafe mixer module. Mods: graphics, sliders for channel volume, stereo or mono output(L channel outputs L+R signal if R channel is not active). Now with main mix mute button. Beware,the default setting for each channel volume is at 70% in stead of 0%.

Expand Down Expand Up @@ -87,15 +89,21 @@ V 0.5.7 Module size reduced to 4HP
### TriLFO
Fundamental LFO module. Mods:graphics, controls stripped to the basics but you get 3 LFOS on the same space.

### Triggers
### AtNuVrTr Dual attenuverter module
Just like Befaco Attenuverter module but with added cv inputs to modulate both Attenueverter and Offset parameters.

V 0.6.1: First relase of this module.

### Triggers REMOVED
A couple of manual trigger buttons, one ON/OFF, one temporary, both with 4 trigger outputs, trigger volts knob going from 1 to 10 v output.

(NOTICE: Triggers MKI will supersede Triggers, so Triggers will be removed from the plugin by v0.6 but you have time now to replace it on your current patches and keep everything working fine).

### Triggers MKI
A manual CV signal trigger module with latch and temporary triggers, volts knob lets you adjust from 0 to 10 v output.
A manual CV signal trigger module with latch and temporary triggers, volts knob lets you adjust the range from -10v to 10v output.

V 0.5.7: First relase of this module.
V 0.6.1: Changed the volts range to -10v +10v and now the display shows positive values in green, and negative values in red.

### Triggers MKII
A manual CV signal temporary trigger module with labeling integrated, so you remember where the signal is going.
Expand Down
440 changes: 440 additions & 0 deletions res/AtNuVrTr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
395 changes: 0 additions & 395 deletions res/Multiple2_5 copy.svg

This file was deleted.

2 changes: 2 additions & 0 deletions src/AS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ void init(rack::Plugin *p) {
p->addModel(modelVCA);
p->addModel(modelQuadVCA);
p->addModel(modelTriLFO);
p->addModel(modelAtNuVrTr);

p->addModel(modelBPMClock);
p->addModel(modelSEQ16);
p->addModel(modelMixer8ch);
Expand Down
2 changes: 2 additions & 0 deletions src/AS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ extern Model *modelADSR;
extern Model *modelVCA;
extern Model *modelQuadVCA;
extern Model *modelTriLFO;
extern Model *modelAtNuVrTr;

extern Model *modelBPMClock;
extern Model *modelSEQ16;
extern Model *modelMixer8ch;
Expand Down
115 changes: 115 additions & 0 deletions src/AtNuVrTr.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#include "AS.hpp"


struct AtNuVrTr : Module {
enum ParamIds {
ATEN1_PARAM,
OFFSET1_PARAM,
ATEN2_PARAM,
OFFSET2_PARAM,
NUM_PARAMS
};
enum InputIds {
CV_ATEN_1,
CV_ATEN_2,
CV_OFFSET_1,
CV_OFFSET_2,
IN1_INPUT,
IN2_INPUT,
NUM_INPUTS
};
enum OutputIds {
OUT1_OUTPUT,
OUT2_OUTPUT,
NUM_OUTPUTS
};
enum LightIds {
OUT1_POS_LIGHT,
OUT1_NEG_LIGHT,
OUT2_POS_LIGHT,
OUT2_NEG_LIGHT,
NUM_LIGHTS
};

AtNuVrTr() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {}
void step() override;
};


void AtNuVrTr::step() {
float cv_at1 = 0.0f;
if(inputs[CV_ATEN_1].active){
cv_at1 = rescale(inputs[CV_ATEN_1].value, -10.0f,10.0f, -1.0f, 1.0f);
}
float cv_off1 = 0.0f;
if(inputs[CV_OFFSET_1].active){
cv_off1 = rescale(inputs[CV_OFFSET_1].value, -10.0f,10.0f, -10.0f, 10.0f);
}
float atten1 = params[ATEN1_PARAM].value + cv_at1;
float offset1 = params[OFFSET1_PARAM].value + cv_off1;
float out1 = inputs[IN1_INPUT].value * atten1 + offset1;

float cv_at2 = 0.0f;
if(inputs[CV_ATEN_2].active){
cv_at2 = rescale(inputs[CV_ATEN_2].value, -10.0f,10.0f, -1.0f, 1.0f);
}
float cv_off2 = 0.0f;
if(inputs[CV_OFFSET_2].active){
cv_off2 = rescale(inputs[CV_OFFSET_2].value, -10.0f,10.0f, -10.0f, 10.0f);
}
float atten2 = params[ATEN2_PARAM].value + cv_at2;
float offset2 = params[OFFSET2_PARAM].value + cv_off2;
float out2 = inputs[IN2_INPUT].value * atten2 + offset2;


out1 = clamp(out1, -10.0f, 10.0f);
out2 = clamp(out2, -10.0f, 10.0f);

outputs[OUT1_OUTPUT].value = out1;
outputs[OUT2_OUTPUT].value = out2;
lights[OUT1_POS_LIGHT].value = fmaxf(0.0f, out1 / 5.0f);
lights[OUT1_NEG_LIGHT].value = fmaxf(0.0f, -out1 / 5.0f);
lights[OUT2_POS_LIGHT].value = fmaxf(0.0f, out2 / 5.0f);
lights[OUT2_NEG_LIGHT].value = fmaxf(0.0f, -out2 / 5.0f);
}


struct AtNuVrTrWidget : ModuleWidget {
AtNuVrTrWidget(AtNuVrTr *module) : ModuleWidget(module) {
setPanel(SVG::load(assetPlugin(plugin, "res/AtNuVrTr.svg")));

//SCREWS
addChild(Widget::create<as_HexScrew>(Vec(RACK_GRID_WIDTH, 0)));
addChild(Widget::create<as_HexScrew>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(Widget::create<as_HexScrew>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(Widget::create<as_HexScrew>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

const int group_offset = 160;
//ATTN 1
addParam(ParamWidget::create<as_KnobBlack>(Vec(34, 45), module, AtNuVrTr::ATEN1_PARAM, -1.0f, 1.0f, 0.0f));
addParam(ParamWidget::create<as_Knob>(Vec(34, 100), module, AtNuVrTr::OFFSET1_PARAM, -10.0f, 10.0f, 0.0f));

addChild(ModuleLightWidget::create<SmallLight<GreenRedLight>>(Vec(65, 95), module, AtNuVrTr::OUT1_POS_LIGHT));

addInput(Port::create<as_PJ301MPort>(Vec(4, 51), Port::INPUT, module, AtNuVrTr::CV_ATEN_1));
addInput(Port::create<as_PJ301MPort>(Vec(4, 106), Port::INPUT, module, AtNuVrTr::CV_OFFSET_1));

addInput(Port::create<as_PJ301MPort>(Vec(8, 165), Port::INPUT, module, AtNuVrTr::IN1_INPUT));
addOutput(Port::create<as_PJ301MPort>(Vec(43, 165), Port::OUTPUT, module, AtNuVrTr::OUT1_OUTPUT));
//ATTN 2
addParam(ParamWidget::create<as_KnobBlack>(Vec(34, 45+group_offset), module, AtNuVrTr::ATEN2_PARAM, -1.0f, 1.0f, 0.0f));
addParam(ParamWidget::create<as_Knob>(Vec(34, 100+group_offset), module, AtNuVrTr::OFFSET2_PARAM, -10.0f, 10.0f, 0.0f));

addChild(ModuleLightWidget::create<SmallLight<GreenRedLight>>(Vec(65, 95+group_offset), module, AtNuVrTr::OUT2_POS_LIGHT));

addInput(Port::create<as_PJ301MPort>(Vec(4, 51+group_offset), Port::INPUT, module, AtNuVrTr::CV_ATEN_2));
addInput(Port::create<as_PJ301MPort>(Vec(4, 106+group_offset), Port::INPUT, module, AtNuVrTr::CV_OFFSET_2));

addInput(Port::create<as_PJ301MPort>(Vec(8, 165+group_offset), Port::INPUT, module, AtNuVrTr::IN2_INPUT));
addOutput(Port::create<as_PJ301MPort>(Vec(43, 165+group_offset), Port::OUTPUT, module, AtNuVrTr::OUT2_OUTPUT));

}
};


Model *modelAtNuVrTr = Model::create<AtNuVrTr, AtNuVrTrWidget>("AS", "AtNuVrTr", "AtNuVrTr Attenuverter", ATTENUATOR_TAG, DUAL_TAG);
37 changes: 32 additions & 5 deletions src/TriggersMKI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ struct TriggersMKI: Module {
float resetLight = 0.0f;
float volts = 0.0f;
bool running = false;
float display_volts = 0.0f;
bool negative_volts = false;

TriggersMKI() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {}
void step() override;
Expand Down Expand Up @@ -67,8 +69,25 @@ struct TriggersMKI: Module {

void TriggersMKI::step() {

volts = clamp(params[VOLTAGE_PARAM].value, 0.0f, 10.0f);
display_volts = 0.0f;

volts = params[VOLTAGE_PARAM].value;
display_volts = volts;
negative_volts = false;
if(volts< 0.0){
negative_volts = true;
}
if(negative_volts){
display_volts = - display_volts;
//doesn't update fast enough to get rid of the negative 0 display color
/*
if(display_volts == -0.0){
display_volts = 0.0;
}
*/
}else{
display_volts = volts;
}
//LATCH TRIGGER
//EXTERNAL TRIGGER
if (LatchTrigger.process(params[RUN_SWITCH].value)||LatchExtTrigger.process(inputs[CV_RUN_INPUT].value)) {
Expand Down Expand Up @@ -104,6 +123,7 @@ void TriggersMKI::step() {
struct VoltsDisplayWidget : TransparentWidget {

float *value;
bool *negative;
std::shared_ptr<Font> font;

VoltsDisplayWidget() {
Expand Down Expand Up @@ -140,10 +160,16 @@ struct VoltsDisplayWidget : TransparentWidget {
nvgFillColor(vg, nvgTransRGBA(textColor, 16));
nvgText(vg, textPos.x, textPos.y, "\\\\\\\\\\", NULL);

textColor = nvgRGB(0xf0, 0x00, 0x00);
if(*negative){
textColor = nvgRGB(0xf0, 0x00, 0x00);
}else{
//textColor = nvgRGB(0x90, 0xc6, 0x3e);
textColor = nvgRGB(0x00, 0xaf, 0x25);
}

nvgFillColor(vg, textColor);
nvgText(vg, textPos.x, textPos.y, display_string, NULL);
//nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL);

}
};
////////////////////////////////////
Expand All @@ -168,11 +194,12 @@ TriggersMKIWidget::TriggersMKIWidget(TriggersMKI *module) : ModuleWidget(module)
VoltsDisplayWidget *display1 = new VoltsDisplayWidget();
display1->box.pos = Vec(10,50);
display1->box.size = Vec(70, 20);
display1->value = &module->volts;
display1->value = &module->display_volts;
display1->negative = &module->negative_volts;
addChild(display1);

//PARAMS
addParam(ParamWidget::create<as_KnobBlack>(Vec(26, 77), module, TriggersMKI::VOLTAGE_PARAM, 0.0f, 10.0f, 5.0f));
addParam(ParamWidget::create<as_KnobBlack>(Vec(26, 77), module, TriggersMKI::VOLTAGE_PARAM, -10.0f, 10.0f, 0.0f));
//SWITCHES
static const float led_offset = 3.3;
static const float led_center = 15;
Expand Down

0 comments on commit cd484dd

Please sign in to comment.