gate -> ramp, adsr?

flies's icon

hey all. I'm trying to make a little abstraction that takes a (signal) gate
in and puts out a ramp (0-1) of length specified in ms.

The solution i'm working with atm uses rampsmooth, but this is problematic
because if the gate is shorter than the desired grain length then the ramp
is too short.

the other thing i need it to do is that if it gets a second gate before the
first one is complete I want it to ignore the second gate and just complete
the ramp.

Is adsr~ the best solution?

here's the patch i've got now:

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

roger.carruthers's icon

If it’d just a gate~ with variable ramp time that you’re after, why not use matrix~ ?
Cheers
Roger

flies's icon

sorry, i meant gate as in cv/gate. In this case I want to use a comparator
to trigger sample playback for granulation. noise~ => sah~ => >~ => (rampy
thingy) => wave~

On Sun, Oct 19, 2008 at 9:04 AM, roger.carruthers <
roger.carruthers@btinternet.com> wrote:

>
> If it’d just a gate~ with variable ramp time that you’re after,
> why not use matrix~ ?
> Cheers
> Roger
>
>
>

flies's icon

blast, adsr~ doesn't work cuz it decays when the gate goes away.

On Sun, Oct 19, 2008 at 10:51 AM, George Locke <
george.locke.maxmsp@gmail.com> wrote:

> sorry, i meant gate as in cv/gate. In this case I want to use a comparator
> to trigger sample playback for granulation. noise~ => sah~ => >~ => (rampy
> thingy) => wave~
>
>
> On Sun, Oct 19, 2008 at 9:04 AM, roger.carruthers <
> roger.carruthers@btinternet.com> wrote:
>
>>
>> If it’d just a gate~ with variable ramp time that you’re
>> after, why not use matrix~ ?
>> Cheers
>> Roger
>>
>>
>>
>
>

flies's icon

So I found a solution that solved part of the problem: comparator ->
change~ -> ==~ -1 -> rampsmooth~ X 0 -> +~ 1

This will make a fixed length ramp from 0 to 1.

What I haven't solved is preventing the ramp from retriggering.

The first thing I thought of was to put a ==~0 on the ramp and use this to
control a gate~ between the comparator and the change~ object, but max
doesn't allow this kind of feedback without tapin/out. If it comes down to
it, using tapin would not be such a big deal since retriggers less than a
signal vector apart won't be necessary, but i'm wondering if there is a more
elegant solution?

On Sun, Oct 19, 2008 at 11:28 AM, George Locke <
george.locke.maxmsp@gmail.com> wrote:

> blast, adsr~ doesn't work cuz it decays when the gate goes away.
>
>
> On Sun, Oct 19, 2008 at 10:51 AM, George Locke <
> george.locke.maxmsp@gmail.com> wrote:
>
>> sorry, i meant gate as in cv/gate. In this case I want to use a
>> comparator to trigger sample playback for granulation. noise~ => sah~ => >~
>> => (rampy thingy) => wave~
>>
>>
>> On Sun, Oct 19, 2008 at 9:04 AM, roger.carruthers <
>> roger.carruthers@btinternet.com> wrote:
>>
>>>
>>> If it’d just a gate~ with variable ramp time that you’re
>>> after, why not use matrix~ ?
>>> Cheers
>>> Roger
>>>
>>>
>>>
>>
>>
>

flies's icon

running up against this issue again. the problem with the rampsmooth method is that you can't control the length of the ramp via signals. I want to change the ramp length at each trigger for granular synthesis.

again, what i'm after is a way to create a ramp from 0 to 1 triggered by a signal pulse, as from change~. I may just have to write my own external. ug.

Exit Only's icon

zigzag~

flies's icon

thanks!!

it looks like if I want to control the ramp time in milliseconds i'll have to to do some signal division (to convert period to frequency), but this should do the trick perfectly.

thanks again!