Please help – analyzing chord-symbols

Jul 17, 2011 at 10:24pm

Please help – analyzing chord-symbols

Hello all,

I’m trying to get from a chord symbol (#II _maj 1n, or biv _m7 2n, or ii _min 1n) the correct and playable notenumbers. Since several days I tried to fix the bug in my patch.

In general i think my patch is too comlicated for what it should do. Has anyone a similiar solution or any tips?

Please take a look inside.

Thanks in advance!

– Pasted Max Patch, click to expand. –
#58058
Jul 17, 2011 at 10:38pm

I didn’t look at it in great detail, but you might want to put in some trigger objects, just to make sure that the message ordering is correct. When something works on the second click instead of the first, it’s usually an indication that the order of execution isn’t correct. use triggers everywhere you have more than 1 patch-cord coming out of anything. think about the ordering of things and what needs to happen when. I bet you once that’s done it will work fine…

#208505
Jul 19, 2011 at 6:22am

Some hints, hope that helps:

– Pasted Max Patch, click to expand. –
#208506
Jul 19, 2011 at 5:06pm

Thank you for your help!

Now my patch works fine.

@ MIB
You’re right! After putting in some trigger objects i found the problem:
the buttons under the “sel b #”-object did not sent their bangs in the correct order.
Every day a little bit more to learn … thank you again.

@ jko
Wow, your solution is great! The regexp is a really powerful tool! But a bit hard to understand.
In your patch everything works fine except the”regexp [b#](.*)”
I added a conection and it now works with chords without b or #.
But with only one chord in a coll (green button 4) i don’t understand what’s going on …
I would be glad if you could take a look at it.

– Pasted Max Patch, click to expand. –
#208507
Jul 22, 2011 at 10:02am

yeah, regex is one of those things once you are into (which takes a while) you can not imagine how you could do things without it before.
The one item per line in a coll is not a regexp problem but rather that coll prepends the word symbol in case theres only one entry per line. Try a route here:

– Pasted Max Patch, click to expand. –
#208508

You must be logged in to reply to this topic.