Hi , is there any algorithm to make elasticity in pure-data? i send pure-data some elasticity effects made in lingo(director) to control sound parameters, like pannings ...and i was asking myself the way of doing it without lingo, just pure-data......
thanks in advance bye
siggmus from fastmail
Hallo, siggmuss hat gesagt: // siggmuss wrote:
Hi , is there any algorithm to make elasticity in pure-data? i send pure-data some elasticity effects made in lingo(director) to control sound parameters, like pannings ...and i was asking myself the way of doing it without lingo, just pure-data......
As far as I know, there is no way or external to directly run lingo code in Pd. I think, you were already recommended thd PMPD collection, which is just fabulous for modeling physical things. Regarding help with converting your already done algorithm, some more details would be nice to know.
You surely can do a lot of programming with the Pd built-in objects, and do math operations with the [expr] objects, but physical modeling tends to use quite complex operations. Maybe you're better off to use another progrmming language instead of Lingo, one that can be used inside Pd. TCL, Python, Ruby with GridFlow and Scheme come to mind. All these are either directly supported in Pd or can be made to work by using some externals.
Oh, and thank you for finding a solution to the html problem. ;)
Frank Barknecht _ ______footils.org__
Look: loop distance = targetPos - currentPos currentPos = currentPos + distance * 0.1 end loop
this is an algorithm to make some friction ...is similar to the "ping pong algorithm"... 0.1 is the damping value(it could be between 0 and 0.99)....if no further force accelerates the particle, slowly the velocity will decrease and finally become 0 (velocity gets replaced by the distance value between the current position and the end position)
well.......instead of applying friction to velocity u can apply to acceleration to get some elasticity effects: depending on how far our particle is from its final anchor point, it will accelerate more . The close it gets, it will accelerate less. But since it has aquired a certain linear momentum, it will actualy not stop at the target, but shoot over it and continue its trajectory. the further it gets away, the more increases the negative acceleration until the particle stops and turns towards the target again... in lingo is something like this:
velocityx= velocityx *dampin+(the clickloc[1]-sprite(1).loch) velocityy= velocityy *dampin+(the clickloc[2]-sprite(1).locv)
sprite(1).loch =sprite(1).loch+velocityx sprite(1).locv =sprite(1).locv+velocityy
i send elasticity (numbers) from lingo to pd via midi or osc and i use them to control some sound parameters like pannings..... well thats all bye