Stupid xpresso question for the day


What I want to do is to take the amplitude data (strength from a sound effector) and have that push an object along a spline.

I have a simple xpresso set up (see picture), and it is working - sorta. I’ve got an align to spline tag, in part driven by a time node (so that my object keeps slowly moving along the spline). What I want to have happen is for every burst of amplitude, the object gets pushed a bit further along my spline.

Of course, the amplitude data from the sound effector naturally varies up/down.

As it is, the up/down of the amplitude data is making the object jump back and forth along the spline, what I need to do is to accumulate the values from the strength of the sound effector so that they keep adding up, rather than jumping up/down.

I am sure I have done this before, but I just can’t get my head around it today for some reason.
Much beer for a helping hand.


Use a userdata filed to store the current position, then add to that.
To make it work you have to set the field to zero at frame 0 (either key it and overwrite with the expression or use the time node to set it) and you have to scale the strength of the sound effector to a degree that the accumulative effect makes it reach the end of the spline at the end of the animation time, this will of course vary depending on the sound you use.


Thanks for that, and sorry for being a bit dense, but I can’t seem to work it out.
I have created a user data field (on a null) and tried various ways of taking the align to spline position data into and out of that field, but I still get my object jumping up/down along with changes in the amplitude of the sound. Here is a screen grab of what my latest attempt looks like:


Try the attached example


Good looking and smart.
All your friends must be so jealous!

Name your price in beers comrade, the next round is on me.



Looking for the same solve but dont see the attachment anymore - is this available anywhere?


Try this

spline-sound.c4d (2.5 MB)