HISE Logo Forum
    • Categories
    • Register
    • Login

    mixing an envelope signal with an aftertouch signal

    Scheduled Pinned Locked Moved Faust Development
    6 Posts 2 Posters 288 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

      Can someone tell me what is the best way to mix an envelope signal (0-1) with an aftertouch signal (0-1) so it pushes or overrides the envelope value towards 1 depending on key pressure?

      cutoff = envelope : ef.dryWetMixer(aftertouch,1);
      

      this doesnt seem to work... there is a weird input/outputs mismatch
      it seems to be a trivial thing but I can't figure out how to do it with faust

      I set up this simple example in faust IDE
      the aftertouch slider should bring the oscillation between 0 and 1 closer to 1 but I get an error I don't understand how to resolve

      import("stdfaust.lib");
      
      env = os.osc(1) * 0.5 + 0.5;
      process = ef.dryWetMixer(hslider("aftertouch",0,0,1,0.01),1);
      

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

      VirtualVirginV 2 Replies Last reply Reply Quote 0
      • VirtualVirginV
        VirtualVirgin @Morphoice
        last edited by

        @Morphoice Try this:

        e = envelope
        at = aftertouch
        mo = modulation output

        mo = e * (1 - at) + at

        You can listen to orchestral my orchestral mockups here:
        https://www.virtualvirgin.net/

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

          @Morphoice

          inline function modulateEnvelopeWithAftertouch(envelope, aftertouch)
          {
          	local modulatedSignal = envelope * (1 - aftertouch) + aftertouch;
          	return modulatedSignal;
          };
          

          You can listen to orchestral my orchestral mockups here:
          https://www.virtualvirgin.net/

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

            @VirtualVirgin superb thank you. How would you go about to make the aftertouch value variable to be either 0 (aftertouch closes the filter) or 1 (aftertouch opens the filter) or have no effect at all (I would Imagine the aftertouch"intensity slider to go from -1 to 1 where 0 is no effect)

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

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

              @Morphoice said in mixing an envelope signal with an aftertouch signal:

              @VirtualVirgin superb thank you. How would you go about to make the aftertouch value variable to be either 0 (aftertouch closes the filter) or 1 (aftertouch opens the filter) or have no effect at all (I would Imagine the aftertouch"intensity slider to go from -1 to 1 where 0 is no effect)

              I'm trying to understand what you are asking here.
              So you want to to turn the aftertouch control signal into a 3 way switch?
              Where in the signal path is the aftertouch happening?

              You can listen to orchestral my orchestral mockups here:
              https://www.virtualvirgin.net/

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

                @VirtualVirgin everything is calculated in faust. there is an input for aftertouch pressure and an aftertouch intensity knob that goes from -1 to +1 where at 0 aftertouch has no effect and on +1 it opens the filter (on -1 it should close the filter respectively)

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

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

                27

                Online

                1.7k

                Users

                11.8k

                Topics

                102.8k

                Posts