Scale Recognition based on 4 midi note input

Dec 4, 2013 at 4:22am

Scale Recognition based on 4 midi note input

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.

Cheers!

<code>

– Pasted Max Patch, click to expand. –

</code>

#274677
Dec 4, 2013 at 6:07am

I recommend a perusal of Robert Rowe’s book:

http://mitpress.mit.edu/books/machine-musicianship

#274686
Dec 4, 2013 at 6:15am

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.

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

<code>

– Pasted Max Patch, click to expand. –

</code>

Brendan

#274687
Dec 4, 2013 at 6:16am

. . .it does.

#274688
Dec 4, 2013 at 8:42am

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

<code>

– Pasted Max Patch, click to expand. –

</code>

#274699
Dec 4, 2013 at 10:01am

<code>

– Pasted Max Patch, click to expand. –

</code>

#274712
Dec 4, 2013 at 10:39am

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.

#274717
Dec 4, 2013 at 10:45am

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.

#274718
Dec 4, 2013 at 12:56pm

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

<code>

– Pasted Max Patch, click to expand. –

</code>

#274732
Dec 5, 2013 at 2:36pm

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

#274892

You must be logged in to reply to this topic.