From the original SynthMaker forum (2004–2014), with its members’ names and dates.
MDMA ·
Hi guys,
So I've just recently decided to dive into code and am trying to create a kind of sidechain effect for a vst with 2 separate midi channels.
I need "In" to be "0" (or whatever its recieved in "amt") when I recieve a true value in "streamboolin" and it to be "In" again when the "streamboolin" is false.
The following code works for me but I have lots of clips in the sound because I don't know how to make things smoother.
out = (On==1) & (In * amt) + (On==0) & (In);
out1 = min(1,max(out,0));
I've been looking but cant understand how I can make this go from "0" to "x" and back with a bit of smoothing.
So instead of having a chage like this:
0
1
I'd like to achieve something like this:
0
0.1
0.2
0.3
0.4
etc...
How is this done?
A Loop in the code? Transitional Delay? Envelope Follower?
Thanks in advace!
Xtinct ·
+1
I usualy smooth out with an env follower but would also like to find out how to do it in code.
If only there was a asm to code converter as asm is way beyond me.
Mo ·
MDMA wrote: I've been looking but cant understand how I can make this go from "0" to "x" and back with a bit of smoothing.
Just one thing, I can't understand how the lowpass filter code really works and is it a 6db filter?
I'd like to create more things with code, like filters, envelopes, oscillators, etc.
I've read quite a fair bit of the SOS synth secrets articles but can't seem to find a resorce that actually shows us how to build these elements with code.
Could you please point the right direction to learn about this?
Thanks again for the support!
Mo ·
Yes, it is a first order/1-pole/6 Db lowpass filter.
There's a lot of coding tips here on forum and wiki. For me it is the easiest to make the code in ASM.
MDMA ·
Mo wrote: Yes, it is a first order/1-pole/6 Db lowpass filter.
There's a lot of coding tips here on forum and wiki. For me it is the easiest to make the code in ASM.
Cheers, I'll have a look arround!
You rather use ASM? I thought ASM was a lot more complicated???
Mo ·
MDMA wrote: You rather use ASM? I thought ASM was a lot more complicated???
Yes. It takes some time to learn well but then i think it is more easy to read, write, troubleshoot and optimize.
Acrobat ·
MDMA wrote: I can't understand how the lowpass filter code really works and is it a 6db filter?
Let me chat about it in my way, you or other people here might appreciate:
One cool thing spreading out of the filter subject is that filters are like "differential delays".
If you let yourself see them this way, you'll discover that they're just influencing frequencies: in a LP the faster are attenuated, the lower ones are preserved.
The steepness (6, 12, 18 24dB) actually represents the width of the grey-zone between attenuation and preservation.
Since the grey-zone is particularly wide for 6db filters, they act like smoothers because they interact also with particularly slow value changes, like knob movements, and to do that it's only the case of setting them in a strategic frequency range.
A.
bootsy ·
why not use the de-zipper?
oddson ·
bootsy wrote: why not use the de-zipper?
I was going to ask the same thing when this thread was new but I looked into the code's performance and it seems like a pretty light way of doing the same thing.
infuzion ·
Surprised the question of "Linear or dB?" has not been raised yet... since "smooth" would be relative to dB in my eyes, ur ears, yet the code seems to linear.
Wrote something here? To have a post removed or your name hidden, write to [email protected].