Skip to content

Commit

Permalink
lichen-community-systemsgh-67: Minor renaming and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinbdclark committed Jan 2, 2024
1 parent 6c38b84 commit 967bf56
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct sig_dsp_BinaryOp* sum1;
struct sig_dsp_BinaryOp* sum2;
struct sig_dsp_BinaryOp* sum3;
struct sig_dsp_ConstantValue* combGain;
struct sig_dsp_BinaryOp* combScale;
struct sig_dsp_BinaryOp* scaledCombMix;
struct sig_DelayLine* dl5;
struct sig_dsp_ConstantValue* ap1DelayTime;
struct sig_dsp_Allpass* ap1;
Expand All @@ -90,7 +90,7 @@ void UpdateOled() {
bluemchen.display.WriteString(displayStr.Cstr(), Font_6x8, true);

displayStr.Clear();
displayStr.Append("Dec ");
displayStr.Append("g ");
displayStr.AppendFloat(feedbackGainScaleKnob->outputs.main[0], 2);
bluemchen.display.SetCursor(0, 16);
bluemchen.display.WriteString(displayStr.Cstr(), Font_6x8, true);
Expand Down Expand Up @@ -205,17 +205,17 @@ void buildSignalGraph(struct sig_SignalContext* context,
sum3->inputs.right = c4->outputs.main;

combGain = sig_dsp_ConstantValue_new(&allocator, context, 0.2f);
combScale = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, combScale, status);
combScale->inputs.left = sum3->outputs.main;
combScale->inputs.right = combGain->outputs.main;
scaledCombMix = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, scaledCombMix, status);
scaledCombMix->inputs.left = sum3->outputs.main;
scaledCombMix->inputs.right = combGain->outputs.main;

ap1DelayTime = sig_dsp_ConstantValue_new(&allocator, context, 0.09683f);
dl5 = sig_DelayLine_new(&delayLineAllocator, MAX_DELAY_LINE_LENGTH);
ap1 = sig_dsp_Allpass_new(&allocator, context);
sig_List_append(&signals, ap1, status);
ap1->delayLine = dl5;
ap1->inputs.source = combScale->outputs.main;
ap1->inputs.source = scaledCombMix->outputs.main;
ap1->inputs.delayTime = ap1DelayTime->outputs.main;
ap1->inputs.g = apGain->outputs.main;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct sig_dsp_BinaryOp* sum1;
struct sig_dsp_BinaryOp* sum2;
struct sig_dsp_BinaryOp* sum3;
struct sig_dsp_ConstantValue* combGain;
struct sig_dsp_BinaryOp* combScale;
struct sig_dsp_BinaryOp* scaledCombMix;

struct sig_DelayLine* d1DL;
struct sig_dsp_ConstantValue* d1DelayTime;
Expand Down Expand Up @@ -308,26 +308,26 @@ void buildSignalGraph(struct sig_SignalContext* context,
sum3->inputs.right = c4->outputs.main;

combGain = sig_dsp_ConstantValue_new(&allocator, context, 0.2f);
combScale = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, combScale, status);
combScale->inputs.left = sum3->outputs.main;
combScale->inputs.right = combGain->outputs.main;
scaledCombMix = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, scaledCombMix, status);
scaledCombMix->inputs.left = sum3->outputs.main;
scaledCombMix->inputs.right = combGain->outputs.main;

/** Decorrelation Delays **/
d1DL = sig_DelayLine_new(&delayLineAllocator, MAX_DELAY_LINE_LENGTH);
d1DelayTime = sig_dsp_ConstantValue_new(&allocator, context, 0.046f);
d1 = sig_dsp_Delay_new(&allocator, context);
sig_List_append(&signals, d1, status);
d1->delayLine = d1DL;
d1->inputs.source = combScale->outputs.main;
d1->inputs.source = scaledCombMix->outputs.main;
d1->inputs.delayTime = d1DelayTime->outputs.main;

d2DL = sig_DelayLine_new(&delayLineAllocator, MAX_DELAY_LINE_LENGTH);
d2DelayTime = sig_dsp_ConstantValue_new(&allocator, context, 0.057f);
d2 = sig_dsp_Delay_new(&allocator, context);
sig_List_append(&signals, d2, status);
d2->delayLine = d2DL;
d2->inputs.source = combScale->outputs.main;
d2->inputs.source = scaledCombMix->outputs.main;
d2->inputs.delayTime = d2DelayTime->outputs.main;

leftOut = sig_daisy_AudioOut_new(&allocator, context, host);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct sig_dsp_BinaryOp* sum4;
struct sig_dsp_BinaryOp* sum5;

struct sig_dsp_ConstantValue* combMixGain;
struct sig_dsp_BinaryOp* combScale;
struct sig_dsp_BinaryOp* scaledCombMix;

struct sig_DelayLine* dl7;
struct sig_dsp_ConstantValue* apDelayTime;
Expand Down Expand Up @@ -388,19 +388,22 @@ void buildSignalGraph(struct sig_SignalContext* context,
sum5->inputs.right = c6->outputs.main;

combMixGain = sig_dsp_ConstantValue_new(&allocator, context, 0.2f);
combScale = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, combScale, status);
combScale->inputs.left = sum5->outputs.main;
combScale->inputs.right = combMixGain->outputs.main;
scaledCombMix = sig_dsp_Mul_new(&allocator, context);
sig_List_append(&signals, scaledCombMix, status);
scaledCombMix->inputs.left = sum5->outputs.main;
scaledCombMix->inputs.right = combMixGain->outputs.main;

/** All Pass **/
// Note: I don't scale the all pass delay time with the delay time knob,
// because I think it sounds better tuned as is (Moorer has a comment about
// needed to keep the delay time of the all pass short).
apDelayTime = sig_dsp_ConstantValue_new(&allocator, context, 0.005f);
apGain = sig_dsp_ConstantValue_new(&allocator, context, 0.7f);
dl7 = sig_DelayLine_new(&delayLineAllocator, MAX_DELAY_LINE_LENGTH);
ap = sig_dsp_Allpass_new(&allocator, context);
sig_List_append(&signals, ap, status);
ap->delayLine = dl7;
ap->inputs.source = combScale->outputs.main;
ap->inputs.source = scaledCombMix->outputs.main;
ap->inputs.delayTime = apDelayTime->outputs.main;
ap->inputs.g = apGain->outputs.main;

Expand Down

0 comments on commit 967bf56

Please sign in to comment.