Pulse width modulation?
  • Hello from Russia ;)

    I am new to Audulus. It looks and sounds awesome for me :)

    Some of my wishes for OSC improvements:

    - pulse width modulation input for square wave osc;
    - ability to control sawtooth rise / fall time (want to modulate it via the same input as for pulse width control);
    - One-cycle sampler OSC (may be one or some more wave cycles can be used for better reality) - ability to use custom waves as OSC source (sampled from real instruments or constructed by myself using third party tools)
    - FM input for any OSC (for building DX-style operators, not only sine as inside DX7, but also like TX81z too with different waveforms)

    If one-cycle OSC can be released, it will be good addition to it - ability to create sequences of different waveforms (crossfaded) - some kind of complex OSC.

    Another thing that I wish is formant filter for building "talking" patches (with formant sequencer).

    Once again, thank you very much for the Audulus!

    Best regards,

  • @whitemix, Denis, welcome!

    Those are great suggestions. Do you think all the options should be in the current Osc node or should there be several other Osc nodes for different cases? My only worry is how to pack in a lot of those options into the current UI.

    Also, I think you can do FM using a little math and the pitch input.

    Cheers from San Francisco,
    - Taylor
  • @whitemix

    Hi Denis, greetings from London! I think a number of things you are asking for can already be done with the available nodes.

    1) PWM Osc can be made using a saw tooth with the 'less than' node. Have a look at the attached patch file and in there you can see such a set up. Increase the pulse width dial to increase the pulse width, I have kept the pitch very low so you can see the effect on the waveform monitor.

    I also had a go at making a triangle wave with adjustable slope (also in the same file). You can turn the slope dial to change between a triangle wave and saw tooth wave. However although this looks right on the wave meter at a very low pitch. It doesn't sound right at audible frequencys.

    @Taylor, do you have any ideas on what I am doing wrong here?

    I suspect there are probably other ways to make this kind of oscillator, I just haven't worked it out yet. If not then yes, your suggestion would be useful to have.

    2) You can draw custom waves using the spline node but this doesn't have curves yet. You can't load in waveforms and it would be great if you could. I would suggest that the sample player node is upgraded to achieve this. If the Sample node could playback at different pitch's (with interpolation) and loop samples you could then load in your own waveforms as oscillators. If it could have a selectable bank of waves then you could start doing things like wavetable synthesis. Modulatable loop points would also be cool and if the Sample node could also record sound from inputs or internally then we could even build our own delay units!

    3) I think Yamaha used Phase modulation, it seems that to all practical extents it sounds the same as FM which you can do already. Have a read of this: http://moinsound.wordpress.com/2011/03/04/frequency-modulation-or-phase-modulation-synthesizer-technologies/ there are other articles discussing this if you search around.

    4) You can build a formant filter using the existing tools, this article shows you how: http://www.soundonsound.com/sos/mar01/articles/synthsec.asp @dcramer built a vocoder patch which is a step in that direction.

    So overall most of what you want can be done with existing nodes, it would be useful if it was easier to drop in sub patches into a patch and build up a library of them. It might also be useful if it came with a library of sub patches that provided some of the things you ask for. Anyway its still early days and I'm sure all this will be coming up in future versions.

    PWM Oscillators.audulus
  • Yup, we all went pretty crazy finding different way to do PWM in Audulus, there's probably about a half dozen examples up here!
  • @Taylor, thanks thats probably it, I'm using the square wave to track the rising and descending elements of the triangle wave and then speeding the rising phase up and slowing the descending phase down to get the slope shift. If the square wave is antialiased then I think it will all drift out of sync. Oh well, back to the drawing board on that one!

    Oscilloscope node would be very cool!

  • @afta8 thank you for the patch and links, very interesting approach - I will have a look more closer :)

    It works fine on iPad.

    @Taylor my Audulus for Mac crashes with this patch (I just sent crash log to you).

    But I still think that more straight way to use PWM would be very cool too
  • @whitemix, heres another approach to make a saw osc with a PW control, its not as smooth as it would be if the slope was being changed but it does morph from a saw to a triangle(ish) wave and works at audio frequencies.
    PWM Saw Osc.audulus
  • @afta8, thank you once again, will look at this
    It does not work on my Mac - Audulus crashes immediately after your patch is loaded,
    on iPad I can not look inside subpatch...

    @Taylor - can you fix this? (crash report sent to you)
    May be something wrong with my Mac??

    @afta8 What do you think about phase shifting? Is it possible now to run two OSC in parallel with different starting phases? Delay can be used, but it can not be controlled via input port.
  • @whitemix, I've been making my patches in 1.8 beta 2 so maybe thats why they are crashing your Mac version. You can get it here http://forum.audulus.com/discussion/comment/690#Comment_690

    Yes you could start two Osc with different phases by using the timer node and a less than node to slightly delay one of the Osc, I've attached a quick example. To make this work properly you would need to key track the delay amount so that different pitches have the same phase offset.

    Another way to do it would be to put a very slight pitch wobble at the beginning of one of the oscillators which would effectively move it out of phase with the other, the depth of the wobble would effectively influence the amount of phase shift. You could also use this technique to phase shift oscillators while they are running without re-triggering the sync. This one would be a bit more complex to build though!
    Phase Shift.audulus
  • @whitemix, sorry about that! I'll have a look.

    By the way, I'm waiting on Apple to approve a new Mac version which should fix the problems of the two being out of sync.

    - Taylor
  • @Taylor thank you, now it works on my Mac, but in phase shifted osc example above

    I can see some clicks on phase shifted OSC and can not understend why... The clicks are present if the sync input for the OSC = 1. Is it normal?
  • @afta8, once again bravo!
  • @whitemix, I just looked more closely at those clicks and I'm not sure why that's happening. They go away when you disconnect the sync input. The clicks are also visible when just connecting a constant node to the sync input. I'm going to call it a bug and dig deeper.
  • Fixed it! The fix will be in the next release :-)
  • Great! Thank you very much!