Skip to content

Commit

Permalink
Update to v0.6.8
Browse files Browse the repository at this point in the history
Small parameter fix on ADSR, Delay Plus, Delay Plus Stereo, new MS outputs on BPM Calc
  • Loading branch information
AScustomWorks committed May 29, 2018
1 parent c7c281b commit 8fa5544
Show file tree
Hide file tree
Showing 7 changed files with 493 additions and 26 deletions.
Binary file modified AS.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.7
VERSION = 0.6.8

FLAGS +=
SOURCES += $(wildcard src/*.cpp freeverb/*.cpp)
Expand Down
448 changes: 429 additions & 19 deletions res/BPMCalc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/ADSR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct ADSR : Module {


void ADSR::step() {
float attack = clamp(params[ATTACK_INPUT].value + inputs[ATTACK_INPUT].value / 10.0f, 0.0f, 1.0f);
float attack = clamp(params[ATTACK_PARAM].value + inputs[ATTACK_INPUT].value / 10.0f, 0.0f, 1.0f);
float decay = clamp(params[DECAY_PARAM].value + inputs[DECAY_INPUT].value / 10.0f, 0.0f, 1.0f);
float sustain = clamp(params[SUSTAIN_PARAM].value + inputs[SUSTAIN_INPUT].value / 10.0f, 0.0f, 1.0f);
float release = clamp(params[RELEASE_PARAM].value + inputs[RELEASE_PARAM].value / 10.0f, 0.0f, 1.0f);
Expand Down
61 changes: 59 additions & 2 deletions src/BPMCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ struct BPMCalc : Module {
CLOCK_INPUT,
NUM_INPUTS
};
enum OutputIds {
enum OutputIds {
ENUMS(MS_OUTPUT, 16),
NUM_OUTPUTS
};
enum LightIds {
Expand Down Expand Up @@ -51,7 +52,7 @@ struct BPMCalc : Module {
float mult = 1000;
float millisecondsPerBeat;
float millisecondsPerMeasure;
float bar = 1;
float bar = 1.0f;

float secondsPerBeat = 0.0f;
float secondsPerMeasure = 0.0f;
Expand Down Expand Up @@ -280,6 +281,33 @@ void BPMCalc::step() {
pulse = LightPulse.process( 1.0 / engineGetSampleRate() );
lights[CLOCK_LIGHT].value = (pulse ? 1.0f : 0.0f);

//OUTPUTS: MS to 10V scaled values
outputs[MS_OUTPUT+0].value = rescale(bar,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+1].value = rescale(half_note_d,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+2].value = rescale(half_note,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+3].value = rescale(half_note_t,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+4].value = rescale(qt_note_d,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+5].value = rescale(qt_note,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+6].value = rescale(qt_note_t,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+7].value = rescale(eight_note_d,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+8].value = rescale(eight_note,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+9].value = rescale(eight_note_t,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+10].value = rescale(sixth_note_d,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+11].value = rescale(sixth_note,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+12].value = rescale(sixth_note_t,0.0f,10000.0f,0.0f,10.0f);
outputs[MS_OUTPUT+13].value = rescale(trth_note_d,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+14].value = rescale(trth_note,0.0f,10000.0f,0.0f,10.0f);

outputs[MS_OUTPUT+15].value = rescale(trth_note_t,0.0f,10000.0f,0.0f,10.0f);


}

////////////////////////////////////
Expand Down Expand Up @@ -570,6 +598,35 @@ BPMCalcWidget::BPMCalcWidget(BPMCalc *module) : ModuleWidget(module) {
display1->box.pos = Vec(7, 120);
display1->box.size = Vec(190, 240);
addChild(display1);
//MS outputs
int const out_offset = 40;
// 1 - ·1/2
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 0));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 1));
// 1/2 - t1/2
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*1), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 2));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*1), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 3));
// ·1/4 - 1/4
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*2), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 4));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*2), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 5));
// t1/4 - ·1/8
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*3), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 6));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*3), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 7));
// 1/8 - t1/8
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*4), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 8));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*4), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 9));
// ·1/16 - 1/16
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*5), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 10));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*5), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 11));

// t1/16 - ·1/32
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*6), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 12));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*6), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 13));

// 1/32 - t1/32
addOutput(Port::create<as_PJ301MPort>(Vec(220, 50+out_offset*7), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 14));
addOutput(Port::create<as_PJ301MPort>(Vec(260, 50+out_offset*7), Port::OUTPUT, module, BPMCalc::MS_OUTPUT + 15));


}

Expand Down
2 changes: 1 addition & 1 deletion src/DelayPlus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ DelayPlusFxWidget::DelayPlusFxWidget(DelayPlusFx *module) : ModuleWidget(module)
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)));
//KNOBS
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(74, 38+y_offset), module, DelayPlusFx::TIME_PARAM, 0.001f, 10.0f, 0.350f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(74, 38+y_offset), module, DelayPlusFx::TIME_PARAM, 0.0f, 10.0f, 0.350f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(74, 90+y_offset), module, DelayPlusFx::FEEDBACK_PARAM, 0.0f, 1.0f, 0.5f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(74, 140+y_offset), module, DelayPlusFx::COLOR_PARAM, 0.0f, 1.0f, 0.5f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(74, 213+y_offset), module, DelayPlusFx::MIX_PARAM, 0.0f, 1.0f, 0.5f));
Expand Down
4 changes: 2 additions & 2 deletions src/DelayPlusStereo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ DelayPlusStereoFxWidget::DelayPlusStereoFxWidget(DelayPlusStereoFx *module) : Mo
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)));
//KNOBS L
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(37, 78), module, DelayPlusStereoFx::TIME_PARAM_1, 0.001f, 10.0f, 0.375f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(37, 78), module, DelayPlusStereoFx::TIME_PARAM_1, 0.0f, 10.0f, 0.375f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(37, 130), module, DelayPlusStereoFx::FEEDBACK_PARAM_1, 0.0f, 1.0f, 0.5f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(37, 180), module, DelayPlusStereoFx::COLOR_PARAM_1, 0.0f, 1.0f, 0.5f));
//KNOBS R
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(106, 78), module, DelayPlusStereoFx::TIME_PARAM_2, 0.001f, 10.0f, 0.750f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(106, 78), module, DelayPlusStereoFx::TIME_PARAM_2, 0.0f, 10.0f, 0.750f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(106, 130), module, DelayPlusStereoFx::FEEDBACK_PARAM_2, 0.0f, 1.0f, 0.5f));
addParam(ParamWidget::create<as_FxKnobWhite>(Vec(106, 180), module, DelayPlusStereoFx::COLOR_PARAM_2, 0.0f, 1.0f, 0.5f));
//FEEDBACK LINK SWITCH
Expand Down

0 comments on commit 8fa5544

Please sign in to comment.