Piano Trainer

GustavoBandeira's icon

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.

445.Speed_Reading_Method.png
png
jvkr's icon

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.

GustavoBandeira's icon

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

Chris Muir's icon

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

brendan mccloskey's icon

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

jvkr's icon

> 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:

447.Picture1.png
png
GustavoBandeira's icon

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

=)