Scriptnode Osc Freq to Note?
-
Hey folks
I Have this question, what should i connect to the freq knob so i can select a Note, instead of frequency?Thanks
-
@Natan You'd need to script a conversion from note number to frequency.
-
@Natan or you can use
control.midi
andcontrol.converter
nodes :HiseSnippet 1414.3oc2X0saaaCElx1zsNMqncqCnW5K1Es.cA1cYcCXWTmer6LVcpQbVvtKfUhNlvRjZTTIwaX.CX2rWgd2dM1c8EX.CXuH8MX6PRoHIaWOaulthlBzHd3gje767KSeovkFEIjHmZGMIjhb1DOXBWMZuQDFG0cejyMw8HQJprtUztSBIQQTOjiS4mnE3TqBx7yqd7tDeB2klIBgNVvboOkEvTYR625aX99cHdziXA4zd6VccE78D9hX.OkwMPgD2wjSoGPzpUBibp11ioDxAJhhFgbprqvaxfQhy4V8OlEwdtOUOnIZ.rQVwcD9dZDq+Fs2HluW+z6cDB4f6mwBksrvcv8XdrKkmwF2xLQ8rUjmObJUDdkK.uluN3MGH4jCRUrP513AtRVnJaFMdtAtKGLNCI.smGJVcQNuDum.Tfq1JfLl1QBCtbA26QMZ7f5v+c+uZXL2UwD75B9ABE8Y76c+M9wMpswOsQ8omZ3v4Nm9XjBeepbtSqszxEsv6wiCdNU9f5mQ7ioWpHb8KxoUWNN00dqyonf2kyTOKjlLNyon4br.nDZC95a6tOQQzFkDYfdgTohogiy9zy.ObqIpFdeZzXkHD7wmw9AdNBuXehpn6jNFJYBfOJXC0FJdDSMIeL1z9XUd87Qi4FBL2a6RB2ai6yTtilOdKMG7Br1UMdShX+.b6gCotpLvVA246VX3YkkyUZ4gRsTnXi9LIRMP4tIR3BOZcsXZDKhJatfro+4xlMMboylllS3A3UI9q5ZQZEcqyo+bR1U8pJ+6a0Xi+6gxkWN39uTtnVJFGvBB8os4mQ8g7UFL9gPBpgjXeUpzhdf8DbQ3HAm4l2o6PpRxN8TpLO1m6EZGkBJXmI4NsNj5SIQ47J+jVOkwoDIvSz0jKV8Rmy0dcWrEt00gM0e+HEb42iRA+lm5tNt8EJIo463V3DX9v+uf4ghXEieZOBD1eAzc7AwACfZHtT.hbN0GNHrSIcKR1wMzi0.Z.k6YF72vOIS1TO1IYxloSlq6pCnpyExwlH2jugJB1.znKKZdRTthl636KNeOQPHKIB.3Gir9B+Io4ubJY0HE06DHhgCLA5eMI5HByWq1wTYjYStFtwVv+fvkCLImvcHt.4NoOAphCwc5VJAaDUtkatjHuFLl21o2tz5vVlBfVf95adSS4b8SZSeoGAF5R5SXSb2ni0y5R7QGqqMqAMRumZ0KmfU6aABfZiVvU.6ebNrmoxaKH5jChUMPrH5toAcPKHFrsJvpRAXUZJXUCumOrSc8RwDrDzT5TEaJDknvlX8KbNvzHDBkkh8Hh7TpJJ4I.bpq0qy3m.aOP7vM3LXagk0mHgWqBeom3ZX6NqgMTK9hjGRfOh.gk5XsA9LOprOTFROZmXOlnCyNE7aXWzesOKJzmLY2XH6pMQR5YLyfBdCYfp.e+QWx2YJ7FyWnHgdCS2ZOrij98qBetIVD4BM0pyKVjPuAVuWwTt6jh2b.Hoi.ZuGimffrpf8HWTT1KOo0.EMb.6GJzIxfwzys7Ug9c1OyZN0VC88DqDAPJXuK86SrAEtHyjNQR2J2zqqIXJeKmo8VlRh1Nw8nWjlJtM3r6AkCLKOM8bAlsZNls5RwrnashLaQulrcFsXi51sl4n+0+Z5i92dwK98YO5V+Rve7XaXRlGUws5mG2pngcw7vqd7r7PiUjG1z.l5GpiRl0MCs5FB3vVQCwSfq6U1QCI7VPzU+Q5mJrPmfqnytp4saK5ZqCz1UHFGPL8prd+QgdazYU.wUJNIICuN785FIPRCt4uhZMbO835MQmYusXcaOHco2Sbc0sr+oPWgyeMObMVymsFqY60XMe9ZrlGsFq4KVi07kKbM5RjIIZzkAAA8aayF6zlqaTvTR.8O.Lq7PPB
-
@Matt_SF @d-healey
@Christoph-Hart said in Freq to note (st + cents):Basically its just the inversion of this formula from the JUCE method:
double MidiMessage::getMidiNoteInHertz (const int noteNumber, const double frequencyOfA) noexcept { return frequencyOfA * std::pow (2.0, (noteNumber - 69) / 12.0); }
I‘ll leave that here as excercise in basic math ;)
Based on This, how can achieve a Knob, that changes the notes,
I just need a knob to change the Frequency Based on Notes in Scriptnode,
Maybe Math.expr, or Something? -
@Natan you can use a
cable.expr
node to enter this function. This node has a modulation slot which will change the destination parameter.
Use Math. Pow(). -
I think there's a converter mode for exactly this purpose already so you don't need the
expr
node. -
@Christoph-Hart said in Scriptnode Osc Freq to Note?:
I think there's a converter mode for exactly this purpose already so you don't need the
expr
node.@Matt_SF said in Scriptnode Osc Freq to Note?:
@Natan or you can use
control.midi
andcontrol.converter
nodes :Yes it is