bach.mc2pc weird modulo behaviour

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

bach.mc2pc weird modulo behaviour

Post by pedrnun » Wed Apr 05, 2017 2:53 pm

Hi,
It seems to me that something's not right with the modulo handling of bach.mc2pc...
Best,
Pedro

<pre><code>
----------begin_max5_patcher----------
699.3oc2XssiaBCD8YxWgKR8sTpsAiC8o9eTUshKtIdEXi.y1DsZ+2K1.IY6
pUwahKA0WHwSlw9bNiGOl77JO+L4dVqO3afe.77ddkmmwj1f23XO+pz84kos
F27ykUULgxe8vuoX6UF6pc71ff.fTTd.v+E.TIK5Jk.dK.gm7tjKX4xNgID7
nQQWEWTxTl4GMZjWXlUY1iegFNEdq5PIyX2+TrxN0TvvQq0op7cbw1GZX4pA
xsgFG.WCPTn9CZh9YXX.D7ScHurZk9wZGnAZBmKazq7m7skgHGvPJEEPNxvM
D8SL7JYXEqsMcK6ML7Tp7UbB+VNEmXKmPuOmPP5FMOhwF1jnIHFq4zXLCSi5
PMaH.ee2RWj0zk5D5FEcOoKlBgSFqaXs86wSUbo3LHl.gC0QZrY9J7L7cQUJ
xIpDwro.EqwPH0nUynJECunJsgfuEUh3DUBEMGpjf86dL+FQ5q8..ZcwSnCH
7FngowDa4KW2F5pnbWUFqw1C2iw1RN7EIGJxzEi.sHatF3mkJ15ezk5zlzJl
h07.SjlMfDn6x3eF7ANsD5tDdeOBSy7kSFmj3hL93EVVvY7rz7cAU43579TO
368.BnrcG.wEmwMoQC6.Pgv4tUPX3EaEDkjLhpqoU.I1AxTBN5d1ujPtrHQP
2hHQc3doqTjL9Yd+l+5soLKk19qUtVYWS9zTMceYvokqf0p3BiNclS5pF.5n
S63EELw4uWPAuUWnWbtMYSQ+YWuaou0.jtzAnMJntyy0CPz+dE7tBvHaSwv6
TJlXiBFdK.bFTv6J.IK7Trti2hVAIzkdJNz1iYrFf2Fdf1fG7rgGhUk.IyGd
n+OTR5N.NbUpz55mXMsiKhAa8W27Qowc5ZyPtXXXnYXC6I9j+CVRa5ukmp+J
dcMC2Jb+3e.kekregEc7wps9U9kU+A.zqkx7
-----------end_max5_patcher-----------
</code></pre>

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

Re: bach.mc2pc weird modulo behaviour

Post by danieleghisi » Wed Apr 05, 2017 4:24 pm

Beware: modulo and mc2pc do very different things.

bach.mc2pc always assume the octave being fixed: if you ask for a subdivision in 11 parts, that does NOT mean that each part will be a semitone (as per your [% 11]), but rather that you're dividing the octave in 11 equal parts, each with 109.0909... cents.

Which makes your results correct: 6000 is still middle C, thus pitch class 0, and 5500 is closest to 5455... which is pitch class -5=6 (mod 11).

Hope this makes sense,
d

pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

Re: bach.mc2pc weird modulo behaviour

Post by pedrnun » Wed Apr 05, 2017 4:32 pm

Of course! My bad!

pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

Re: bach.mc2pc weird modulo behaviour

Post by pedrnun » Wed Apr 05, 2017 4:34 pm

Although, in [bach.mc2pc]'s help file it says: The modulo is set in the right inlet, or as argument. Default is 12 (semitones).

Post Reply