"If Then" - Device

:panic: :panic: :panic:


:panic: :panic: :panic:
:dribble:

wait until you see the 2.8 release without any DSP devices, just the Formula Device :)

mmmm, this’d give me an excuse to brush up on my maths :)

OT: are you the same I-F from the ‘Space Invaders are Smoking Grass’ track? or just a similar name?

Perhaps you can bring down tall skyscrapers with it at free-fall speed :P

No I’m afraid not. Wasn’t aware of anyone by that name, ‘I-F’ is just an abbreviation.

@vV: It was either that or invent some intricate optical illusion.

well then, check it out! I-F - Space invaders are smoking grass (YouTube)

ok end of OT! back to the discussion (if any)

Something like this could be a start. If returns 1 when the Audio IN exceeds a certain threshold, otherwise the output is 0.
This is useful to control volumes on effects of other tracks. Leaving out the 0.7 things, it may be useful to trigger lfos on certain events happening on Audio IN.

To use it, assign the formula device control output to a parameter (ie volume on a send track), then feed the Audio IN parameter with a signal follower, and experiment with the threshold parameter.
from now on you can try to create a S&H easily by just interpolating the output values.

  
<?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>
    <formulaparagraphs><br>
      <formulaparagraph>0.7 - if_then(A, <img src="https://files.renoise.com/forum/emoticons/default/cool.gif" class="bbc_emoticon" alt="B)"></formulaparagraph><br>
    </formulaparagraphs><br>
    <functionsparagraphs><br>
      <functionsparagraph>function if_then(v, thres)</functionsparagraph><br>
      <functionsparagraph> if v &gt; thres then</functionsparagraph><br>
      <functionsparagraph> return 1.0</functionsparagraph><br>
      <functionsparagraph> end</functionsparagraph><br>
      <functionsparagraph> return 0.0</functionsparagraph><br>
      <functionsparagraph>end</functionsparagraph><br>
      <functionsparagraph></functionsparagraph><br>
    </functionsparagraphs><br>
    <inputnamea>Audio IN</inputnamea><br>
    <inputnameb>Threshold</inputnameb><br>
    <inputnamec></inputnamec><br>
    <editorvisible>false</editorvisible><br>
    <panelvisible>0</panelvisible><br>
    <inputa><br>
      <value>0.0</value><br>
      <visualization>Device only</visualization><br>
    </inputa><br>
    <inputb><br>
      <value>0.640000463</value><br>
      <visualization>Device only</visualization><br>
    </inputb><br>
    <inputc><br>
      <value>0.0</value><br>
      <visualization>Device only</visualization><br>
    </inputc><br>
    <desttrack><br>
      <value>9</value><br>
      <visualization>Device only</visualization><br>
    </desttrack><br>
    <desteffect><br>
      <value>0.0</value><br>
      <visualization>Device only</visualization><br>
    </desteffect><br>
    <destparameter><br>
      <value>1.0</value><br>
      <visualization>Device only</visualization><br>
    </destparameter><br>
  </deviceslot><br>
</filterdeviceclipboard>  
  

What are the Functions in the User section written in?

lua :)

anyway don’t expect to access all the beautiful API in there. We had to limit the exposed functions as we run the formula in the audio thread, so manipulating the doc or gui from there will results in headaches and problems.

Smart stuff! :) Thanks

something like: better a diamond with flaws than a pebble without. :)

this should probably be in tips n tricks, but it does make more sense being hidden in here since it’s not officially supported.

I wish I didn’t have job search as my main priority right now!
this is the end all for so many feature ideas I’ve had.

If bitarts ever sees this, he would be back, someone who knows him should tell him.

I believe he wanted to have control over instrument envelopes and some other stuff that isn’t possible yet (wave generators etc.).
Besides, this device has been revealed after 2.6 was published, so the device existence is quite known for some time.
He might already have learned about it some while ago.

while you are right that anyone could have known about this, often most people find out this kind of stuff when it is posted on the forums. either that, or everybody already knew about it and nobody bothered to post it. but i doubt that. i’m glad it was posted, and i really should go searching for these things with each release.