HISE Logo Forum
    • Categories
    • Register
    • Login

    Modulator Intensity/Depth in FAUST, best practice?

    Scheduled Pinned Locked Moved Faust Development
    4 Posts 2 Posters 125 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MorphoiceM
      Morphoice
      last edited by Morphoice

      This happens a lot and I always get this wrong.

      What is the best way to modulate a signal with e.g. a velocity dependent on a velocity-modulator intensity?

      signal is obviously -1 to +1 or any value
      modulator can be 0-1 (e.g. a velocity) or -1 to +1 (e.g. an lfo) (so I guess it's two seperate formulas)
      and the intensity is 0-1 where with 0 the signal remains unchanged and with 1 it is modulated by the velocity.

      what are the most simple formulas for this?
      I reckon many people often need this and can't wrap their head around it.

      I have figured this out many times before but whenever I look at it or try to reuse it on another occasion it somehow turns to mush by just looking at it... and a dry/wet node can't be the most optimal solution

      https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

      MorphoiceM 1 Reply Last reply Reply Quote 0
      • MorphoiceM
        Morphoice @Morphoice
        last edited by Morphoice

        I figured out the following so far

        velocity = 1-depth*(1-gain); // for modulation from 0-1
        process = osc(freq) * velocity <: _,_;
        

        this gives me a velocity according to the depth from gain (the midi velocity automatically captured in faust). So if depth is 1 there is full velocity modulation, if depth is 0 the notes are always maximum volume (velocity = 1)

        similarly with signals from -1 to 1 this should work

        modulation = 1-depth*(signal*0.5+0.5); // for modulation from -1 to +1
        process = osc(freq) * modulation <: _,_;
        

        someone please correct me if I'm wrong. This still looks like mush to me but it seems to work and I can't see an easier way to do it.

        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

        S 1 Reply Last reply Reply Quote 0
        • S
          sletz @Morphoice
          last edited by

          @Morphoice the first 1* part is just useless right ? (also Faust will optimise this itself of course)

          MorphoiceM 1 Reply Last reply Reply Quote 0
          • MorphoiceM
            Morphoice @sletz
            last edited by

            @sletz fixed thanks

            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            11

            Online

            1.7k

            Users

            11.8k

            Topics

            102.8k

            Posts