## major scale randomisation

Nov 25, 2011 at 7:46pm

# major scale randomisation

anyone know how would i get the random object to generate a value between 1-12 based on the major (TTSTTTS)scale. The notes i need are 1,3,5,6,8,10,12.

any help would be appreciated.

#60258
Nov 25, 2011 at 8:04pm

Since the pattern of T and S in a major scale is not easily obtained by a mathematical formula, it’s best just to store it in a table. Here’s an example using the numbering system 0,2,4,5,7,9,11. Just add 1 to that to get your numbering system. The example also includes a formula to generate a stack of fifths in Lydian mode, which you can convert into an out-of-order C major scale, but the table lookup method is more efficient and straightforward. Add some whole-number multiple of 12 to transpose these pitches to different octaves, and add some number of semitones to transpose to a different key.

– Pasted Max Patch, click to expand. –
#216883
Nov 25, 2011 at 8:12pm

I’m not at a computer with max on but from memory something like [random 7] to [zl lookup 0 2 4 5 7 9 11] should get you started

#216884
Nov 25, 2011 at 8:15pm

fun :)

you want [random] to make random index numbers, which look up the scale degrees you want, rather than try and generate the numbers themselves. Then you can load a [umenu] or other list-based data structure (table, multislider, etc.) with as many scales as you want:

(edit: zl lookup eliminated a half-dozen objects in my original patch…doh :)

– Pasted Max Patch, click to expand. –
#216885
Nov 25, 2011 at 8:29pm

I have a “jump into the deep end of the pool” note / scale quantizer called ScaleMaster, which can be found here: http://www.xfade.com/max/ScaleMaster/

Also Christopher, in your patcher, the table wasn’t set to save data with patcher.

#216886
Nov 25, 2011 at 8:46pm

amazing thanks. i’ll try this when i get home.

#216887
Nov 25, 2011 at 11:51pm

@Chris Muir: Thanks. Felt sure I had done that, but maybe I hadn’t yet saved the patcher. Here’s a revised version:

– Pasted Max Patch, click to expand. –
#216888
Nov 26, 2011 at 12:35am

Or simpler, with [zl scramble]. It automatically scrambles everything from a list, and you code less.

#216889

You must be logged in to reply to this topic.