Skip to content

Commit

Permalink
Add binarual oscillator patch
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Oct 20, 2024
1 parent 1f3ae27 commit 6586faa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ There are a number of existing patches, which have already been designed:

- Init
- [Kudzu](https://github.com/blackboxdsp/flora/tree/develop/patches/init/kudzu) - An expressive distortion patch that twists, folds, and mangles audio for a sometimes unrecognizable outcome
- [Lotus](https://github.com/blackboxdsp/flora/tree/develop/patches/init/lotus) - A rich binaural oscillator, emitting a harmonic meditation
- Seed
- [Blink](https://github.com/blackboxdsp/flora/tree/develop/patches/seed/blink) - The "hello world" of embedded programming
- [Daisy](https://github.com/blackboxdsp/flora/tree/develop/patches/seed/daisy) - A basic sine-wave oscillator
Expand Down
2 changes: 1 addition & 1 deletion lib/cortex
4 changes: 2 additions & 2 deletions patches/init/kudzu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Twisting audio like nature's fastest invader 🌿
Kudzu is an expressive distortion patch, named after the invasive vine that
_Kudzu_ is an expressive distortion patch, named after the invasive vine that
grows incredibly fast and smothers other plants, trees, and buildings.
It folds, twists, and mangles audio for a sometimes unrecognizable outcome.

Expand All @@ -12,7 +12,7 @@ It folds, twists, and mangles audio for a sometimes unrecognizable outcome.
|----------|------------|------------------------------------------------------------------------------------------|
| **CV_1** | Drive | The amount of signal boost before distortion is applied |
| **CV_2** | Tone | The coloring of tone from a post-saturation low-pass filter |
| **CV_3** | Symmetry | The blend between symmetric and asymmetric distortion. |
| **CV_3** | Symmetry | The blend between symmetric and asymmetric distortion |
| **CV_4** | Mix | The blend of dry (original) and wet (distorted) signal |
| **CV_5** | CV_1 Input | CV input for CV_1 (Drive) |
| **CV_6** | CV_3 Input | CV input for CV_3 (Symmetry) |
Expand Down
14 changes: 7 additions & 7 deletions patches/init/kudzu/kudzu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ void AudioCallback(AudioHandle::InterleavingInputBuffer in,
toggle.Debounce();

float driveKnob = hardware.GetAdcValue(CV_1);
saturator.SetSaturation((driveKnob * 24.0f) + 1.0f);
wavefolder.SetInputGain((driveKnob * 6.0f) + 1.0f);

float toneKnob = hardware.GetAdcValue(CV_2);
filter.SetCutoffFrequency(cortex::map(toneKnob, 1000.0f, cortex::FILTER_CUTOFF_FREQ_MAX, cortex::Mapping::LOG));

float symmetryKnob = hardware.GetAdcValue(CV_3);
float mixKnob = hardware.GetAdcValue(CV_4);
bool useSaturator = toggle.Pressed();

saturator.SetSaturation((driveKnob * 24.0f) + 1.0f);
saturator.SetSymmetry(1.0f - symmetryKnob);

wavefolder.SetInputGain((driveKnob * 6.0f) + 1.0f);
wavefolder.SetSymmetry(1.0f - symmetryKnob);

float mixKnob = hardware.GetAdcValue(CV_4);
bool useSaturator = toggle.Pressed();
filter.SetCutoffFrequency(cortex::map(toneKnob, 1000.0f, cortex::FILTER_CUTOFF_FREQ_MAX, cortex::Mapping::LOG));

for (size_t idx = 0; idx < size; idx++) {
float originalSample = in[idx];
Expand Down

0 comments on commit 6586faa

Please sign in to comment.