Hi Steffen,
You could possibly just skip any iteration for which the maximum
is too big. But in order to be properly "random", it is not clear
to me how to apply a maximum rest duration, so the program has no
ability to do so. By properly random I mean the probability of
each permutation of rest/stimulus is the same.
I could add that ability if I broke the randomness requirement a
little, where rest exceeding a maximum is redistributed across
rest intervals that are below the maximum. So it would do things
the same as now as a first pass, and then if there is a maximum,
it would shift excess rest around.
Does this seem like what you would want?
We are talking about make_random_timing.py, aren't we? :)
- rick