Easy Questions for a simple mind!
Hey Guys,
I am working on an assignment on Max, and I am encountering a few problems which I believe have easy solutions but I am only a beginner! The first is I want to be able to easily switch a cycle command on and off for a random sine generator. I want this to be determinined by a counter which e.g. for example counts a hundred bangs and switches the random sine generator on then 100 bangs later switches it off. I have written the random sine genertor and the counter, I just don't know how to get them to interact. Any help would be greatly appreciated.
Best,
Tim
Quote: Timbo wrote on Fri, 20 April 2007 07:32
----------------------------------------------------
The first is I want to be able to easily switch a cycle command on and off for a random sine generator. I want this to be determinined by a counter which e.g. for example counts a hundred bangs and switches the random sine generator on then 100 bangs later switches it off.
----------------------------------------------------
Here's one way: use a select object to create a bang when your counter reaches 100. Send that bang to a toggle switch. Send the toggle switch to a message of "$1 100" and send that message to a line~ object. Feed the output of the random cycle~ to one inlet of a *~ object and the output of the line~ to the other inlet of the *~. Send the output of the *~ to the dac~ (via what ever volume attenuation you choose to use).
This will turn the "volume" of the random sine generator on and off every 100 bangs from your counter by ramping the amplitude to 1.0 or 0.0 over 100 milliseconds (you can change the 100 in the message to change the duration of the ramp time). Questions?
>
>I have written the random sine genertor and the
> counter, I just don't know how to get them to interact.
How is your sine generator turned on? With a bang? With numbers 1/0?
So what does the "counter" part of the patch need to output?
What does it output now?
Do you know of objects to translate one into another? (for instance toggle
will change bang bang bang in 1 0 1)
Thank you both for such swift replies. It now works perfectly. I have one more question (open to the forum), about volume leveling. i have a guitar input which mixes with a saw generator. I am trying to enable the saw genertor to become louder when the guitar isn't playing or is quiet and vice versa. Does anyone know of a way which I can create like a 'ducker' which listens to a part and alters volume accordingly?
Many Thanks,
T
enveloppe follower controling inverse volume... ?
> Does anyone know of a way which I can create like a 'ducker' which
> listens to a part and alters volume accordingly