Linked Knob Question
-
What am I doing that is causing this error? I'm missing something obvious.
HiseSnippet 1168.3oc0W8zaaaCEmxwLXRaqXcqe.D7gBEfr.otjtATTj17uBitj3MmFLfhhBZIpXBSQZHQ0F2h.rC6yv9Br665Nt8sXCXm14cYeC1djRtVJQIy0q6P7ACQ9d+H+8d78GxdoxPZVlLEYYezjwTj0Gf6OQnFt8PBSf5tCx5FXNSLhINYjPNHCs0jwjrLZDxxZoGo0wxtMx76u1bKBmHBoylBgNVxBoeIKgolMauG7XFmuGIhdDKoh1q+ftgRw1RtLG3yRXezXR3HxIzCHZ0ZgQVKuaDSIS6qHJZFnyVxnI8GJeonP+iYYrAbpdP.pOrPESi1dHiG0apslgPVs6MyxWpvxuEdeVD6MyOyC7QFAtyPT0GX0pNkZWiRAWFk1SxizKvkPuVUnW6B5cSb+vT1X0LIZt893tBEMMl.t8pzpPWTqeeI71RPCgZsDxH5dovf2fv6t99q5B+sx8bb.Welx8EjT2ysOAt220DSr1ITUMWjWmBUm4ZB5TeoFIFjAve5yfY0e+T+mACmxHRTzigfJuNRAsyp9qp4gQqfF0R8RoVqMNGc0gmaoD0QrUtRIEdcJE1YU2fM.accC1XYpqWnKSX32JN1gqkQUZzoR91DNe.D24IEZokyBvrcbXBX8ntw4hPESJbqohWnLYLXIB0p.u34zUbdsiMWFR3vVEQOEXnV80LCNLdl9ZNYyhc8JU69t9t291SMLsa+X854shVT.vWXcsKcTZlWHsXOuWEQgCIhSnQdl0297GqZjOToRYCxUTuKHEVjo1Arlm4XS4YT2ZrLXNYo+kyR+Zrz19cDOK17+iqjiyYfiyoxo8ARE8Pgm4f04LG2yKJNtQYkAHbZZih0UASuJfdh7jAzzpgUZEgRC0q8r77U6IrHMohhRQWASc3XZ43YUmBZn5DpLOCpSsTICguTlpT2nrJUeNKhlhXvhfwPPNxP8xZ8e6e9U+1ln4BJjyWCJ5W+ge4xgVj0afZiKCLqCW2lB8jt6PTDf9VkVBXciooJl1IZsC8EPOqhht13cnYiTxwFSsLcEZR9uXrmBeXo2rIS+HSMQePrLVWJCkvhh3zdxLl9ftB294LEcbe1qL78025Geze7puayjpcYQnDxoUslr73X1ol1iwLdRFDdOtaBz0DY8w3m.orQzXRNW4lAMwQZmBM5HoQezbZR5Cg5lzctNXRsmifCiY88SMKOy0SlyVueB9Bc+ZpEr0OguPmLnRSY+N2qOUWvuqptbkUTrlqxBfCrgxBKTds0blDn2xqK40WLDFtCqLJmST0uXq9F7kBzDtZ3q9VhBvPlTkTuE210uwa613o+bR2ah6wTgCalusZfu5KR++LeKe6vGh2MNlFplQ11389lE8gBuET4qk4J3sY6SfvCcz4A4I8gmOERAlHDvUgzApszYXEi8mF31mJhLC9a3Wov.8XqRgASEBAlgoxmGVjWpecx6YlA3jv7vLa795wtASSIwX+070ICrmGFpcEeZ.B0Ll6r.X9rE.y5K.lMV.L2cAv74K.lu3Jwnek1CyUxjhzDXhd6ZJMZYsqf.QYlHRz+.t0JdSB
-
I think it's because you're changing the value of the knob and calling the callback function that your already in. Normally this would be a recursion problem but HISE has built in protection for that in this use case. I think the answer is to call the change function as the last thing you do in the if clause.
HiseSnippet 1052.3oc6VEtaaaCDlx1bXRaqXEaO.B9GEJ.dFRcIcCXnno1IYvnKIFycACnnnflhNlvxjFRTs0sH+aOC6UYuJ6u6MXuAaGojpjhUZ8LR+27OLD4ceG+ti2c7FGKorjDYLxx9oqWwPVeNdxZgZ9v4Dt.M5Hj0cvQbwBt3xEB4zDzf0qHIIrPjkU6eTqikcGj42e+nAjHhfxJ2BgtPxorehujqJ2c7gOgGEcBIj8T9xJZu+ginRwPYjLE3SarOZEgtfbI6LhVsVXj0mbbHWIimnHJVBxpy.Y35IykuRjo+E7D9zHldQ.ZBXnrsOQFEpYrdWzv47nvwE9cBBrx3xnP6rnvWiOkGxe29kQiuzHvsDQ03gUq5zqcM5ETkd9UnWCTpUEJ0IiR2EOgFyWoJkn4ymgGITr3YDHrWkJY5hZ8mswCkfFBU+kjErShgEuCg2C7864B+s2O33.g9Dk6KIwtW6bBbenqImn+kLUsvhW2LUKCGAcqapEhoI.7m8bXW82Oy+4vxBFQBCeBjT40UJXc642SyCiVAMpk5URsVGbM5pSOGnD0QLHUojBut4B61yM3.vW22fclL10i5xEF9smiMseBSoQGKiFRhhlB4cdRgVZ9t.LaGGt.rGycVpfp3RgaMU7nxkq.OQn5A7JJksmyacrijTRDbTgrWCLTqdeyhymUpulS17Ytd4p8PWe26cuBGSG1uPaOu8zhB.9B10952RZW3wJULeZph4sgT3jKnE3J14gYMnLauoH5bh3RVnmdyqbrYQIL2ZjL3CPR6aGV5eyrzuQVdKDetxww4J3VwoxU8YRE6bgm4V04JG2qKZ1rFkkmcDwhaTrtEX76CnmHc4TVb0bJshPeg5Mav2bylp8BoY0HUTTJFI3pyWwD2TGRTdgEzXpcNqfuTl1R2IuszjHdHKFwgtOXLjUiLzs5qCnsBJTj+e.ZVYtApMNOUrA3+xniHJBPeqbOA7tUrXEWG3rNh8R3Qprtr13iXIKTxUFWMu9D30GvYeM7gk9vVW7QhhsZB+ME73v+5M+l1M1JKpiA0s382BK1YKBMFq96EV0y7Z7V9RyWg2nYeSu3X8G3MZbC0V4s2c++5o50SVaUQAD.usxps1xbP8QtkY0alAASIICSiHp5iNomWLW.bkTK6QOShHgqVW0Cu0lmZao3cwi4J57l4XqF3ndTsOBbLeJzu.e7rYLppjfcvm7qebF4D8yxTELk+oD3IR8E+YoKm.ChSYvoKDv6p5bfV5j2r09E4DSXhPyh+A9kKLPu1JWXPgPzRBMV9BZVJudN2O0rCvIgYDea7o50tAEY6XreeezRXnyWPoZ2+af5olwb+c.y2tCX1eGvbvNf4A6.luaGv78uWL548ebpRtLqb.1X7wltNVVGKHPlkIKD8unHVC3J
-
Thank you. That's helpful.
I should have checked the documentation before posting because there is an example of how to do this.
It seems like in this instance having .changed() where it was was causing the problem, as you pointed out. It seems to work fine without the .changed() for the linked knob fine.
HiseSnippet 1073.3oc6VE0aaaCDlx1bnRaqXEsOOH3GJT.7bkZS5FP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