Hi, I have opened an issue ticket in Github, and only later discovered this forum. My ticket is rather a question, so admins, please feel free to just close it on github if you will.
Here I paste what I wrote there:
I have read documentation and tutorials on random methods. I do understand that reproducible behavior is in the philosophy of Sonic pi.
However I am trying to come up with a way to get random number on each run. It does not have to be random per se, I only want it appear random, i.e. different on every run. I would use it as an argument for use_random_seed.
The reason I want this kind of behavior is because I’m using Sonic pi for my guitar practice. I’m trying to build routines that would print out random notes, chords, scales, etc from predefined collections and then play them after some sleep time. The idea is that this playback should be as a reference or confirmation for me that what I played on my guitar was indeed what I was supposed to play.
Now I do understand that I can edit the seed before every run, but that is not the level of automation that I am aiming for.
Here comes my question: is there a method in Sonic pi DSL, or accessible outside of DSL that I could use to make a seed from it’s return? A hash, a time-stamp, or any other value that I could process into a different value on every run?
Any ideas appreciated.