Skip to content

Commit

Permalink
0.6.15
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-bouffier committed Sep 7, 2018
1 parent 6679fa9 commit 813f3cd
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 54 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 = Bidoo
VERSION = 0.6.14
VERSION = 0.6.15
DISTRIBUTABLES += $(wildcard LICENSE*) res

FLAGS += -Idep/include -I./src/dep/dr_wav -I./src/dep/filters -I./src/dep/freeverb -I./src/dep/minimp3 -I./src/dep/lodepng -I./src/dep/pffft
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Bidoo's plugins for [VCVRack](https://vcvrack.com)

<!-- Version and License Badges -->
![Version](https://img.shields.io/badge/version-0.6.14-green.svg?style=flat-square)
![Version](https://img.shields.io/badge/version-0.6.15-green.svg?style=flat-square)
![License](https://img.shields.io/badge/license-BSD3-blue.svg?style=flat-square)
![Language](https://img.shields.io/badge/language-C++-yellow.svg?style=flat-square)

Expand All @@ -13,9 +13,15 @@ You can find information on that plugins pack in the [wiki](https://github.com/s

## Last changes

07/09/2018 => 0.6.15

*UPDATE* **lIMbO** cutoff frequency max value changed (calibration).

*UPDATE* **dTrOY** **bordL** phase calculation now based on engine sample rate instead of clock() <ctime>.

03/09/2018 => 0.6.14

*NEW* GarçOn is still under development. First attempt to use pffft library. Needs to log scale vertical freqs.
*NEW* **GarçOn** is still under development. First attempt to use pffft library. Needs to log scale vertical freqs.

31/08/2018 => 0.6.13

Expand Down
38 changes: 19 additions & 19 deletions src/BORDL.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "Bidoo.hpp"
#include "dsp/digital.hpp"
#include "BidooComponents.hpp"
#include <ctime>
#include <iostream>
#include <vector>
#include <random>
Expand Down Expand Up @@ -148,11 +147,11 @@ struct PatternExtended {
}
}

StepExtended CurrentStep() {
inline StepExtended CurrentStep() {
return this->steps[currentStep];
}

int GetFirstStep()
inline int GetFirstStep()
{
for (int i = 0; i < 16; i++) {
if (!steps[i].skip) {
Expand All @@ -162,7 +161,7 @@ struct PatternExtended {
return 0;
}

int GetLastStep()
inline int GetLastStep()
{
for (int i = 15; i >= 0 ; i--) {
if (!steps[i].skip) {
Expand All @@ -172,7 +171,7 @@ struct PatternExtended {
return 15;
}

int GetNextStepForward(int pos)
inline int GetNextStepForward(int pos)
{
for (int i = pos + 1; i < pos + 16; i++) {
if (!steps[i%16].skip) {
Expand All @@ -182,7 +181,7 @@ struct PatternExtended {
return pos;
}

int GetNextStepBackward(int pos)
inline int GetNextStepBackward(int pos)
{
for (int i = pos - 1; i > pos - 16; i--) {
int j = i/16;
Expand Down Expand Up @@ -341,7 +340,6 @@ struct BORDL : Module {
float candidateForPreviousPitch = 0.0f;
clock_t tCurrent;
clock_t tLastTrig;
clock_t tPreviousTrig;
std::vector<char> slideState = {'f','f','f','f','f','f','f','f'};
std::vector<char> skipState = {'f','f','f','f','f','f','f','f'};
int playMode = 0; // 0 forward, 1 backward, 2 pingpong, 3 random, 4 brownian
Expand All @@ -360,18 +358,14 @@ struct BORDL : Module {
PulseGenerator stepPulse[8];
bool stepOutputsMode = false;
bool gateOn = false;
const float invLightLambda = 13.333333333333333333333f;

PatternExtended patterns[16];

BORDL() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {
}

void UpdatePattern() {
patterns[selectedPattern].Update(playMode, countMode, numSteps, roundf(params[STEPS_PARAM].value), roundf(params[ROOT_NOTE_PARAM].value),
roundf(params[SCALE_PARAM].value), params[GATE_TIME_PARAM].value, params[SLIDE_TIME_PARAM].value, params[SENSITIVITY_PARAM].value ,
skipState, slideState, &params[TRIG_COUNT_PARAM], &params[TRIG_PITCH_PARAM], &params[TRIG_TYPE_PARAM], &params[TRIG_GATEPROB_PARAM],
&params[TRIG_PITCHRND_PARAM], &params[TRIG_ACCENT_PARAM], &params[TRIG_RNDACCENT_PARAM]);
}
void UpdatePattern();

void step() override;

Expand Down Expand Up @@ -644,10 +638,16 @@ struct BORDL : Module {
}
};

inline void BORDL::UpdatePattern() {
patterns[selectedPattern].Update(playMode, countMode, numSteps, roundf(params[STEPS_PARAM].value), roundf(params[ROOT_NOTE_PARAM].value),
roundf(params[SCALE_PARAM].value), params[GATE_TIME_PARAM].value, params[SLIDE_TIME_PARAM].value, params[SENSITIVITY_PARAM].value ,
skipState, slideState, &params[TRIG_COUNT_PARAM], &params[TRIG_PITCH_PARAM], &params[TRIG_TYPE_PARAM], &params[TRIG_GATEPROB_PARAM],
&params[TRIG_PITCHRND_PARAM], &params[TRIG_ACCENT_PARAM], &params[TRIG_RNDACCENT_PARAM]);
}

void BORDL::step() {
//const float lightLambda = 0.075f;
const float invLightLambda = 13.333333333333333333333f;

float invESR = 1 / engineGetSampleRate();
// Run
if (runningTrigger.process(params[RUN_PARAM].value)) {
Expand All @@ -658,18 +658,18 @@ void BORDL::step() {
// Phase calculation
if (running) {
if (inputs[EXT_CLOCK_INPUT].active) {
tCurrent = clock();
tCurrent += invESR;
float clockTime = powf(2.0f, params[CLOCK_PARAM].value + inputs[CLOCK_INPUT].value);
if (tLastTrig && tPreviousTrig) {
phase = float(tCurrent - tLastTrig) / float(tLastTrig - tPreviousTrig);
if (tLastTrig > 0.0f) {
phase = tCurrent / tLastTrig;
}
else {
phase += clockTime * invESR;
}
// External clock
if (clockTrigger.process(inputs[EXT_CLOCK_INPUT].value)) {
tPreviousTrig = tLastTrig;
tLastTrig = clock();
tLastTrig = tCurrent;
tCurrent = 0.0f;
phase = 0.0f;
nextStep = true;
}
Expand Down
52 changes: 21 additions & 31 deletions src/DTROY.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "Bidoo.hpp"
#include "dsp/digital.hpp"
#include "BidooComponents.hpp"
#include <ctime>
#include <iostream>
#include <vector>
#include <random>
Expand Down Expand Up @@ -136,11 +135,11 @@ struct Pattern {
}
}

Step CurrentStep() {
inline Step CurrentStep() {
return this->steps[currentStep];
}

int GetFirstStep()
inline int GetFirstStep()
{
for (int i = 0; i < 16; i++) {
if (!steps[i].skip) {
Expand All @@ -150,7 +149,7 @@ struct Pattern {
return 0;
}

int GetLastStep()
inline int GetLastStep()
{
for (int i = 15; i >= 0 ; i--) {
if (!steps[i].skip) {
Expand All @@ -160,7 +159,7 @@ struct Pattern {
return 15;
}

int GetNextStepForward(int pos)
inline int GetNextStepForward(int pos)
{
for (int i = pos + 1; i < pos + 16; i++) {
int j = i%16;
Expand All @@ -171,7 +170,7 @@ struct Pattern {
return pos;
}

int GetNextStepBackward(int pos)
inline int GetNextStepBackward(int pos)
{
for (int i = pos - 1; i > pos - 16; i--) {
int j = i%16;
Expand Down Expand Up @@ -322,9 +321,8 @@ struct DTROY : Module {
float pitch = 0.0f;
float previousPitch = 0.0f;
float candidateForPreviousPitch = 0.0f;
clock_t tCurrent;
clock_t tLastTrig;
clock_t tPreviousTrig;
float tCurrent = 0.0f;
float tLastTrig = 0.0f;
std::vector<char> slideState = {'f','f','f','f','f','f','f','f'};
std::vector<char> skipState = {'f','f','f','f','f','f','f','f'};
int playMode = 0; // 0 forward, 1 backward, 2 pingpong, 3 random, 4 brownian
Expand All @@ -341,28 +339,14 @@ struct DTROY : Module {
PulseGenerator stepPulse[8];
bool stepOutputsMode = false;
bool gateOn = false;
const float invLightLambda = 13.333333333333333333333f;

Pattern patterns[16];

DTROY() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {
}

void UpdatePattern() {
patterns[selectedPattern].Update(playMode,
countMode,
numSteps,
roundf(params[STEPS_PARAM].value),
roundf(params[ROOT_NOTE_PARAM].value),
roundf(params[SCALE_PARAM].value),
params[GATE_TIME_PARAM].value,
params[SLIDE_TIME_PARAM].value,
params[SENSITIVITY_PARAM].value ,
skipState,
slideState,
&params[TRIG_COUNT_PARAM],
&params[TRIG_PITCH_PARAM],
&params[TRIG_TYPE_PARAM]);
}
void UpdatePattern();

void step() override;

Expand Down Expand Up @@ -619,9 +603,15 @@ struct DTROY : Module {
}
};

inline void DTROY::UpdatePattern() {
patterns[selectedPattern].Update(playMode, countMode, numSteps, roundf(params[STEPS_PARAM].value),
roundf(params[ROOT_NOTE_PARAM].value), roundf(params[SCALE_PARAM].value), params[GATE_TIME_PARAM].value,
params[SLIDE_TIME_PARAM].value, params[SENSITIVITY_PARAM].value , skipState, slideState,
&params[TRIG_COUNT_PARAM], &params[TRIG_PITCH_PARAM], &params[TRIG_TYPE_PARAM]);
}

void DTROY::step() {
const float invLightLambda = 13.333333333333333333333f;

float invESR = 1 / engineGetSampleRate();

// Run
Expand All @@ -633,18 +623,18 @@ void DTROY::step() {
// Phase calculation
if (running) {
if (inputs[EXT_CLOCK_INPUT].active) {
tCurrent = clock();
tCurrent += invESR;
float clockTime = powf(2.0f, params[CLOCK_PARAM].value + inputs[CLOCK_INPUT].value);
if (tLastTrig && tPreviousTrig) {
phase = float(tCurrent - tLastTrig) / float(tLastTrig - tPreviousTrig);
if (tLastTrig > 0.0f) {
phase = tCurrent / tLastTrig;
}
else {
phase += clockTime * invESR;
}
// External clock
if (clockTrigger.process(inputs[EXT_CLOCK_INPUT].value)) {
tPreviousTrig = tLastTrig;
tLastTrig = clock();
tLastTrig = tCurrent;
tCurrent = 0.0f;
phase = 0.0f;
nextStep = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/LIMBO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct LIMBO : Module {
};

void LIMBO::step() {
float cfreq = pow(2.0f,rescale(clamp(params[CUTOFF_PARAM].value + params[CMOD_PARAM].value * inputs[CUTOFF_INPUT].value * 0.2f,0.0f,1.0f),0.0f,1.0f,4.5f,13.0f));
float cfreq = pow(2.0f,rescale(clamp(params[CUTOFF_PARAM].value + params[CMOD_PARAM].value * inputs[CUTOFF_INPUT].value * 0.2f,0.0f,1.0f),0.0f,1.0f,4.5f,14.0f));
float q = 3.5f * clamp(params[Q_PARAM].value + inputs[Q_INPUT].value * 0.2f, 0.0f, 1.0f);
float g = pow(2.0f,rescale(clamp(params[MUG_PARAM].value + inputs[MUG_INPUT].value * 0.2f,0.0f,1.0f),0.0f,1.0f,0.0f,3.0f));
int mode = (int)params[MODE_PARAM].value;
Expand Down

0 comments on commit 813f3cd

Please sign in to comment.