Skip to content

Effect "dj-filter" should be inactive when value is 0.5 #293

Open
@jarmitage

Description

@jarmitage

Currently # djf 0.5 is audible, ideally it would not be

SynthDef("dj-filter" ++ ~dirt.numChannels, { |out, djf|
var signal;
var lpfCutoffFreq = djf.linexp(0, 0.5, 20, 10000);
var hpfCutoffFreq = djf.linexp(0.5, 1, 20, 10000);
signal = In.ar(out, ~dirt.numChannels);
signal = RHPF.ar(
RLPF.ar(
signal,
lpfCutoffFreq
),
hpfCutoffFreq
);
ReplaceOut.ar(out, signal)
}, [\ir]).add;

This could be achieved using perhaps some kind of control structure (incorrect code below)

signal = Select.ar(djf != 0.5, [
	signal,
	RHPF.ar(
		RLPF.ar(
			signal,
			lpfCutoffFreq
		),
		hpfCutoffFreq
	)
]);

An alternative might be # djf "-1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions