Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curve performance enhancement #1020

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oxygen-dioxide
Copy link
Contributor

Changes:

  • Add a "samples" method that gets a bunch of Ys for a set of continuously ascending Xs at once, which don't call BinarySearch for each sample point. This method should be used when there are many data points in the curve, and the interval between required sample points are small.
  • Add a "SetRangeCurveCommand" command that enables editing macros to set the curve in a certain time range. Before this change, editing macros have to set each sample point with "SetCurveCommand". It have to execute many commands to set the curve which is very slow.
  • Use delta Y instead of PerpendicularDistance in Curve.Simplify, because X and Y have different units. The unit of X is tick while the unit of Y depends on the definition of the curve expression. They can't be directly compared. Besides, the original implementation of the algorithm is developed for 2d vector graphics instead of sampled signal here.

This will make loading rendered pitch much faster (especially for enunu voicebanks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant