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

Thread: waveformMod Pulse Pulse With?

  1. #1
    Junior Member
    Join Date
    Mar 2015
    Posts
    9

    waveformMod_Pulse pulseWidth();?

    Hi!

    I can't modulate the Pulse Width of the Pulse waveform in the new waveformMod.

    edit:
    I noticed now the pulseWidth(); does not exist in the waveformMod object. Any plans to fix this in the future?
    Thanks in advance!
    Last edited by manatee; 02-19-2019 at 12:11 PM.

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,299
    The waveformMod object is not only about pulse waveforms but also about plenty of others including arbitrary, for which modulating the pulse width would not make sense or would be just technically impossible. Thus, if one would need to modulate the pulse width with this object, one had to do this within a if(waveform == pulse) condition.

    Feel free to fork the audio library on GitHub, to add this function and to contribute a pull request.

  3. #3
    Junior Member
    Join Date
    Mar 2015
    Posts
    9
    I'm aware that the pulse width function does not make sense to any waveform other than pulse. But since pulseWidth(); exists on the waveform object (is ignored if you have a waveform other than pulse selected) i though it would be available on the waveformMod object.

    Unfortunately i'm not skilled enough to mess with the library :/ but i'll try to take a look at it.
    Thanks!

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,539
    Quote Originally Posted by manatee View Post
    I can't modulate the Pulse Width of the Pulse waveform in the new waveformMod.
    Sure you can. In fact, that's exactly what the "Mod" version of the waveform is meant to do. You apply a signal to its 2nd input and that signal modulates the pulse width.


    I noticed now the pulseWidth(); does not exist in the waveformMod object. Any plans to fix this in the future?
    It's not broken. If you want to control the pulse width by calling a function from your code, then you would use the regular waveform. The "Mod" version is meant to have that stuff controlled by a signal input.

    If you want to use it with a fixed value with the "Mod" versoin, just connect the "DC" synth to its input. Then you can control the DC value, and it controls the signal input. Easy stuff.

  5. #5
    Junior Member
    Join Date
    Mar 2015
    Posts
    9
    oh, I see! thank you both for your help!

Posting Permissions

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