Does anyone know how to make a "spring" like effect (see attachment).
Don't worry. Its not intended for slider use, i just used them to make an example.
I think that my patch is to messy and eats up to much CPU.
Any thoughts?
Thanks.
Spring effect
Does anyone know how to make a "spring" like effect (see attachment).
Don't worry. Its not intended for slider use, i just used them to make an example.
I think that my patch is to messy and eats up to much CPU.
Any thoughts?
Thanks.
Dear eimer, everbody:
When I saw your patch it reminded me of a function that the Korg NanoControl has, that makes the signal bounce up or down instead of jumping. I said to myself "this can't be too complicated if I apply mechanical vibrations theory". I started working on it using a one-degree-of-freedom mass-spring-damper system and found that the exact solution for the case is at least very complicated since the input is always changing. (Oops! well, always an opportunity to learn something new).
The aim was put on making it as simple and as light as possible. Well, finally I got the patches I attach below. Sadly, the system response is very dependant on the time step chosen, and I haven't yet checked if it consumes more or less CPU than eimer's patch. Hopefully, with a couple of modifications it can be used to smooth a controller signal. Please note that the output is clipped between 0 and 127 to avoid errors when connected to any CC input, nevertheless, the internal computation of the mas position is not clipped.
Finally, I feel very happy to belong to this community, and as my first post, I wanted to contribute with something. I've been learning Pd for not more than eighty hours, so I am quite new on this. Please feel free to comment, correct, feedback, etc.
Thank you very much.
sumidero
http://www.pdpatchrepo.info/hurleur/bounceSumideroAndTestPatch.bz2
Debian Stretch on Lenovo T450i, Lexicon Omega.
Pd-vanilla 0.49.0-3~bpo9+1 (installed from repo)
I forgot to point out that the patch can become numerically very unstable for some combinations of values due to the algorithm used for the calculus of position. I provided a "panic function" for resetting the internal values.
Again, thank you all.
sumidero
Debian Stretch on Lenovo T450i, Lexicon Omega.
Pd-vanilla 0.49.0-3~bpo9+1 (installed from repo)
This is exactly what i was looking for, but the code is alot heavier than i thought it would be. Thank you very much!
I've tried this before. I took the spring concept and watered it down.
I just pre-calculated four bounce points and timed them with [pipe]
it's not as valid as your examples, but it looks alright and might trick the ear.
patch attached
have a look at help browser/pmpd/examples/02_string.pd
For a "patched" version there is physigs
https://github.com/footils/physigs
http://lists.puredata.info/pipermail/pd-list/2010-05/078807.html
eimer, grg, sonsofsol, LarsXI:
Thank you very much. I took eimer's proposition as an excuse to make a patch just to learn more of Pd and throw myself into this community and you've completed a virtuous circle with your contributions. I love this forum, mates!
There goes a big hug to all of you.
sumidero
Debian Stretch on Lenovo T450i, Lexicon Omega.
Pd-vanilla 0.49.0-3~bpo9+1 (installed from repo)
Oops! Looks like something went wrong!