pictosonic's code

[beginner question] how to transmit parameter value to a function inside a SynthDef


In this code, I have a list of frequencies. When I am calling \synthexample, I provide some parameters, the usual ones (amp, etc) and other like bb and threshold. The bb parameter is taken into account and works. And the threshold parameter is passed to a function which goal is to pick a frequency on a list of frequencies that is greater or equal to the threshold value. The problem is that the threshold value is not taken into account. It works only if I pass to the function a litteral value, such as 200. Also passing \threshold.ir(100) raises an exception at Command+Enter time. So how to pass a parameter to a function called inside a SynthDef ? Thank you !