can someone please explain to the begginer,the use and function of "expr"??
how do I (for example),use this one in equations??!?!
make the explanation as basic as possible
thanks
Expr
can someone please explain to the begginer,the use and function of "expr"??
how do I (for example),use this one in equations??!?!
make the explanation as basic as possible
thanks
As basic as possible : right click -> help
|] [] |.| ][|-| -- http://soundcloud.com/domxh
$f1 indicates the variable you are sending it (same as x in algebra). Multiple variables can be used $f1 $f2 $f3, etc. it's infix, i think (someone correct me on this!), so parenthese are your friend:
[expr -1*(45+($f1*$f1)/2)]
[expr $f1+9000]
[expr $f1+$f2]
any technology distinguishable from magic
is insufficiently advanced.
Is there a way to user symbols with expr?
Everytime I write an if/then expression, PD says syntax error... which kinda sucks, because it would make my like a lot easier if I could easily detect file extensions etc etc
write a bash script and use it with [shell]. [expr] only evaluates arithmatic expressions, not logical ones. or maybe that python extension for pd- What's that called?
any technology distinguishable from magic
is insufficiently advanced.
Sunji,
I'm starting to work with bash scripts, but I can't figure out exactly how to use them with [shell]
I can have [shell] open the script by sending the script name to it, but I cant pass any other variables to it after that.
Is there somewhere I can read about using bash scripts with [shell]?
you have to pack pack things in a list and then arrange them with a message box:
[pack f f f f f]
|
[./scriptyouwrote.sh $1 $2 $3 $4 $5(
|
[shell]
or use a system of [set $1( and [add2 $1( co construct the message to shell. You can also communicate via txt files using [qlist] or [textfile], or communicate over sockets with persistant demons using [netsend] and [netreceive].
any technology distinguishable from magic
is insufficiently advanced.
Cool thanks
How do I know what order the script variables are in?
Also, how do I set up scripts to send and receive messages over netsend? Can I set up scripts to communicate over OSC?
@quantum said:
Cool thanks
How do I know what order the script variables are in?
you define these yourself in the sh script with $1, $2 just like in a pd patch. check this guy out for an example:
http://www.dafe.lukifer.net/stuffoffdesktop/GEMMoviemakerScript.sh
this script also uses nc, which you will want to learn...
@quantum said:
Also, how do I set up scripts to send and receive messages over netsend?
"man nc" netcat is the coolest.
@quantum said:
Can I set up scripts to communicate over OSC?
probably. I know nothing about OSC (and am shamed for it)
any technology distinguishable from magic
is insufficiently advanced.
Hi all I am a first time poster and got a questions about [expr]
Here is an object [expr~ $v1 >0.5]
Does it output the original signal when the signal goes over 0.5?
Or does it return a boolean value? (outputs 1 when $v1 > 0.5 is true and 0 when $v1 < 0.5?)
which one is the case? Thanks!
neo
you could test and see... it's the boolean one
I highly recommend getting objects to "see" signals for debugging purposes, for instance jmmmp/snaps~
Oops! Looks like something went wrong!