Skip to content

Commit

Permalink
Update pod patch
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Nov 12, 2024
1 parent d6cf959 commit 5f448f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions patches/pod/lily/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ CPP_SOURCES = lily.cpp

# Library Directories
LIBDAISY_DIR = ../../../vendor/libDaisy
LIBNEURON_DIR = ../../../lib/cortex
LIBNEURON_DIR = ../../../lib/neuron

# Include Neuron library
C_INCLUDES += -I$(LIBNEURON_DIR)/src
LIBS += -lcortex
LIBS += -lneuron
LIBDIR += -L$(LIBNEURON_DIR)/target/release

# Include Daisy library Makefile
Expand Down
8 changes: 4 additions & 4 deletions patches/pod/lily/lily.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "cortex.h"
#include "neuron.h"
#include "daisy_pod.h"

using namespace daisy;

DaisyPod hardware;

cortex::Oscillator leader;
cortex::Oscillator follower;
neuron::Oscillator leader;
neuron::Oscillator follower;

const float MAX_DETUNE_AMOUNT = 20.0f;

Expand All @@ -17,7 +17,7 @@ void AudioCallback(AudioHandle::InterleavingInputBuffer in, AudioHandle::Interle
float tuneKnob = hardware.knob1.Value();
float detuneKnob = hardware.knob2.Value();

float leaderFrequency = cortex::map(tuneKnob, 65.406f, 261.626f, cortex::Mapping::LOG);
float leaderFrequency = neuron::map(tuneKnob, 65.406f, 261.626f, neuron::Mapping::LOG);
leader.SetFrequency(leaderFrequency);

float followerDetune = MAX_DETUNE_AMOUNT * ((detuneKnob * 2.0f) - 1.0f);
Expand Down

0 comments on commit 5f448f8

Please sign in to comment.