Forums > MaxMSP

major scale randomisation

November 25, 2011 | 7:46 pm

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.


November 25, 2011 | 8:04 pm

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. –

November 25, 2011 | 8:12 pm

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


November 25, 2011 | 8:15 pm

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. –

November 25, 2011 | 8:29 pm

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.


November 25, 2011 | 8:46 pm

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


November 25, 2011 | 11:51 pm

@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. –

November 26, 2011 | 12:35 am

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


Viewing 8 posts - 1 through 8 (of 8 total)