Forums > MaxMSP

### Piano Trainer

Apr 26 2010 | 6:48 am

I'm building a max app to help improve my piano skills on reading, i'm using a nslider and a random to generate random values

-How to generate random values inside given values? I want to get random values only inside 60, 62, 64 and 65. This will help me to generate random values inside specific scales.

[attachment=130931,445]

###### Attachments:

Apr 26 2010 | 7:03 am

This random value could be combination of a value being a member of a certain scale, an offset in terms of key and an offset in terms of octaves. A major scale could be defined and stored as [zl lookup 0 2 4 5 7 9 11]. A [random 7] can generate an index producing a stored value. Add to this a fixed valeu (eg 2 to make it D major). Finally add a random value (eg [random 3] for random three octaves) plus an octave offset (eg 3) multiplied with 12 (add: 12 x (3 + random(3)).

The makenote in your patch between the random and nslider is not really required. Also the second inlet of makenote does not need a trigger from the metro.

Apr 26 2010 | 7:06 am

But how to make the random use only the values of that index?

Apr 26 2010 | 7:09 am

On my site is ScaleMaster, a quantitization patch that allows for arbitrary input to be constrained to specific scales. It can be found at http://www.xfade.com/max

Apr 26 2010 | 8:53 am

And also look at:
D:Cycling74examplesmax-tricksnotes-and-pitch
for a quick and simple demonstration of user-constrained pitch collections

Apr 26 2010 | 4:29 pm

> But how to make the random use only the values of that index?

The output of random can go to the zl directly. Like this:

[attachment=130948,447]

###### Attachments:
1. Picture1.png

Apr 26 2010 | 5:07 pm

@Jvkr:
Thanks for helping, i added a metro between the bang and the t b b, so it can trigger notes from specific scales regularly. The next step will be to build other scales and the interface, when i finish, i plan to build some recorder for the sequence generated in max and the sequence i play based on de generated sequence, so it can calculate my precision at the piano. Any tips?

@Chris:
Thanks for the tools.

@Brendan:
Thanks for the tip.

=)

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

Forums > MaxMSP