Jump to content
ChristopherC

Procedurally interpolate values from specific samples in CHOP

Recommended Posts

Hi!

 

I have a CHOP channel containing some values and I would like to select only a few values at specific samples to then interpolate between them.

 

I have attached a scene where the node `SAMPLES` needs to be used to select the values from `VALUE` to interpolate from. The node `DESIRED` represents the final result that I am after.

 

post-12907-0-60339600-1437451415_thumb.g

 

 

I'm getting this result by manually creating constant values to interpolate from but it doesn't seem possible to do this procedurallly based on the nodes `VALUE` and `SAMPLES`? Also the process needs to be fast so I would like to avoid using `ic*` expressions if possible.

 

Any idea?

 

 

Thanks!

 

chop_interpolate.hipnc

Share this post


Link to post
Share on other sites

Hello, have you found a solution? I have tried, but did not succeed. Maybe Hold CHOP might help? Value into left input and Samples into the right input?

Edit: Or instead of resample ... Envelope Chop > Local Maximum Window > Interpolate Linear?

Edited by ikoon

Share this post


Link to post
Share on other sites

Hello!

It's been a while but if I remember correctly I ended up doing it outside of CHOP much more efficiently.

As an exercise, I've just had another look at solving the problem in CHOP and found a not so perfect solution that I've attached.

For some reasons, if you look at the 'diff' node you will see some small variations (-0.02 to 0.02 range) from the expected result. I don't know where this is coming from though. Maybe a weird interpolation algorithm used by the `Stretch` CHOP node?

chop_interpolate.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

Wow, you have great knowledge of CHOPs. Thank you for uploading the hip file. I went through it and it seems, that the numerical inaccuracy is going through all the chops, from the beginning. Maybe the trigger Count CHOP has some internal threshold. Thank you very much for introducing me into these chops!

OUT chop:
out.PNG

 

SAMPLES chop:

samples.PNG

 


Trigger (Count chop)

trigger.PNG

 

Trim Sample Indices (Math chop)

trim sample indices.PNG

Edited by ikoon

Share this post


Link to post
Share on other sites

I think that these accuracies are due to the display becoming a bit jittery when you zoom in too much in the view, and don't represent the actual data.

In fact, since the `VoiceSplit` crashes, I did manually create `Constant` nodes to still be able to explain the process, and these nodes have perfectly round values since floating points can exactly represent such small integral values. But if you display one of them and zoom enough in the view, it will also show some inaccuracy.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×