Super Formula Device

Sorry if I got you all excited but, I hereby make the awesome *Formula device, which I haven’t used myself sometime with the coming of the almost equally awesome (more useful) *MetaMixer device… into the Super Formula Device. It is comprised of the *Formula device, with all functions from Overtune (like rru, ard, squ, saw, crush, fold, etc) packed in the back aka the ‘User’ functions tab.

  
<?xml version="1.0" encoding="UTF-8"?>  
<filterdeviceclipboard doc_version="0"><br>
  <deviceslot type="FormulaMetaDevice"><br>
    <isactive>true</isactive><br>
    <isselected>true</isselected><br>
    <selectedpresetname>Init</selectedpresetname><br>
    <selectedpresetismodified>true</selectedpresetismodified><br>
    <ismaximized>true</ismaximized><br>
    <customdevicename>*Super Formula</customdevicename><br>
    <formulaparagraphs><br>
      <formulaparagraph>crush(fold(sin(LINEF / NUMLINES * TWOPI / <img src="https://files.renoise.com/forum/emoticons/default/cool.gif" class="bbc_emoticon" alt="B)">, C), 29)</formulaparagraph><br>
      <formulaparagraph>*A+.5</formulaparagraph><br>
    </formulaparagraphs><br>
    <functionsparagraphs><br>
      <functionsparagraph>pi=PI</functionsparagraph><br>
      <functionsparagraph>lowrnd_buf = 0</functionsparagraph><br>
      <functionsparagraph>lowrnd_step = 0</functionsparagraph><br>
      <functionsparagraph>lownoi_buf = 0</functionsparagraph><br>
      <functionsparagraph>lownoi_step = 0</functionsparagraph><br>
      <functionsparagraph>flr=floor</functionsparagraph><br>
      <functionsparagraph>rnd=random</functionsparagraph><br>
      <functionsparagraph>equ = function(x) return x end local ite = function(i, t, e) if i then return t else return e end end local btoi = function(<img src="https://files.renoise.com/forum/emoticons/default/cool.gif" class="bbc_emoticon" alt="B)"> if b then return 1 else return 0 end end local itob = function(i) if i&lt;=0 then return false else return true end end local saw = function(x) return 2*atan(tan(x/2))/pi end local squ = function(x) return (flr(sin(x)/2+1)*2-1) end local tri = function(x) return abs(1-mod((x+1.5*pi)/pi,2))*2-1 end local pls = function(x) return (flr(x/2+1)*2-1) end local ltan = function(x, y) return max(min(tan(x), y), -y)/y end local expsin = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*sin(x)^p else return squ(x)*abs(sin(x))^p end end local expsaw = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*saw(x)^p else return squ(x)*abs(saw(x))^p end end local exptri = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*tri(x)^p else return squ(x)*abs(tri(x))^p end end local sinsin sinsin = function(x, p) if p&gt;1 then return sinsin(sin(x), p-1) else return sin(x) end end local sinsaw sinsaw = function(x, p) if p&gt;1 then return sin(x*p)/p+sinsaw(x, p-1) else return sin(x) end end local sftsaw sftsaw = function(x, p) if p&gt;1 then return sin(x*p)/(2^p)+sftsaw(x, p-1) else return sin(x) end end local sinsqu sinsqu = function(x, p) if p&gt;1 then local v = p*2-1 return sin(x*v)/v+sinsqu(x, p-1) else return sin(x) end end local sqtfunhelp sqtfunhelp = function(fun, x, p) if p&gt;1 then return sqrt(sqtfunhelp(fun, x, p-1)) else return abs(fun(x)) end end local sqtsin = function(x, p) return squ(x)*sqtfunhelp(sin, x, p) end local sqtsaw = function(x, p) return squ(x)*sqtfunhelp(saw, x, p) end local sqttri = function(x, p) return squ(x)*sqtfunhelp(tri, x, p) end local un = function(x) return (x+1)/2 end local bi = function(x) return x*2-1 end local clip = function(x, y) return max(min(x, y), -y) end local semiclip = function(x, y, z) return (max(min(x, y), -y)*z + (1-z)*x) end local fold = function(x, y) return -bi(abs(1-abs(un((1+y)*x)))) end local semifold = function(x, y, z) return fold(x, y)*z + (1-z)*x end local crush = function(x, y) return flr(x*y)/y end local semicrush = function(x, y, z) return (flr(x*y)/y)*z + (1-z)*x end local noise = function(x, y, p) return x+(ite(x&lt;0, -1, 1))*y*(abs(x)^p)*rnd() end local lowrnd = function ( t, skip ) if lowrnd_step == 0 then lowrnd_buf = rnd() end lowrnd_step = mod( lowrnd_step + 1, skip ) return lowrnd_buf end local lownoise = function ( t, part ) if lownoi_step ~= flr(t*part) then lownoi_buf = rnd() end lownoi_step = flr(t*part) return lownoi_buf end local supermax = function(x, y) if x &gt;= 0 then return max(x,y) else return min(x,y) end end local supermin = function(x, y) if x &gt;= 0 then return min(x,y) else return max(x,y) end end local morph = function(x, y, z) return ((1-z)*x+z*y) end local upft = function(x, f, t) if x &lt; f or x &gt;= t then return 0 else return 1 end end local upf = function(x, f) if x &lt; f then return 0 else return 1 end end local upt = function(x, t) if x &gt;= t then return 0 else return 1 end end local sqrtsqrt = function(x, p) return sqtfunhelp(equ, x, p) end local ru = function(t, p) return t^p end local rd = function(t, p) return (1-t)^p end local aru = function(t, p) return 1-(1-t)^p end local ard = function(t, p) return 1-t^p end local rru = function(t, p) return 1-sqrtsqrt(1-t, p) end local rrd = function(t, p) return 1-sqrtsqrt(t, p) end local raru = function(t, p) return sqrtsqrt(t, p) end local rard = function(t, p) return sqrtsqrt(1-t, p) end</functionsparagraph><br>
    </functionsparagraphs><br>
    <inputnamea>á</inputnamea><br>
    <inputnameb>ß</inputnameb><br>
    <inputnamec>©</inputnamec><br>
    <editorvisible>true</editorvisible><br>
    <panelvisible>0</panelvisible><br>
    <inputa><br>
      <value>0.5</value><br>
      <visualization>Mixer and Device</visualization><br>
    </inputa><br>
    <inputb><br>
      <value>1.0</value><br>
      <visualization>Device only</visualization><br>
    </inputb><br>
    <inputc><br>
      <value>0.300000191</value><br>
      <visualization>Device only</visualization><br>
    </inputc><br>
    <desttrack><br>
      <value>-1</value><br>
      <visualization>Device only</visualization><br>
    </desttrack><br>
    <desteffect><br>
      <value>2</value><br>
      <visualization>Device only</visualization><br>
    </desteffect><br>
    <destparameter><br>
      <value>0.0</value><br>
      <visualization>Device only</visualization><br>
    </destparameter><br>
  </deviceslot><br>
</filterdeviceclipboard>  
  

(DISCLAIMER; I’ve done my best on all these functions which find their natural home in the Overtune tool. They are not guaranteed to work with the Formula device. Also, though I am confident they have been converted for use in Formula device properly, Formula is a hidden device by default and it is supposably not for nothing. So if your Renoise crashes and your million dollar song is lost (or similar scenarios) - by using this code, you agree to do this on your own risk and acknowledge that I can not be asked for compensation or even reasonable troubleshooting)

Ah, everybody knows it is just as risky as gambling with stocks. you can’t get your money back either if you loose money and the risks were known in advance.

Yeah, you know, just in case a forum mod would be so nice to tinker with the code ;)

anyway here’s an example of a crazy bouncing filter lfo:

Click to view contents
  
<?xml version="1.0" encoding="UTF-8"?>  
<filterdevicechainclipboard doc_version="0"><br>
  <devicecontainerslot type="SequencerTrackDeviceChain"><br>
    <devices><br>
      <sequencertrackdevice type="SequencerTrackDevice"><br>
        <isactive>true</isactive><br>
        <isselected>false</isselected><br>
        <selectedpresetname>Init</selectedpresetname><br>
        <selectedpresetismodified>false</selectedpresetismodified><br>
        <ismaximized>true</ismaximized><br>
        <customdevicename>Mixer</customdevicename><br>
        <panning><br>
          <value>0.5</value><br>
          <visualization>Device only</visualization><br>
        </panning><br>
        <volume><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </volume><br>
        <surround><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </surround><br>
        <postpanning><br>
          <value>0.5</value><br>
          <visualization>Device only</visualization><br>
        </postpanning><br>
        <postvolume><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </postvolume><br>
        <smoothparameterchanges>true</smoothparameterchanges><br>
      </sequencertrackdevice><br>
      <formulametadevice type="FormulaMetaDevice"><br>
        <isactive>true</isactive><br>
        <isselected>false</isselected><br>
        <selectedpresetname>Init</selectedpresetname><br>
        <selectedpresetismodified>true</selectedpresetismodified><br>
        <ismaximized>false</ismaximized><br>
        <formulaparagraphs><br>
          <formulaparagraph>crush(fold(sin(LINEF / NUMLINES * TWOPI / <img src="https://files.renoise.com/forum/emoticons/default/cool.gif" class="bbc_emoticon" alt="B)">, C), 29)</formulaparagraph><br>
          <formulaparagraph>*A+.5</formulaparagraph><br>
        </formulaparagraphs><br>
        <functionsparagraphs><br>
          <functionsparagraph>pi=PI</functionsparagraph><br>
          <functionsparagraph>lowrnd_buf = 0</functionsparagraph><br>
          <functionsparagraph>lowrnd_step = 0</functionsparagraph><br>
          <functionsparagraph>lownoi_buf = 0</functionsparagraph><br>
          <functionsparagraph>lownoi_step = 0</functionsparagraph><br>
          <functionsparagraph>flr=floor</functionsparagraph><br>
          <functionsparagraph>rnd=random</functionsparagraph><br>
          <functionsparagraph>equ = function(x) return x end local ite = function(i, t, e) if i then return t else return e end end local btoi = function(<img src="https://files.renoise.com/forum/emoticons/default/cool.gif" class="bbc_emoticon" alt="B)"> if b then return 1 else return 0 end end local itob = function(i) if i&lt;=0 then return false else return true end end local saw = function(x) return 2*atan(tan(x/2))/pi end local squ = function(x) return (flr(sin(x)/2+1)*2-1) end local tri = function(x) return abs(1-mod((x+1.5*pi)/pi,2))*2-1 end local pls = function(x) return (flr(x/2+1)*2-1) end local ltan = function(x, y) return max(min(tan(x), y), -y)/y end local expsin = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*sin(x)^p else return squ(x)*abs(sin(x))^p end end local expsaw = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*saw(x)^p else return squ(x)*abs(saw(x))^p end end local exptri = function(x, p) if p&gt;1 then return (squ(x)^(1-p%2))*tri(x)^p else return squ(x)*abs(tri(x))^p end end local sinsin sinsin = function(x, p) if p&gt;1 then return sinsin(sin(x), p-1) else return sin(x) end end local sinsaw sinsaw = function(x, p) if p&gt;1 then return sin(x*p)/p+sinsaw(x, p-1) else return sin(x) end end local sftsaw sftsaw = function(x, p) if p&gt;1 then return sin(x*p)/(2^p)+sftsaw(x, p-1) else return sin(x) end end local sinsqu sinsqu = function(x, p) if p&gt;1 then local v = p*2-1 return sin(x*v)/v+sinsqu(x, p-1) else return sin(x) end end local sqtfunhelp sqtfunhelp = function(fun, x, p) if p&gt;1 then return sqrt(sqtfunhelp(fun, x, p-1)) else return abs(fun(x)) end end local sqtsin = function(x, p) return squ(x)*sqtfunhelp(sin, x, p) end local sqtsaw = function(x, p) return squ(x)*sqtfunhelp(saw, x, p) end local sqttri = function(x, p) return squ(x)*sqtfunhelp(tri, x, p) end local un = function(x) return (x+1)/2 end local bi = function(x) return x*2-1 end local clip = function(x, y) return max(min(x, y), -y) end local semiclip = function(x, y, z) return (max(min(x, y), -y)*z + (1-z)*x) end local fold = function(x, y) return -bi(abs(1-abs(un((1+y)*x)))) end local semifold = function(x, y, z) return fold(x, y)*z + (1-z)*x end local crush = function(x, y) return flr(x*y)/y end local semicrush = function(x, y, z) return (flr(x*y)/y)*z + (1-z)*x end local noise = function(x, y, p) return x+(ite(x&lt;0, -1, 1))*y*(abs(x)^p)*rnd() end local lowrnd = function ( t, skip ) if lowrnd_step == 0 then lowrnd_buf = rnd() end lowrnd_step = mod( lowrnd_step + 1, skip ) return lowrnd_buf end local lownoise = function ( t, part ) if lownoi_step ~= flr(t*part) then lownoi_buf = rnd() end lownoi_step = flr(t*part) return lownoi_buf end local supermax = function(x, y) if x &gt;= 0 then return max(x,y) else return min(x,y) end end local supermin = function(x, y) if x &gt;= 0 then return min(x,y) else return max(x,y) end end local morph = function(x, y, z) return ((1-z)*x+z*y) end local upft = function(x, f, t) if x &lt; f or x &gt;= t then return 0 else return 1 end end local upf = function(x, f) if x &lt; f then return 0 else return 1 end end local upt = function(x, t) if x &gt;= t then return 0 else return 1 end end local sqrtsqrt = function(x, p) return sqtfunhelp(equ, x, p) end local ru = function(t, p) return t^p end local rd = function(t, p) return (1-t)^p end local aru = function(t, p) return 1-(1-t)^p end local ard = function(t, p) return 1-t^p end local rru = function(t, p) return 1-sqrtsqrt(1-t, p) end local rrd = function(t, p) return 1-sqrtsqrt(t, p) end local raru = function(t, p) return sqrtsqrt(t, p) end local rard = function(t, p) return sqrtsqrt(1-t, p) end</functionsparagraph><br>
        </functionsparagraphs><br>
        <inputnamea>á</inputnamea><br>
        <inputnameb>ß</inputnameb><br>
        <inputnamec>©</inputnamec><br>
        <editorvisible>true</editorvisible><br>
        <panelvisible>0</panelvisible><br>
        <inputa><br>
          <value>0.5</value><br>
          <visualization>Mixer and Device</visualization><br>
        </inputa><br>
        <inputb><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </inputb><br>
        <inputc><br>
          <value>0.300000191</value><br>
          <visualization>Device only</visualization><br>
        </inputc><br>
        <desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </desttrack><br>
        <desteffect><br>
          <value>2</value><br>
          <visualization>Device only</visualization><br>
        </desteffect><br>
        <destparameter><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </destparameter><br>
      </formulametadevice><br>
      <hydradevice type="HydraDevice"><br>
        <isactive>true</isactive><br>
        <isselected>false</isselected><br>
        <selectedpresetname>Init</selectedpresetname><br>
        <selectedpresetismodified>true</selectedpresetismodified><br>
        <ismaximized>true</ismaximized><br>
        <visiblepages>1</visiblepages><br>
        <inputvalue><br>
          <value>0.948275864</value><br>
          <visualization>Mixer and Device</visualization><br>
        </inputvalue><br>
        <out1desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out1desttrack><br>
        <out1desteffect><br>
          <value>3</value><br>
          <visualization>Device only</visualization><br>
        </out1desteffect><br>
        <out1destparameter><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out1destparameter><br>
        <out1min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out1min><br>
        <out1max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out1max><br>
        <out1scaling>Linear</out1scaling><br>
        <out2desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out2desttrack><br>
        <out2desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out2desteffect><br>
        <out2destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out2destparameter><br>
        <out2min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out2min><br>
        <out2max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out2max><br>
        <out2scaling>Linear</out2scaling><br>
        <out3desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out3desttrack><br>
        <out3desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out3desteffect><br>
        <out3destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out3destparameter><br>
        <out3min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out3min><br>
        <out3max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out3max><br>
        <out3scaling>Linear</out3scaling><br>
        <out4desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out4desttrack><br>
        <out4desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out4desteffect><br>
        <out4destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out4destparameter><br>
        <out4min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out4min><br>
        <out4max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out4max><br>
        <out4scaling>Linear</out4scaling><br>
        <out5desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out5desttrack><br>
        <out5desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out5desteffect><br>
        <out5destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out5destparameter><br>
        <out5min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out5min><br>
        <out5max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out5max><br>
        <out5scaling>Linear</out5scaling><br>
        <out6desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out6desttrack><br>
        <out6desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out6desteffect><br>
        <out6destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out6destparameter><br>
        <out6min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out6min><br>
        <out6max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out6max><br>
        <out6scaling>Linear</out6scaling><br>
        <out7desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out7desttrack><br>
        <out7desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out7desteffect><br>
        <out7destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out7destparameter><br>
        <out7min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out7min><br>
        <out7max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out7max><br>
        <out7scaling>Linear</out7scaling><br>
        <out8desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out8desttrack><br>
        <out8desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out8desteffect><br>
        <out8destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out8destparameter><br>
        <out8min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out8min><br>
        <out8max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out8max><br>
        <out8scaling>Linear</out8scaling><br>
        <out9desttrack><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out9desttrack><br>
        <out9desteffect><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out9desteffect><br>
        <out9destparameter><br>
          <value>-1</value><br>
          <visualization>Device only</visualization><br>
        </out9destparameter><br>
        <out9min><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </out9min><br>
        <out9max><br>
          <value>1.0</value><br>
          <visualization>Device only</visualization><br>
        </out9max><br>
        <out9scaling>Linear</out9scaling><br>
      </hydradevice><br>
      <filter3device type="Filter3Device"><br>
        <isactive>true</isactive><br>
        <isselected>true</isselected><br>
        <selectedpresetname>Init</selectedpresetname><br>
        <selectedpresetismodified>true</selectedpresetismodified><br>
        <ismaximized>true</ismaximized><br>
        <type><br>
          <value>0.0</value><br>
          <visualization>Device only</visualization><br>
        </type><br>
        <frequency><br>
          <value>0.948275864</value><br>
          <visualization>Device only</visualization><br>
        </frequency><br>
        <q><br>
          <value>1.12</value><br>
          <visualization>Device only</visualization><br>
        </q><br>
        <gain><br>
          <value>-60</value><br>
          <visualization>Device only</visualization><br>
        </gain><br>
        <inertia><br>
          <value>0.00719238399</value><br>
          <visualization>Device only</visualization><br>
        </inertia><br>
        <model>24dB 4Pole</model><br>
      </filter3device><br>
    </devices><br>
  </devicecontainerslot><br>
</filterdevicechainclipboard>  
  

Why can’t I paste this in Renoise? Ctrl+c within the above post, but no pasting option in Renoise??

Edit:

now it suddenly works, must have missed a < when copying.

I just had the same issue. Couldn’t paste the code from the second post but knew I had done from the first post yesterday. So I copied that and still wouldn’t let me paste in the DSP Chain area. Switched to Mixer, it let me paste in there. Then it subsequently let me post in the DSP Chain area as well. No changing of contents of the clipboard at all inbetween attempts (once I had copied that from the first post anyway.)

I did initially have the Scripting Terminal open and I’ve had issues pasting from external programs into there before, so I don’t know if that could be related. I did close it before changing to Mixer view but that on it’s own didn’t fix it. I have now re-opened it and can still paste what I have in my clipboard.

There does seem to be some funky behaviour with pasting from external programs at times…

Duh i don’t even tinker with my own messages containing pasted code snippets, the IPB message handler messes up everything in the code blocks when doing a re-edit of the message.

Dunno, the difference is the first post contains just a ‘FilterDeviceClipboard’ second one a ‘FilterDeviceChainClipboard’
both can always be pasted in Mixer view

OK Renoise still isn’t picking up my Clipboard correctly. I can see in the second post of your you have multiple devices (Formula, Hydra and Filter at least just from a very quick glance through) yet I am always just pasting in the Formula Device (I believe with the function from the first post.)

I have tried pasting into Notepad first and other methods which usually help when there are formatting issues.

OK standard (intelligent??) Paste (Ctrl+V or Paste on main context menu, not sub-menu) doesn’t seem to work. I have to go to Device Chains > Paste to paste in the full chain for some reason.