How do I clear function before resetting it with new values from coll?

Feb 4, 2013 at 3:02pm

How do I clear function before resetting it with new values from coll?

Been trying to get my head around this and just can’t figure it out.

#66346
Feb 4, 2013 at 3:27pm

Hi,

?

– Pasted Max Patch, click to expand. –
#238827
Feb 4, 2013 at 3:29pm

You have tried the “clear” message, yes?

– Pasted Max Patch, click to expand. –
#238828
Feb 4, 2013 at 3:38pm

I was using clear but not zl iter. I think the problem was on the front and not clear actually. Thanks guys, an easy answer to an easy question.

#238829
Feb 4, 2013 at 4:51pm

O.k., I am still missing something. I have not been able to reset the duration. I am using setdomain $1 but function will not reset. hers is the patch if someone can help me clear it up.

– Pasted Max Patch, click to expand. –
#238830
Feb 4, 2013 at 5:11pm

Hi,

“setdomain” keeps the function’s shape whereas the duration is changed. Is it your goal ?

#238831
Feb 4, 2013 at 5:22pm
– Pasted Max Patch, click to expand. –
#238832
Feb 4, 2013 at 6:40pm

I want to be able to apply the envelope generated by function over n# durations. So, yes I want to keep the function’s shape while affecting its duration. I also want to be able to change the function’s shape and duration as well as I send it new xy values from the coll. There should be two colls that contain durations and xy coordinates respectively. Your patch gets closer to what I am looking for but the function only displays a length of 1000 rather than the 2000 or 8000 stored in the first coll.
I want the function show the envelope over the entirety of the function display regardless of duration yet to send out correct duration to line~.

#238833
Feb 4, 2013 at 7:00pm

Hi,

“Your patch gets closer to what I am looking for but the function only displays a length of 1000 rather than the 2000 or 8000 stored in the first coll.”

Sorry if i misunderstood, but that’s not true ; in my last patch the domain of the function is expanded to 2000 and 8000 as you can see by the dump message. Moreover, have you seen that the last number in second [coll]‘s lists is the original domain on which functions are defined ?

#238834
Feb 4, 2013 at 7:19pm

I think its clear I am the one not understanding this. Sorry for the confusion.

I do see where the last number from coll #2 is set at 1000. Perhaps I am missing something in the formatting here.

If I substitute two lines from the coll I am working from (my envelope) the function does not display correctly. I am certain I am missing something here. Here is your patch with my coll data in #2.

– Pasted Max Patch, click to expand. –
#238835
Feb 4, 2013 at 7:34pm

Hi,

Slightly improved my patch : now the list in the #2 [coll] must start with “domain 1000.” for example, then with time/val coordinates so “domain tGlobal t0 val0 t1 val1 t2 val2 …”.

What kind of values are you providing ? It seems wrong and not well sorted.

– Pasted Max Patch, click to expand. –
#238836
Feb 4, 2013 at 8:07pm

I have found where the problem is arising but I cannot solve it. It seems that if I enter this line of text into the coll, function does not display that way I want it. I think what is happening is that I am designing my envelopes (separate patch) using function then pasting that data into coll which is why my data such as this:

0 0. 0.853 484.042999 0. 515.95697;

does not display correctly.

#238837
Feb 4, 2013 at 9:42pm

Or see MSP Tutorial 7.

#238838
Feb 5, 2013 at 8:05am

Hi,

To use the function in the last patch i posted you need to define it like that :

- First start with the word “domain” ;
- Then the total time of the function you will define ;
- Then series of time / value coordinates.

For instance : “domain 515.95697 0. 0. 484.042999 0.853 515.95697 0.;”

It seems that you enter the coordinates in reversed order :

You do that : 0. 0. 0.853 484.042999 0. 515.95697
Instead of that : 0. 0. 484.042999 0.853 515.95697 0.

– Pasted Max Patch, click to expand. –
#238839
Feb 5, 2013 at 4:35pm

Thanks, Christopher. I am familiar with the tutorials, though.

Sorry, I didn’t past the whole coll line in the message. You’re right in what you say. For some reason when I create an envelope in a function object and copy that data from mid-right outlet into coll the formatting doesn’t line up. Sometimes it does. I just gotta figure out what is going on when its right so I replicate it. Thanks for you help.

#238840
Feb 5, 2013 at 5:17pm

Hi,

To dump your function to [coll] properly for my patch :

– Pasted Max Patch, click to expand. –
#238841
Feb 5, 2013 at 6:53pm

Ahh, that makes sense. Thanks much.

#238842

You must be logged in to reply to this topic.