Group Admins

  • Profile picture of Karim
  • Profile picture of Jean

OpenMusic

Public Group active 15 hours, 40 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Interpolation between closest points

Author 2 Subscribed Users |
Profile photo of Francesco Vitale
Francesco Vitale

Hi all,
in relation to the brilliant lisp routine conceived and kindly provided by the forum user Jialin (to be found here http://forumnet.ircam.fr/user-groups/openmusic/forum/topic/rearrange-point-pairs-list-with-closest-pairs-algorithm/), I’m looking for a code that interpolates an arbitrary number of points (i.e. samples, like in the om-sample object) between a point and its closest one, then repeats the operation for the next closest point pairs and so on. In short, it would be a recursive resampling within all the nearest points. Thanks as always for your attention.
Best,
Francesco Vitale

July 8, 2018 at 10:48 #27092
Profile photo of JialinLiu
JialinLiu

Hi Francesco,

I am sorry that I have not seen the forum in last days until this morning, we had the same problem, perhaps you can check the code I have submitted under the other topic.
The function points-toward-xy could be a good start-point to do that. (You could input sth like (0.0 0.1 0.2 0.3 … ) into the third inlet — generated by the function interpolation or the function arithm-ser).

Best,
Jialin

July 13, 2018 at 14:42 #27134
Profile photo of Francesco Vitale
Francesco Vitale

Dear Jialin,
your om-sample-pro (besides the function points-toward-xy) seems to be a surprisingly good starting point for the purpose I expressed in this post, and I can’t thank you enough for having solved this important bpc sampling issue!
All the best,
Francesco

July 13, 2018 at 15:16 #27136
Profile photo of JialinLiu
JialinLiu

Dear Francesco,

you are welcome, have fun with that and I hope you will have a very successful work!

Best,
Jialin

July 13, 2018 at 15:32 #27137
Profile photo of Francesco Vitale
Francesco Vitale

Dear Jialin,
forgive me if I’m bothering you again, but I having some trouble in using your function “points-toward-xy” inside a loop for all the points of a BPC. The error I get is “Error while evaluating the box OMLOOP : No applicable methods for #<standard-generic-function distance-2-points 406004441C> with args (7.59 28.431002)”. Here attached you’ll find the .omp and the screenshot of the error. What am I doing wrong? Thanks for your patience.
Best,
Francesco

July 15, 2018 at 12:57 #27141
Profile photo of JialinLiu
JialinLiu

Dear Francesco,

I think you could use the onlistloop instead of listloop.
Because the method points-toward-xy just accept the point pair, not a number.

Best,
Jialin

July 16, 2018 at 15:01 #27146
Profile photo of Francesco Vitale
Francesco Vitale

Hi Jialin,
great suggestion, it works fine! Many thanks again.
Francesco

July 16, 2018 at 16:45 #27149

You must be logged in to reply to this topic.

Log in now