function inconsistencies ?

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Working with the book by Giri and Cipriani, I was experimenting with beats between sine waves (activity p. 251 for those who have it) and came up with this. First, they suggest to use [line~] and [function] to generate the glissandi but it seems to me that should be [line] instead of [line~]. Am I right ?
Then I get inconsistencies with the [function] object. It seems it doesn't respond properly to the 'setdomain' message and the generated pitch envelopes don't seem to reach their final value at the same time. This happens with max 6.05

ak's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hello, I don't have this book, but I'm sure the autors are right. [function] works well only with [line~], not [line]. These two objects understand a list message differently.

HTH

terenceformer's icon

Although it is possible to use [line], you usually would want to use [line~] because you'll get a much smoother ramp since it's signal based. Another benefit: when you scale the output using [*~] you don't need to bang the output after setting the right operand (as demonstrated in Andrzej's version of your patch). When you're doing MSP stuff, just use [line~], you'll be in a happier place :)

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

Regarding the timing issue:
Your functions' points were just shy of the max end of the domain, which is why they weren't quite reaching the end of the domain range.
I modded the patch so you can see the timing of the functions. The functions DO all take the same amount of time (when the first and last points are at the same values in the domain for each function) BUT, as I've just discovered, that time IS inconsistent! I would love if someone would shed some light on this!