set minimum domain value in function object?

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

Is it somehow possible to set the a value of domain in the function object? I know it i possible with ej.function but I would like to limit the use of externals

Christopher Dobrian's icon

Try looking up 'domain' and 'setdomain' messages in the function object's Help and Reference files (and in MSP Tutorial 7).

Thinksamuel's icon

Sorry, my question was not clear: I meant a minimum value. With the function object and the domain message you can only set a maximum, the minimum is always zero.

Christopher Dobrian's icon

Ah. Got it. (I saw the word minimum in the title, but not in the message.)

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

I think it's pretty much as simple as just subtracting the desired minimum from the input. If, in doing so, you want to keep the domain maximum the same (rather than just offsetting the whole domain by a certain amount) then you'll also have to resize the domain to be (maximum-minimum). Here's an example.

Nicholas Solem's icon

Hey, sorry to resurrect, but I have the same question, almost. The fix mentioned by Christopher Dobrian will not solve the issue when you want to use [function] in a bang-able manner, i.e., when you want to send a message output to a [line~] or [curve~].
Is there any way to affect [function] so it sends out a list with a non-zero x minimum?

Alec Gordon's icon

Thanks Christopher, I know this is from a long time back now, but I've been looking for a patch on how to do this for a long time. I can't believe it's not in the helpfiles