-
Notifications
You must be signed in to change notification settings - Fork 94
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
Rand #51
Comments
https://soul-lang.github.io/SOUL/docs/soul_library.html#mod_soul_random P.S. please don't be someone who encourages the use of rand() or srand(), even in C code! It's an ancient, poorly-designed function and would have disappeared years ago if it wasn't for legacy support in the C library. There are far better alternatives in every language now. |
Thanks. I am getting lost in the documentation. Didn't see it there. Random repeats after a cycle or with the same seed. I wonder if sound of a long cycle of notes is actually easier to deduce than a visual rendering of a cycle of integers. I am not very familiar with C++. I know in js
is more secure. |
Sorry, but I don't really understand your question... Obviously any pseudo-random RNG will repeat eventually, but this one will take billions of iterations to do so. Like the docs very clearly say, this isn't in any way intended to be a secure crypto-level RNG, it's a simple, fast one that's designed for audio purposes. If you need something secure, then you'd need to write that yourself. |
Can I have it please? rand(). If we have rand then we need srand() - srand (time(NULL));
Thank you.
The text was updated successfully, but these errors were encountered: