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

Should add center time-tag inside every input time-tag in the input list. #163

Closed
andy840119 opened this issue Apr 29, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@andy840119
Copy link
Member

andy840119 commented Apr 29, 2022

Inspired from #157
Should make something like the image below:
image
If not add the end time-tag before the next time-tag, will let the lyric effect moving faster because moving position will include that spacing.
This issue might be noticed if the character spacing become larger.

How to implement:

  • Make internal static function to calculate the value that need to be insert between every input time-tag.
  • Write a test case to check calculating result.
@andy840119 andy840119 added the enhancement New feature or request label Apr 29, 2022
@andy840119
Copy link
Member Author

https://stackoverflow.com/questions/26753272/linq-adding-an-item-to-every-second-position

Not really sure will have better linq function for the case to insert value between every element.
This is the most similar cases i found.

string[] list = { "BCA", "MCA", "MBA", "MA", "CA", "BBA" };
        
List<string> result = list.Aggregate(new List<string>(0), (a, x) => { 
	// a.Clear();
	a.Add("=="); 
	a.Add(x); 
	return a; 
});

Console.WriteLine(result.Count());
foreach(var aaa in result)
{
	Console.WriteLine(aaa);
}

Result:

12
==
BCA
==
MCA
==
MBA
==
MA
==
CA
==
BBA

@andy840119
Copy link
Member Author

http://boson4.phys.tku.edu.tw/numerical_methods/nm_units/interpolation_n_extrapolation_intro_n_polynomial.htm
Hmm...
Seems like it's named Interpolation (差值)
Maybe it should be called something like GetInterpolatedTimeTags and GetInterpolatedTimeTagsBetweenTwoTimeTag(TimeTag first, TimeTag second).

@andy840119
Copy link
Member Author

This pull-request include the case with reverse time-tag.
So guess this issue should be able to close.

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

No branches or pull requests

1 participant