Jump to content


Photo

Sidechain gating. For real.


  • Please log in to reply
2 replies to this topic

#1 beublo

beublo

    Member

  • Normal Members
  • PipPip
  • 15 posts

Posted 01 January 2018 - 08:26

Hi there,

 

I was obsessed by the one feature I really miss in Renoise 3.1, sidechain gate. I found a simple enough solution that works fine for me using a Formula device. I thought I'd share it here if anyone else is interested.

The setup is quite simple: a signal follower on the sidechain source track and a formula+gainer on the destination track. SF targets the A parameter in the formula and the formula targets the gainer's gain. I put the gate threshold in the B parameter and here is the code to put in (and finetune to taste):

-- parameters
local low = .75 * db2lin(-40)
local hi = .75 * db2lin(0)
local attack = .8
local release = .04

-- actual code
local tgt = {[false]=low, [true]=hi}
local spd = {[false]=release, [true]=attack}
local state = low

function interp(v, t, c)
  return v + (t - v) * c
end

function gate(v, t)
  local above = v > t
  state = interp(state, tgt[above], spd[above])
  return state
end

And the output code is simply:

y = gate(A, B)

There are probably some much better sounding attack/release slopes to use here and much optimization to make, I just didn't bother but I'll take any suggestion of improvements :)

 

I love Formula. I love Renoise. :D

Happy new year everyone!

 

 

Edit: had forgotten to include the output code.


Edited by beublo, 01 January 2018 - 09:40.


#2 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5685 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 01 January 2018 - 09:59

Maybe you can include a quick demo song to show it in action?

Would be useful to see how you typically set it up and what kind of sounds you use.

#3 beublo

beublo

    Member

  • Normal Members
  • PipPip
  • 15 posts

Posted 01 January 2018 - 14:31

Well, here goes nothing…

 

It was the brilliant occasion to make a better version of it into a doofer. It took me a while to figure out a way to work around the three-parameter limitation in the Formula but that made me implement it in stages and it's much cleaner this way, with all controls in the front (threshold, output level, floor, attack, release).

 

It's a very short demo, I hope it answers some of your questions :)

https://drive.google...iew?usp=sharing

Edit: file was too big to upload… fixed attachment


Edited by beublo, 01 January 2018 - 14:34.

  • Neurogami likes this