Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Modulating frequency with an envelope?

  1. #1
    Junior Member
    Join Date
    Apr 2018

    Modulating frequency with an envelope?


    As the title says, I'm wondering how to achieve this with the Audio Library. I've tried with the AudioSynthWaveformModulated and the AudioEffectEnvelope, hooking the output of the envelop into the first input of the waveformMod. I then initiated all the waveform and envelope settings, called the "begin" method on the waveform but calling "noteOn" on the envelope does not seem to change the pitch.. it merely is stuck on the pitch it was initiated with.

    Any ideas what I could be doing wrong?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    The envelope needs an input signal. It's an effect, so it doesn't create anything on its own. No input means no output.

    Give it a DC input if you want just the envelope for something else to use.

    Like this...

    Click image for larger version. 

Name:	env.png 
Views:	12 
Size:	10.3 KB 
ID:	15236

  3. #3
    Junior Member
    Join Date
    Apr 2018
    You're the best Paul! I tried something similar with a sine synth, which gave an odd but interesting result. Didn't notice the DC object before you mentioned it. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts