Modulate signal to square wave?

synapserelapse's icon

This seems like it would be easy, but I'm just learning.

I'm trying to modulate an input (adc~) signal to a square wave, the amount of which signal to be modulated is controlled by a slider object. I'm pretty sure I can figure out the slider part, but can anyone point me in the right direction about modulating a signal?

Thanks!

brendan mccloskey's icon

Can you clarify exactly what you mean by " modulate an input signal to a square wave"?

Do you want to modulate an incoming signal WITH a square wave? If so, modulating the amplitude is easy; frequency, less so

Brendan

synapserelapse's icon

I'm pretty sure I want amplitude modulation.
I guess I should learn more about synthesis before trying stuff like this....

Thanks,
Matt

brendan mccloskey's icon

Not at all - we learn by doing, that's my thought for the day.
I'll send you a patch in a minute

synapserelapse's icon

Thanks a lot Brendan.

Mark Breedlove's icon

Hi. Have you seen MSP Tutorial #8 (Tremolo and Ring Modulation)? It has an example of amplitude modulation. Also, MSP Tutorial #5 (Turning Signals On and Off) has a patcher ("pulsewave") that demonstrates a square wave.

brendan mccloskey's icon

Totally forgot about the Ring Mod tutorials, good call Mark, but here's my version anyway

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan