Cliff Posted March 10, 2022 Share Posted March 10, 2022 I understand from initial testing, that currently rnd-sample works what statisticians call sampling with replacement. Is this correct (please forgive me if I missed something in the doc) ? I guess the current behavior covers most musical cases, as long as you want to get a sample which holds some mix of elements in SEQUENCE. There might be cases where you want a slightly different behaviour especially if N is close to length of SEQUENCE. If I am correct, I suggest to implement a parameter :replace (by default t (true) for backward compatibility) to define a behavior where the elements from SEQUENCE are not replaced. For :replace set to nil: If N exceeds length of SEQUENCE then an error is raised. If N equals the length of SEQUENCE then simply all elements are returned. Regards Cliff Quote Link to comment Share on other sites More sharing options...
opmo Posted March 11, 2022 Share Posted March 11, 2022 In composition (OM) error is not an option. Many functions in OM taking care (if possible) of given values which do not satisfy the constrain. Quote Link to comment Share on other sites More sharing options...
Cliff Posted March 11, 2022 Author Share Posted March 11, 2022 Ok, got it. Clear strategy. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.