Tidal icon indicating copy to clipboard operation
Tidal copied to clipboard

WIP: Add random signals with common distributions

Open fbous opened this issue 3 years ago • 5 comments

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:

  1. Should the stuff be implemented in a separate file or in UI.hs? If the file Random.hs should be used, should I move the relevant functions from UI.hs there?
  2. 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?
  1. What other distributions would be useful / desired?

fbous avatar Aug 14 '22 16:08 fbous

Fantastic!

  1. 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 rand is a signal, perhaps it should be in with the other signals like sine, saw etc, currently in Core.hs. A Random.hs is 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..

yaxu avatar Aug 16 '22 05:08 yaxu

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 !

yaxu avatar Aug 27 '22 08:08 yaxu

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?

fbous avatar Aug 27 '22 09:08 fbous

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

yaxu avatar Aug 27 '22 22:08 yaxu

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.

yaxu avatar Sep 25 '22 20:09 yaxu