negative noteindex (f.eg. highest note)

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
Nikola Kołodziejczyk
Posts: 18
Joined: Mon Mar 07, 2016 6:35 pm

negative noteindex (f.eg. highest note)

Post by Nikola Kołodziejczyk » Sun May 08, 2016 4:36 pm

Is it possible to select the highest note in the chord without knowing the noteindex of the note?
Right now I can select the lowest note (noteindex 1) but I don’t know how to select the highest, because the chord can have different number of notes.

Thank You again,
Nikola Kołodziejczyk

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: negative noteindex (f.eg. highest note)

Post by danieleghisi » Sun May 08, 2016 4:43 pm

You can, by using the sel note message more directly.
Here's an example (also look up #sel+note)

<pre><code>
----------begin_max5_patcher----------
1200.3oc6a0siaqBD95jmBKeUqTZEL9+yc84npJhXS1PKArL3sImp9terw1I
NIjtop6Agp1rZsimYf4Cl+vw3erbQ3F4ApJL3eB9bvhE+X4hEFR8DVLd8hv8
jCkbhxHV3dpRQdhFtZfmldPanqn7.gTSCvAe.l3Ja0bpVerlNnhvvfuLxRoO
xMTCmDVztmI5D2nGXjXMQWtiIdZcCsTOzIovGQqBxQ8Gyx5OBcTN0wrJSuJ2
70ODMqqGfhouw8D+4xk8GV8fC6MjxcerQx4Sc4yRVIUP1OM6E9tvUAgu+7.7
1w9p6++Fh3oyMsl0MnoULcSG4olKZ6T9IQLpWUSJY8MrW.y7ANa1LwESnoiD
qnaIsbcuoRwkZk0dmKk0VYrUJzaIkFLgdISDFarNIPp4J.MCa8cjh8ulNB2K
8MFOb3LQ6mnMb9TCivmYVGlGL8hUac9z7EsQwjhNlanM8LxJPnY9vkRtrY1D
44C3YnVoIa2xYhIidxbqsAehgOSH766jb55d+l0UDMYM5zmwo2AWpQumdCBS
rUNQ.OwvL76NS1WyY51JZ.U7LkKqoCNcSxY715NusUTp6FtWx8azicmPWPav
Cq6KqOL9Wum95sbIQmFeh3P6POnbXTNBgSyKRuPWpI.+n5ZFLo0MTEUnI2Nr
NpDj5SW89KYVI2SXhW+AXFjVDAw4VT1evv76rJ8NigjtuV1P3WNX1QYOsSab
DZ0xaGsv09K8NTA1cF7FWEqyju4p7+rqRjUWElPyYJscOEqL+KMmxXUxvG2H
mWjGmghsaidv9nHIKNAx+sLjw1i46Uw8Mk2g8eoQ8+lFSjysgI2KX7tAhuED
5UAgo2OH7WD.9VvmOD7kcssiergUpra2L2t6KZ1bAryuF1aYb5uHiuUtuBfO
GA3njqh4dIvWbS7R88hTtkiKCTRwHb2Mt5h.k+vEzgQVyAgQ1mVERA0ObjwX
6.G68.29sagAuG31W7ONx6At8E6hi8dfaeEd3DuG31WYCN06Adlcfm48.O2N
vy8dfWXG3E9NvA6UNAuuxIXuxI38UNA6UNAuuxIXuxI38UNA6UNAuuxIXuxI
38UNA6UNAuuxIXuxI38UNA6UNAuuxIXuxI38UNirW4LxqqbdVpR498DQk51G
2pTSmedVS1Iapt3Kyu49gedkoy2cXZ4404HEF4ZEF6ZEl3ZEl5ZEl4ZEl6ZE
V3ZEN62NyUZz44ZvNOYC14YavNOcC144avNOgC14YbvNOkC144b.mmyAb+5a
bdNGv44b.mmyAbdNGv44b.mmyAbdNGv44bhbZNmybepQ1Ve0STeOo4azlqIx
pXk6HBAkqFugryLe2CcSg37r9j.XTNDC37nnGtkCON6jjj7r73GuA3zB.mZ9
9MOu2GUmoQcZ0w5LqSotVm4EXWqyTTF5Uvdd44Sa66q2e2kxVw3dfGG7kYum
AlVDNaqiO8ZGX1878zu7kOPIaaJm15+iuKCAm2H5UcQfLwvtH3rL3KjYGqph
JluS8qXJxFN0rG6Q2.NRc83tj2.kdfzEk90gsEe1JykLwvklWOit7.Oyljef
BoobGSSK0sMC6W+CowgCMUVQaDsrwW.iNM+yk+Gv0XdVS
-----------end_max5_patcher-----------
</code></pre>

Nikola Kołodziejczyk
Posts: 18
Joined: Mon Mar 07, 2016 6:35 pm

Re: negative noteindex (f.eg. highest note)

Post by Nikola Kołodziejczyk » Wed May 11, 2016 10:31 pm

I have a problem opening the patcher. It seems to crash Max on my system. I will report more when I will have more data

Nikola Kołodziejczyk
Posts: 18
Joined: Mon Mar 07, 2016 6:35 pm

Re: negative noteindex (f.eg. highest note)

Post by Nikola Kołodziejczyk » Wed May 11, 2016 10:42 pm

Without checking the patcher, as I am unable to open it - I am under the impression that with sel note message I cannot select all highest notes in a passage. I need to determine the chord number, so I would need to query all chords sequentially. It would be great if I am mistaken.

Nikola Kołodziejczyk

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: negative noteindex (f.eg. highest note)

Post by danieleghisi » Thu May 12, 2016 10:50 am

You can use lambda loops to do what you want. Look up #lambda+message.
Select the portion of score, send dumpselection or sendcommand, collect all pitches and retrieve the highest one.
Yoi can use #fullplayoutsyntax to retrieve the note path - say, to select it later on.
If this is unclear, I can make you a simple patch, unfortunately not now, and probably not today...

Nikola Kołodziejczyk
Posts: 18
Joined: Mon Mar 07, 2016 6:35 pm

Re: negative noteindex (f.eg. highest note)

Post by Nikola Kołodziejczyk » Thu May 12, 2016 11:01 am

I understand the procedure, thank You, no need to make the patch, thanks!

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: negative noteindex (f.eg. highest note)

Post by danieleghisi » Thu May 12, 2016 5:10 pm

Hi, I'd like to know more about the crashes, since this copy-paste seems to cause troubles to some people.
Can you send us a crash log? Also: Which Os? Which Max and bach version?
Thanks a lot in advance.
Daniele

Post Reply