Tidal
Tidal copied to clipboard
WIP: Add random signals with common distributions
Added a few random signals for #935.
It's a work in progress and I didn't get to properly test the different signals for performance and correct distribution yet.
Questions that I have so far:
- Should the stuff be implemented in a separate file or in
UI.hs? If the fileRandom.hsshould be used, should I move the relevant functions fromUI.hsthere? - Not sure what the best method is to generate independent RV. Methods I see so far:
- Scaling the time-seed by an irrational number
- Shifting the time-seed by a large and/or irrational number
- Applying Xorshift multiple times Right now I'm using the first but maybe the last idea could be better?
- What other distributions would be useful / desired?
Fantastic!
- I've probably vote for the separate file as-is, and move the existing random-related functions there. It's a bit tricky though - as
randis a signal, perhaps it should be in with the other signals likesine,sawetc, currently inCore.hs. ARandom.hsis tidy enough though, and the difference between UI and Core is not at all well defined in any case..
I don't have useful insights for the other questions as I'm no expert on this stuff..
Is this ready to merge? It's kind of a breaking change but the next release will have other big changes so that's fine !
No, it's still a work in progress
I would say that Point 1 of #935 is finished but I haven't addressed Point 2 and 3 yet. Since they are loosely related I guess we could have separate pull requests for each if that is desirable, e.g. if the next release is scheduled soon and we want to include the new random signals there.
However, it seems the checks are still failing for this PR so this definitely has to be fixed before merge. When is the new release scheduled?
The next release isn't scheduled at the moment, there's a bit of discussion about it here https://club.tidalcycles.org/t/releasing-tidal-1-9-0/4241
So no rush
Well 1.9.x is out now. But we can do a new release whenever, and it could be 1.10 as a breaking change.