Hi, I have been away from this list for a while. Looking at the archives, I noticed there has been some questions about expr.
I have a new version of expr/expr~/fexpr~ (0.4test3) with many changes. I would appreciate hearing from anybody trying it before passing it to Miller to be integrated in the full release. I hope this release would address some of the raised concerns. I have not compiled this version for NT yet, and I suspect that it will not compile, specially due to the introduction of many new math functions. If you try it, let me know how it goes.
You can see the documentation and download the new version at:
http:/www.crca.ucsd.edu/~yadegari/expr.html
There are major changes to this version:
values defined by the "value" object can now be accessed like C variables. e.g. "expr 5 + xval", will look up the value of variable 'xval' (defined by "value" object) and add 5 to it
multiple expressions, separated by semicolon, resulting in multiple outlets, can be defined in a single expr/expr~/fexpr~ object
the if() function taking 3 arguments implemented: if (condition, IfTrue-expr, IfFalse-expr) for expr~ if the condition is a vector the condition is tested sample by sample
the previous values of the multiple outputs can be accessed by $y#[idx] where <#> is the number of the expression and <idx> is the index. New shorthand notations have been added for fexpr~ to make writing filter expressions easier: $x -> $x1[0] $x# -> $x#[0] e.g., $x2 -> $x2[0] $y -> $y1[-1] $y# -> $y#[-1] e.g., $y2 -> $y2[-1]
new math functions: cbrt - cube root erf - error function erfc - complementary error function expm1 - exponential minus 1, log1p - logarithm of 1 plus isinf - is the value infinite, finite - is the value finite isnan -- is the result a nan (Not a number) copysign - copy sign of a number ldexp - multiply floating-point number by integral power of 2 imodf - get signed integral value from floating-point number modf - get signed fractional value from floating-point number drem - floating-point remainder function
Thanks to Orm Finnendahl for sending in the following functions: fmod - floating-point remainder function ceil - ceiling function: smallest integral value not less than argument floor - largest integral value not greater than argument
Many of these changes were made so that one could use fexpr~ for solving non-linear differential equations. The help file (help-expr.pd) includes an example of generating chaotic signals using fexpr~ and Lorenz equations.
Enjoy, Shahrokh. sdy@ucsd.edu