Scale Recognition based on 4 midi note input

aleksgru's icon

Dear people,

I'm trying to build a patch that works as a scale chooser based on list of the scales and 4 midi notes input from my midi keyboard. Somehow I'm getting a stack overflow and I can't solve the problem. It would be great if someone could help me with this. Btw, I'm pretty new with Max, therefore any help much appreciated.

Max Patch
Copy patch and select New From Clipboard in Max.

Cheers!

Steven Miller's icon

I recommend a perusal of Robert Rowe’s book:

brendan mccloskey's icon

Hi
I have a fair idea of what your patch is doing, but you have failed to include your scale collection inside coll, we don't have a text file called "scale" so you need to select "Save Data with Patcher" inside coll's Inspector, and un-name it.

I automatically disabled the global message "; reset bang", this looks very like a recursive trap, but we can't test it til we get your coll filled.

Max Patch
Copy patch and select New From Clipboard in Max.

The patch below is a test to verify that saving coll's contents and then posting online works ok:

Brendan

brendan mccloskey's icon

. . .it does.

aleksgru's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Thanks for respond. Here's the patch with coll scale list included.

Rick's icon
Max Patch
Copy patch and select New From Clipboard in Max.
aleksgru's icon

Rick, thank you for the patch. I like "no match" idea and the bit with "if" object. Definitely I'll implement it. Still I would like to keep "scale transposition" sub-patch with both "counter" object automating lists comparison. My idea is based on distance between voices, not necessarily on the exact chord/numbers match. Therefore I thought to use transposition of the scales. While I'm typing this message I realized that I might need to come up with note distance values and than to transpose values in order to compare them to note distance values in the scales.

aleksgru's icon

Steven, thank you for recommending me the book. I pull it out my shelf (I do have it), checked it a bit and it still feels to advanced for my level. From the perspective of being jazz pianist willing to experiment a bit (which is my case) would be great to have some max patches illustrating Roberts ingenious ideas.

Rick's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Try it this way, transpose your input and then compare it to your stored scale.

aleksgru's icon

Great, this works! Rick, thanks for the patch!