To have all in one node, instead of needing to roll our own:
Sine
Triangle
Saw up
Saw down
Square
Random
PWM

## QC equivalent:

Waveform Generator (LFO)

## Component:

Notes from Team Vuo

## Vuo Pro:

No — available with both Vuo CE and Vuo Pro

## Complexity:

●○○○ — Up to a few days of work

## Potential:

●○○ — Appeals to current community

Saw down — can be added to the `Wave` node.

Square, PWM — we're thinking these would go on a `Pulse Wave` node. The node would have an additional input, Pulse Width, that controls the proportion of the period that the wave is up (near 0 for pulse, 0.5 for square).

Random — already available with `Fire Periodically -> Make Random Value`.

### You know that sine, Triangle,

workaround :-) :: Invert Saw up for Saw down (multiply by -1) You can make a Square with some simple logic like is time value even or odd (multiply time input to speed up or slow down period) PWM trigger a pulse with floored time value changing (again multiply time input with inverse of period input) set pulse width input to switch pulse down again.

I'll try and make with nodes when I have some spare time. Can't do native nodes yet, sorry.

I wrote a Javascript patch in QC to do all the interpolation patch waves inside iterators (where interpolate didn't work at one time IIRC something like that). So Sine, Exponential, etc, the equations for the curves are in that if you can find on Kineme.net. It would make a good start for what you want to code here in Vuo if you know some C.

### Opened for voting. (See the

 Feature status: Waiting for review by Team Vuo » Open for community voting

Opened for voting. (See the Notes from Team Vuo added above.)

### Thanks, Alistair. I actually

Thanks, Alastair. I actually think I remember your javascript interpolation patch. For quite a while I tried to keep up on the interesting stuff going on in QC, i.e., the kineme site.

I think it is super useful to have all the waveforms all in one node, at least for my stuff. Maybe you are thinking that the Vuo team has bigger things to tend to -- I am certainly sympathetic to that.

Anyway, I already put together the other waveforms like you mention -- seeing what it took is what brought me here. :-)

### Well, I really do not want to

I don't want to make busy work for anybody, but my point here is not about what's already possible or coming with other nodes as much as having waveforms all in one convenient node. I'd use this and `Pulse` -- why is redundancy bad for a basic tool like this (think of `Wave` and `Curve`)?

The attached comp above creates multiple waveforms (see pic), and I could put this in one subcomp, I guess. I'd still add a couple things, center for Random, etc.

### The reason for suggesting a

The reason for suggesting a separate node for pulse waves is that it needs an extra input port for pulse width. Adding that input port to the existing `Wave` node would mean having an input port that has no effect for most of the wave types — a possible usability issue for someone learning how to use the node and not seeing any effect from that port.

### ... although maybe the basic

... although maybe the basic `Wave` node could have a few preset pulse widths (including square) as options in the Wave port's menu, and a separate `Pulse Wave` node could offer finer control over pulse width.

### Ok, I vote for Wave to

Ok, I vote for Wave to include Sine, Triangle, Saw Up, Saw Down, Square and Random, leaving PWM for the Pulse node.

### I can understand wanting to

I can understand wanting to keep it clean. Not sure what those preset pulsewidths would be, cuz what about the "m" in pwm, ie, modulating pulsewidth....

### okay, i wonder how much more

okay, i wonder how much more performant it will be in the stock node than as your sub-composition? Or do you just want this for less feature overlap/redundancy in nodes? ;-) I think it's a good idea anyhow.

### A couple issues for the

A couple issues for the Random option on `Wave`. I'd appreciate hearing your thoughts.

In QC, the LFO patch's Random mode generates 1 number per period. Is that what you're expecting for Vuo's `Wave` node? If so, this one wave type would behave differently than all of the others, outputting a single number instead of a stream of numbers. Possible problem for usability / learning curve?

In QC, an LFO patch has its own (internal/uneditable) random seed, so that each time you start the composition the LFO node generates the same random sequence. Each different LFO patch has a different seed. Is it important to mimic that behavior in Vuo? (It wouldn't be easy to add, as Vuo doesn't currently have any way to store that kind of internal data in a composition.)

### Hmm, I see your points, and

Hmm, I see your points, and if you decide to not go ahead with either because this is the Vuo way, I would see why. These features are still possible to achieve with other nodes. That said....

I vote for having the random waveform generate one number per period. I found this really useful with QC's random waveform in the LFO. I see the `Wave` node as a tool for modulating things. Generating one value per period is the audio synthesis equivalent to adding a sample and hold to a noise generator. To me, noise is a sound generator, noise + sample and hold is more useful as a modulator. I'm not sure why this would be a problem for learning -- in QC, it made sense for the environment, and I was glad to discover it behaved like it did.

I vote for not having it generate its own random seed. I see a case for having a random seed as making the random waveform behave consistently like the other waveforms, for animations and whatnot. I personally think it'll be fine without it, and if I needed this I could achieve it with `Make Random Value with Seed`.

## Feature status

• Submitted to vuo.org
• Reviewed by Team Vuo
• Open for community voting
• Chosen to be implemented
• Released

When we (Team Vuo) plan each release, we try to implement as many of the community's top-voted feature requests as we have time for.

If anyone would like to help this happen sooner, we're also accepting open source contributions and commissioned work.