Examples

Examples ! Many are generated and do not always make sence,
the examples from 'specials' are hand crafted and gives a good view of what the Sequences subsystem of PAD can do.



sequences | specials | random | play/single | play/double | keepRemoveFlag

all   parms   random   randomize   randomize_vs_shuffle   total  


There are 3 ways for randomizing, a sequence (random), an option (randomly) and an action (randomize)

The sequence 'random'

HTML RESULT
{sequence:random rows=25, minimal=10, maximal=50              } {$sequence} {/sequence:random}
31 39 37 33 41 36 16 47 10 44 40 38 42 48 17 34 17 45 16 50 43 49 28 49 48
{sequence:random rows=25, minimal=10, maximal=50, unique      } {$sequence} {/sequence:random}
36 24 11 47 28 38 10 34 19 23 13 20 42 27 29 48 46 45 33 44 43 37 18 22 17
{sequence:random rows=15, minimal=10, maximal=50, increment=5 } {$sequence} {/sequence:random}
50 50 20 35 50 15 25 45 30 40 30 45 40 15 45

The sequence option 'randomly'

Here the loop index is randomly set before the sequence is executed.

HTML RESULT
{sequence loop,    rows=10, randomly, from=10, to=20} {$sequence} {/sequence}
19 16 14 20 10 18 18 14 18 17
{sequence power=2, rows=10, randomly, from=8,  to=16} {$sequence} {/sequence}
4096 8192 2048 16384 2048 8192 16384 8192 8192
{sequence prime,   rows=10, randomly, to=1000       } {$sequence} {/sequence}
103 461 877 349 151 151 2 181 137 379

HTML RESULT
{sequence rows=4, randomly } 
{$sequence}
{/sequence}
2825 3924 3405 3502
{sequence rows=4, randomly, from=10000000000, increment=10000000000} 
{$sequence}
{/sequence}
19880000000000 56710000000000 79450000000000 61700000000000

HTML RESULT
{sequence from=10, to=20, push='mySeq'}
{mySeq randomly}         {$sequence} {/mySeq}
14 19 18 18 11 10 18 19 20 15 18
{mySeq randomly, unique} {$sequence} {/mySeq}
17 11 13 16 19 20 10 14 15 12 18

The sequence action 'randomize'

HTML RESULT
{sequence from=10, to=20, push='mySeq'}
{mySeq}                                     {$sequence} {/mySeq}
10 11 12 13 14 15 16 17 18 19 20
{mySeq randomize                          } {$sequence} {/mySeq}
14 20 15 10 12 11 18 16 19 17 13
{mySeq randomize=5                        } {$sequence} {/mySeq}
18 17 15 11 10
{mySeq randomize=5, duplicates            } {$sequence} {/mySeq}
19 19 12 14 16
{mySeq randomize=5, orderly               } {$sequence} {/mySeq}
11 13 17 19 20
{mySeq randomize=5, orderly, duplicates   } {$sequence} {/mySeq}
10 12 15 16 17
{mySeq randomize=25                       } {$sequence} {/mySeq}
17 20 13 15 11 12 14 10 18 16 19
{mySeq randomize=25, orderly              } {$sequence} {/mySeq}
10 11 12 13 14 15 16 17 18 19 20
{mySeq randomize=25, atLeastOnce          } {$sequence} {/mySeq}
19 10 12 17 10 12 17 14 19 12 13 14 20 19 15 18 19 15 11 20 16 18 17 16 10
{mySeq randomize=25, atLeastOnce, orderly } {$sequence} {/mySeq}
10 11 11 12 13 13 13 14 14 14 15 15 15 16 16 17 17 18 18 18 19 19 19 20 20

The sequence 'random' - other usages of it

HTML RESULT
{sequence random='75%', from=1, to=1000, push='myRandom2'}
{myRandom2 action='count'} {$sequence} {/myRandom2}
739

HTML RESULT
{sequence random=4, from=1, to=1000, push='myRandom'}
{myRandom action='count'} {$sequence} {/myRandom}
241

Yes, it works

HTML RESULT
{sequence random, randomly, randomize, maximal=1000} {$sequence} {/sequence}
894 742 229 578 918 410 523 482 811 837