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

Interpolation between Arrays #8

Open
tmhglnd opened this issue May 20, 2020 · 3 comments
Open

Interpolation between Arrays #8

tmhglnd opened this issue May 20, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@tmhglnd
Copy link
Owner

tmhglnd commented May 20, 2020

Include various forms of interpolation between arrays inspired by methods from the AC Toolkit.

@tmhglnd tmhglnd added the enhancement New feature or request label May 20, 2020
@ToledOmer
Copy link
Contributor

Hi,
Are you talking about the "Interpolating between two note structures" on page 93 ?
I can help you with that :)

@tmhglnd
Copy link
Owner Author

tmhglnd commented Nov 10, 2020

That would be one way indeed, which might be fitting for the Stochastic methods (since it uses randomness). Another more mathematical option I had in mind is actually more straightforward and just linearly interpolating between numbers from an array. So for example:

let arr1 = [0, 1, 2, 3, 4];
let arr2 = [0, 2, 4, 8, 16];

let arr3 = Mod.interpolate(arr1, arr2, 0.5);
console.log(arr3);
//=> [0, 1.5, 3, 5.5, 10]

I already started working on that in the utility.js section. The method is called mix(). Feel free to expand upon that, or start working on the interpolate method as described in the paper on p.93!

@tmhglnd
Copy link
Owner Author

tmhglnd commented Apr 30, 2023

For now a simple array linear interpolation method is added in a6f731a named lerp()/ mix().

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

2 participants