the pressed MIDI noteNumber is wrong in Scriptnode
-
Here's a simply scriptnode synthesizer with a faust oscillator, which I'm trying to pass the midi note to
The noteNumbers given by the midi scriptnode are wrong though. The lower E key is skipped, it outputs 39 (same as Eb) and then F outputs 40, which should be 41.
Funny enough this also happens, if I try to get the midikey in faust directly, so I reckon it's not passed to the scriptnode correctly in the first place. Native scriptnode oscillators do produce the correct frequency note, though. What am I doing wrong here? Or is this a bug indeed?
HiseSnippet 1959.3oc4Z0zaabiFlisobjSxlzcCPauI31CNKLTrrbbZZPgm3u1ZzXGuQoFKPQgW5YnrH7LjSmgx1JE8T6gdqm6sds+D1aFXOs.cAJP9Cz8eP5uf1WRNizLRijkTqUK55.XK9xWx4gue9vQgdtjxcotGFwYAATIBYM89gBGZTjHDYM2yaEPQV2.WqEW1XiFDFGsylHqag+PdjjbjG8.AyghVuU.IJh5hrrl9uoTxp3LH8OuZs0IdDNnSaQHjdQOg4yjcjtu8Gv771l3ReNyOk1qXuiifugvSzD.zz3kPADmSHGS2inTaJL58IQMPV+ULoZU25qt567PWmUtekGVm7.Wmip9v6ScWdkpzGRccePU2ipWGYUXKWlTDVSRjzHXSWW31pVCwYbyC3.VDCNZpAUP0fmrQLZiFLO21VmHvVgSYql1XqtCdWlKqs7N1raqmnTmUj1nYM0ffTkQ.RVofzLFH8Z3ZNgr.YmYT3453c3RZXcRW9OitHqKvaH.E3xx9jSnaGBCZufEVcokVrD7q69n5M4NRlfWRv2SHoOkuvcm6Smq3be1bk5dp50ycN0iIT34QCycZU3P3fV3B7l9GQCWrzoDulz1JBG+r1zBCmM0wbpSonfuCmIeZ.Md71BOWksR84d8.nXyF7oObmMIRhxoDKCzKfFJYJ3XsI8THMv3hJh2jFchTD.IB83+fHGgaSOhLa3jJQKdBvdjwGpbT7HlrU5Dwtiwlo+1ikRYOtjS6PB2WCuOS5zHe7NUN3ErZW03MNi8l3spWm5H6.1Yva+OFX54u5PoXBTLYe5xsZn7lwR3BWZIsXZDKhFVY.0b+9gslavP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2dkSJtbyhygQwvfTL9fMd5DjIggyVFXdC.lgzxlY5EgIqYjv3Tcgwh3M7f8cm10quYGR2v4GMrbMxFVarFcBxu1PEjewg1iVPtgTaWa75cUnZFb0UQOtoT3CID5WFa2bhtr37JiWzy1SrnGC8rLf7lwTLiJqlJO.pjORb16hF21l8uyGGLws3K2lIDovfCQVwt29Yuzdn5bX+49+235ycnolcqr+p76nAxyFsLfh01Uq9x05BjW7ce2aMbfD8V+32qA4z3+9uZL3V9hdadrr8n0tsf900Nw6mkCj9m+kMeYrerluPHav3GmAW1+uW7E4YpzxGCbca6QsOa5qr+6hV+EwawU0ucGmXpdJG1+AqKDm3Szudpw6KBbR7xz7INghCie2MpZNWSKAx4355fEw6pFWpB5zt8Dp2mygNNY2pdV3xi6BqNtKbkwcg2ebW3pi6Bev3tv24xWn565JtPs5kU.YN6ukoUiUR7OzsCQi6BY9B9TwpskvomCctLcSgtkp+yVn9iAIutgc08RwFpraTPx2dNx5aw26dtTGORHsjHP+tNJM+GoP46J3e77OZNlefHTtv7QRW8VU1icz728QyAbVJ8dkZD4wbogKLOLb9Eqt5hKsXkkevhU.ET6QcnqEn0QD86aDzY4FuXA3OvzhHGXFAzYmblTUSbgjE.SFXda0ZEbVT8qGgP+bq14RO
-
@Morphoice well no, the output seems fine, it just seems to be a sort of rounding error in the parameter of the faust node.
if you create a modchain, have an add node with a 0-127 range and a specs node, you'll see that the HISE MIDI node output is correct.
so the solution is to make sure you're outputting the correct note number by multiplying the output by 127.
HiseSnippet 2123.3oc4Z8zaajaEmikobjRxlrsA8O2D7tGbJLTrj0JmzfBK+2tFM1wMJqQAJV3ROCkEgmgb5LT1VonmZOza87dqW6GgdpFnmJvVfEHeA19MH8SP6iCmQZlQijkTWIjEqLfk3i7Q9iu++FI50RJ2hZcpOm45RkHjQti8DlTeegGxn3q65RQF2C2rKW1dm1DFGcvtHiGf+LtujblM8DAyjh1tqKw2mZgLLx8yUKxnvhnfWuaysI1DNrldjPn.ldAygI6S83F+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+tuMTO1zQHjsY7ySfqF+627GyRTEPeJv0CaLosYD+Yc9dQmOEv6wUEEXMM1TiN1XhAaKDW3PBdt9S2Ojg4w2BgCwzSbZX+CpXN2IfB3ywChCV.enZboJnKSqITOH7SMMStUCvX0okw0mVFqMsL9ISKi0mVF2XZY7o2Nipub+v.0p9y.Omi2SmpwHx9Gx1gngYgz+HFT1p8nvoWCYtzYSgrkperXp2zH4GpKY+IwJwtrkuazu3GjweE+jmXQMsIdzRB2fG0aok+0JT9SE7Oe4mWj43J7jqrruzJXqJayNa4G+7hPgvk9YkZ6ayrndqrLLb4UWu9pqsZkparZEXAp8nEj0BV0YjfunFXMUa+lUf2foE9lvLBHyN4JoJl3JQL.S5p+Z9BVf4pp+8bD5+ALCtZUL
-
@aaronventure thank you, that works, although I didn't yet understand what exactly it does and why.
how is multiplying a value from 0-127 by 127 giving me a value of 0-127? ;-)))
isn't that 0-16.129 then?? I don't really get how the pma node works, I need to have a deeper look at that. -
-
@Morphoice because the midi number node output is 0-1, as it's essentially giving you noteNumber/127. So you multiply by 127 to get it back.
I have no idea why the faust node parameter rounds it erroneously between C2 and E2.
PMA takes the value, multiplies it with the multiplier and then adds whatever you plug into add. The base PMA node aims to output 0-1, while the unscaled outputs anything.