I have a nyquist script that changes a sound by feeding it through an equation. I need to treat the sound differently depending on it’s sign.
This is my code:
(s-if (= *track* 0)
*track*
(s-if (< *track* 0)
(s-sqrt
(diff 1
(mul
(diff 1 *track*)
(diff 1 *track*)
)
)
)
(s-sqrt
(diff 1
(mul
(diff *track* 1)
(diff *track* 1)
)
)
)
)
)
[code]
it does not work, since s-if is not a real nyquist function.
How can I modify this script so that it does different things to the sound based off of the sign?