Skip to content

Instantly share code, notes, and snippets.

@zunaito
Last active January 2, 2020 20:00
Show Gist options
  • Save zunaito/8d522667931fb7b039be47051d14b3e6 to your computer and use it in GitHub Desktop.
Save zunaito/8d522667931fb7b039be47051d14b3e6 to your computer and use it in GitHub Desktop.
Convolution2L sc ugen wrapped in a norns engine
Engine_Kyber : CroneEngine {
var <synth;
*new { arg context, doneCallback;
^super.new(context, doneCallback);
}
alloc {
SynthDef(\Convolution2L, {
arg in, out, kernel, trigger=0.0, framesize=2048, crossfade=1.0;
var sig = {
Convolution2L.ar(SoundIn.ar([0, 1]),
kernel,
trigger,
framesize,
crossfade
);
};
Out.ar(out, sig);
}).add;
context.server.sync;
synth = Synth.new(\Convolution2L, [
\out, context.out_b.index],
context.xg);
this.addCommand("kernel", "f", {|msg|
synth.set(\freq, msg[1]);
});
this.addCommand("trigger", "f", {|msg|
synth.set(\res, msg[1]);
});
this.addCommand("framesize", "f", {|msg|
synth.set(\inputGain, msg[1]);
});
this.addCommand("crossfade", "f", {|msg|
synth.set(\fType, msg[1]);
});
free {
synth.free;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment