Q:

Interpolation of animation cycle extremes

I'm working on a cyclic animation. I applied the F-Curve modifier Make Cyclic for better seeing what I'm doing. In the image you can see the f-curve for an specific bone. My question is, is there a way of interpolate the beginning and end of a cyclic f-curve?

I mean. Blender interpolates automatically the f-curve between 'START' and 'P', and between 'P' and 'END'. In the image, the interpolation in the interval 'i1' between 'START' and 'P' is made taking into account 'START', 'P' and 'END'. Nevertheless, the interpolation does not take into account the virtual 'P' that lies before 'START'.
I myself have tuned dozens of times the START and END points of every cyclic animation I have done because I haven't find any obvious way to do this. But this tuning is made on the fly, manually, by tweaking the handlers for the extreme keys of the animation. Is there a way to force Blender into interpolate the f-curve between P, START, and END treating 'START' and 'END' like if there were the same keyframe?
I have only found this post about the very same topic 4 years ago, but there were no solution and I don't know if any plugin, addon or functionality has been added since then (2012): http://blenderartists.org/forum/showthread.php?257538-Looping-an-animation-smoothly
Thanks in advance.
Edit:
I know one feasible workaround for this issue, as stated in the link above. I could make two copies of P and place them in the exact position the "Make Cyclic" transform calculates. It then would interpolate correctly. But I don't want this. It is a workaround that, applied to all the curves for all the bones for all my cyclic animations, is a real PITA. As also stated in the link above, I tweak here and there almost every keyframe in my animations, but I want to have the basis of a well done interpolation and not to lose hours tweaking start and end keyframes of every looping animation to make them look finely interpolated. I have read that 3DS has this feature. Is not an automagically feature like they say in the link. I just want the interpolation Blender does in every frame in every animation, but taking into account the cyclic nature of it.
Edit 2:
This is the page that describes the function 3DS that I talked about. Just for reference.
https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/3DSMax/files/GUID-8D3FF404-082E-44D5-99B1-68F960A45D0D-htm.html

A:

Anyway, I have just created the solution (solution or workaround, others may judge). If you have encountered this page by looking for a solution, congratulations.
I created a script that solves this situation by copying the second and next-to-last keyframes before and after the first and last keyframes, forcing the curve to interpolate and removing those keyframes leaving the interpolation untouched.
Here it is:
https://github.com/aravergar/cyclic-animation-interpolation

