Skip to content

Commit

Permalink
Disabling sub-voice processing on minilogue-xd and nutekt-digital to …
Browse files Browse the repository at this point in the history
…reduce issues with high cpu load
  • Loading branch information
peterall committed Oct 28, 2020
1 parent 27969e5 commit 5439492
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"DARM_MATH_CM4",
"__FPU_PRESENT",
"_USE_MATH_DEFINES",
"uint32_t=unsigned long int"
"uint32_t=unsigned long int",
"SUB_ENABLED=true"
],
"compilerPath": "${workspaceFolder}/logue-sdk/tools/gcc/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc",
"cStandard": "c11",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TOPTARGETS := all

PLATFORMS := prologue minilogue-xd nutekt-digital

VERSION=1.2-0
VERSION=1.2-1
PACKAGE = junologue-chorus-$(VERSION).zip

$(TOPTARGETS): $(PLATFORMS) package
Expand Down
18 changes: 11 additions & 7 deletions junologue-chorus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ void MODFX_PROCESS(const float *main_xn, float *main_yn,

while(main_output != main_output_end) {
main_delay.write(main_pre_lpf.process_fo(SoftLimit(f32pair_reduce(*main_input))));
sub_delay.write(sub_pre_lpf.process_fo(SoftLimit(f32pair_reduce(*sub_input))));
if(SUB_ENABLED) {
sub_delay.write(sub_pre_lpf.process_fo(SoftLimit(f32pair_reduce(*sub_input))));
}

lfo_1.cycle();
lfo_2.cycle();
Expand All @@ -170,13 +172,15 @@ void MODFX_PROCESS(const float *main_xn, float *main_yn,
f32pair_mulscal(*main_input++, dry_gain),
f32pair_mulscal(f32pair_process_fo(main_post_lpf_l, main_post_lpf_r, main), wet_gain));

const auto sub = f32pair_add(
f32pair_mulscal(readDelays(sub_delay, lfo_val1), delay_gain.a),
f32pair_mulscal(readDelays(sub_delay, lfo_val2), delay_gain.b));
if(SUB_ENABLED) {
const auto sub = f32pair_add(
f32pair_mulscal(readDelays(sub_delay, lfo_val1), delay_gain.a),
f32pair_mulscal(readDelays(sub_delay, lfo_val2), delay_gain.b));

*sub_output++ = f32pair_add(
f32pair_mulscal(*sub_input++, dry_gain),
f32pair_mulscal(f32pair_process_fo(sub_post_lpf_l, sub_post_lpf_r, sub), wet_gain));
*sub_output++ = f32pair_add(
f32pair_mulscal(*sub_input++, dry_gain),
f32pair_mulscal(f32pair_process_fo(sub_post_lpf_l, sub_post_lpf_r, sub), wet_gain));
}
}
}

Expand Down
7 changes: 5 additions & 2 deletions junologue-chorus.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ CMSISDIR = $(EXTDIR)/CMSIS/CMSIS

ifeq ($(PLATFORM), prologue)
PKGSUFFIX = prlgunit
SUB_ENABLED = true
endif

ifeq ($(PLATFORM), minilogue-xd)
PKGSUFFIX = mnlgxdunit
SUB_ENABLED = false
endif

ifeq ($(PLATFORM), nutekt-digital)
PKGSUFFIX = ntkdigunit
SUB_ENABLED = false
endif

# #############################################################################
Expand Down Expand Up @@ -82,10 +85,10 @@ LDSCRIPT = $(LDDIR)/usermodfx.ld
DLIBS = -lm

DADEFS = -DSTM32F446xE -DCORTEX_USE_FPU=TRUE -DARM_MATH_CM4
DDEFS = -DSTM32F446xE -DCORTEX_USE_FPU=TRUE -DARM_MATH_CM4 -D__FPU_PRESENT
DDEFS = -DSTM32F446xE -DCORTEX_USE_FPU=TRUE -DARM_MATH_CM4 -D__FPU_PRESENT -DSUB_ENABLED=$(SUB_ENABLED)

COPT = -std=c11 -mstructure-size-boundary=8
CXXOPT = -std=c++14 -fno-rtti -fno-exceptions -fno-non-call-exceptions -funroll-loops
CXXOPT = -std=c++14 -fno-rtti -fno-exceptions -fno-non-call-exceptions -funroll-loops -ffast-math

LDOPT = -Xlinker --just-symbols=$(LDDIR)/main_api.syms

Expand Down

0 comments on commit 5439492

Please sign in to comment.