Assuming you want random integer notenumbers, you could use the following (for the middle C octave):
((!Trigger nextIndexReset: !Reset) of: (60 to: 72) asArray shuffle) nn
where you could replace 60 and 72 with whatever minimum and maximum values you like.
Or if you have a short list and want to keep shuffling the elements like a deck of cards to build up a sequence of shuffled sequences, you could use:
| pseq ranSeq seqLen |
pseq := #(60 62 64 66 68 70 72).
seqLen := 1024.
ranSeq := pseq shuffle.
(seqLen / pseq size) ceiling timesRepeat: [ranSeq := ranSeq, pseq shuffle].
(((1 bpm: !BPM) nextIndexMod: ranSeq size) of: ranSeq) nn
Another expression that is not exactly what you want in this case but may come in handy sometimes is:
!Trigger nextRandomElementOf: #(!First !Second !Third)
When triggered, it randomly selects an element from anArray. No two adjacent items are ever repeats. So you can randomly access values in an array without getting the same element twice in a row.