-
Notifications
You must be signed in to change notification settings - Fork 5
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
Using dtm data as parameters #15
Comments
Hi Ben, sorry for the delay... I was a bit occupied for the past few days. You are right about the fit / stretch methods not taking the dtm.data object, and I wasn't sure originally how to approach to the multiple-value problem. But now, I think I have some use case of multi value input that might make sense: such as for creating envelope with complex rhythm / duration. Similar to your rep(5) approach, the input array with length N would apply the fit function for each input element, but by slicing the target (or source?) array into equal size chunks first (with fit(N) interpolation if necessary). E.g.,
The third example has a repeated value 2 as it's a shared end/start point. This could be undesirable. Anyway, I'll try implementing this idea and ask for your evaluation this week. Also, your rep(5) solution could be done in this way:
|
Thanks Taka. Your first examples are interesting and I think could lead to some nice compositional possibilities. The second example is too verbose for my current application (live coding), and that gets to the source of the issue -- trying to find ways to fit the awesome capabilities of dtm into short phrases. Perhaps too short. ; ) Don't feel like you need to bend the library design for these concerns. Thanks for your thoughts! |
Hi Taka,
Great lib : ) I have a design question --
Some methods take DTM data as input, while others don't.
Let's use this as an example --
I can use a dtm data object as input to the
amp()
method.But, there are other functions where I cannot use a dtm data object as input.
fit()
is one of those methods. This will not work:I understand that
.fit()
needs exactly one number as inputBut I wonder what you think about the idea of allowing DTM arrays as inputs into more methods? This could become a more common use case if anyone wants to write DTM code that is evaluated more than once
Or, it could even open up new territories, for example, this could have a different 'fit' length for each of the 5 repetitions.
Let me know what you think!
The text was updated successfully, but these errors were encountered: