Illegal operation in audio thread
-
I'm making a simple general purpose key switching script which I thought would be useful for beginners. I'm getting an Illegal operation in audio thread warning when the midi muter is toggled from the on note callback. What should I do to prevent this?
HiseSnippet 1752.3oc6Z8tSabDD+NLWRrCjlTkOzuToqVsQFUZvl.IohlhCFHwhXvBSRqTUUzwcqsW4y6Zc2ZBtQn9Vzmi9Fz7HwaP6L6dmu8.CwtpkD05SDzsy+1eyryN6bKod.2kDFxCLLydvfdDCy4rZLfIZWosCkYTcSCy4s5PFD9FpvsMIvXiA8bBCIdFllYdFJhY1YMjOmt9FN9NLWRBICiWwotjWP6REITqWdGpu+1NdjCnc0jdkxUc4rJbede.NYrJZzywsiSKxtNnXyXYXdss7nBdPCgifDZXN6FbuAMZyeCSI+qngzC8I3fRFM.CoHuM22CQL9tQk1Teu5wtcnAXz5IAgLpfvcspQ8nComDLtsjgchF5wCyYtL3URGdEGI7JMB3YngtYUnC.A2quuiHMxvkiHFTNKExpxDDVHULPe45CJbuiUcLiZz3clQfWXg5ea7Fs3Ou0VMaRbEIfcVqs+wq1U5OWAkO0pgHf3zkxZ0voaOeXCHhmrVwi9GX6Xuwd6X8.hO2wqA8WzD6ck2nODtBRS82KKmpm1k2mkZth.99jdDGAr5qoyMJu+9OKf2u2Y05z0k4JGD.kCfHgNi8XDHrKz8wJA7vvlf6HsUnNq58CZgwpDJ6SNhDDll1t86BK8LFwGT1xzDH8xPBtTScq4HBnGqKsbVJdfib49qrVdk6m94n8fe07qwW+1JxwJUJM4pr7jqxClbUVYxUY0IWkGN4p7nIREUhVMmd3FF7riYSuk85i2YGfAp6.oBZat2f1ZnwUTRW4USzg4hRnqMaejbLzDbJ4Lmuv9crZ3FP6IR3fX6lI8KjBVJYMl4jYspvw56h6GRD+.0SztvCKVbg0lOmF8mSnsZKJTRwX9bAjV1Ltf.aNWSMpSn8SrKJYB0oBE1G4DXigkZ8EjfpdHaYqL2uEQT06EzPQg7C4mGM6HzSWoTA+B5l9mJ9yKblYtC6vWveCndrS334sC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NK4GeaiWPzGJntOuufxZEe4KVPalMfVscI52SyLXUa03h3XDPMHLO4f+DdhXVJ9RcPlkhYZ3FaJv2hdW1XhYFBC+3c48R5SfpU5ozZm3M9WeWt3qua4o2e2z6ua582M896tBt+Ny2eW0ykLd4osUOss5osUOss5osUOss5OrsUeUfxtNtA7WG82C.w5MjT.Txj+eOIqUMbrco3iOvnaW3vxW65haC9FH9NZMVdh03ASrFqLwZr5DqwCmXMdzDqwiuDMvNSdZeAuqpnHPn9VpDIysFlHkw3uvDx7Z6
-
The snippet is empty. Can you post the script?
It might be possible that there is another false positive, but I think I have catched them all :)
-
That's weird, my saved preset it empty too. I'll have to rewrite it, won't take me long though.
-
Let's try again
HiseSnippet 1678.3oc6Z8taaaCDWxNZM1qtqcneXeY.ZFaEJXcs1oIscnKqtwIoMv4OFwocCXXnfQhVlHxjFRToIqnuF6oXeXOB8QpuAaGIkrnisyr.ZSG1rfQf38O96Nd73IhzNj4hihXgFlkN7rAXCyqZ04LJuWydHB0X6MLLqXcL9rnWQ3t8vgFqe1.TTD1yvzr3SEhXVZAC4y6d75n.D0EmQxv3ELhKdGReBOiZ6FsHAAag7vGR5qI8JM11kQaxBXw.bJZUyX.x8XjOdOjPrBVFlexldDNKrCGwwQFlKrNy6rN8Xuhpj+EjHxQAXwf5Fc.CoHuEKvSfXAUil8HAdsSc6HCvnsyBBEUAgaZsKwiLjdVv35RF1YZnGOLKbQvqtN7pMyvyPCcKnPG.BlWb.hOJxDKGILHL5HHaaJGSiH7yzWt9nB2aX0VjQMY7VXB3EVn9Pi2jE+JVa1sK1kmA1Er15mubWo+RET9bqN7PLpOg52A0eP.rATfmRVoidOrcbvLucrcHNfg75P9MMwdai0igvU3nT+yFxo5I8YwzQlqDfe.d.FwgUeMcVrwAG7zPV7fyq06drLW4vPnb.DIzYrOECgcttO1LjEE0EbGoshzY0NNzWDqxnb.9DbXznz1KtOrzSo3.PYKSSfzyivhkZh6tHdH4TcokyRsCQxk6uwZ4UtynOmrO7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N7X2iEauilfQtz9h9hy1mkNg1.MaO1ECccqNDQWuaROA9LPfh5y32PkHLjpNH2kQYC5wnD2Q+lqjCUzg9D8G3.E3.mLJ2rwA3.LJZjxS6.mzhBG8SIyUnn9rGJtnkquvRAWaQwZ6+abQLE+e+EwbQgtqkbML1vrGx+W957UsjeDss3hd9XA0CXwbB0O8RTrfdA6.sF6h0uukBhxrpw0ROPpCl5IG7WvSBy5oWNifY8TlFtolB7sj2kcPXVDSEeQt79ECvP0J8T5n3tcEPpfUNtFtxoWC2xyuGt42C276ga98v8goqioz77UyFu77tmm2877tmm2877tmm287G2tmuLPYejaH6kIWSu.qKJo.njJ+WEoj0thw10SO9PDcE2z7KccEaC9NH9NYMVN2ZbubqwJ4ViUysF2O2Z7fbqwCu.MDcl7jXNqupnHPn8lpDIyMGlHUz3uAIR1kJC
The script is in the first sampler. The idea is each sampler that is to be key switched will have a copy of this script and a MIDI muter. I like the idea of using the existing MIDI muter functionality rather than putting the muting in my script.
-
I found another thing that causes the same warning. Adding a polyphonic filter effect to a sampler or synth and assigning a note number modulator to the frequency.
HiseSnippet 869.3oc6X0saSCCE1osFXBXheFSi6xEvUHlV1O7i3h0eV6zzV2xZJCtaxKws0BG6RhSg9Fvq.OF7LvK.R7hr2.vNIqIQDJsSrwXZ4hpb9rOIe9bN963TSOtM12m6Azlo8v9Xf1sfVCYhd05gHLvVa.zlE1D4Kvd5QPUG1G46ic.ZZE2TAnMSIP30wqWEQQLabBD.b.mXi2g3RDInlk2lPoMPN31D2Tyd0xaYyY03TdfjOEgKA5ireGpKdWjZZEf.sqU2gH3dVBj.6CzJUk6LzpG+Crn4e.wmbDEqLL.VxGTDbCN0QwX08fZ8HTGySV29.fFzLIJTLJJLGrIwgLBOIZbmvAzS7Hc7Pqv3nmQZ5sTtzyHG5ARwtRQrSRBtS.EIxxLU5Hd.BOalZKl.y7IhgoSW+So6cglDgcu74agb3qLQcVy23j+sg06zAaKRHaIXi2d9lomMhJ2DZQX3vcjgD4Ag15uAM.quIlg8TA0wrm7aS5dx9S7dx8rEx2daODyuO2OyC1B6RZyYp.RB3q8wM7vuukJImFuFG4k6PGudC4ZLWerPh.uvpkJt7.lHS0QwINkjVaH6llTyOGghRWITDR2hSFcyIBpY9KMbtirj1sOEWmM.S4RjH0gMvcPATwHzzjrImw62iyH1oK.ZgEdjtcwdoodtqmJBgrwRBxbkagoXT5h4GUdGYQHxSFlvmxPgwjGJFW5ZAXDc0UaL0ubnuW7Rj99TbPibp9uGzjSGFUL2fPkmyJjP2OErdL9uWkG.TpkAXlcR77Seu79oKFxVHuP48CPzTw+W84uVoJoOmh7lnbyoutu3DV.MObzh5rpp+Tl5t9I8l2FOb2.2ihyYyC2kK4SHf9nEzelvYyL.fpuQajjhafDHf1igKu5hYuFrm7mNOQc6KqEZCjTIwmBeo.bMikWL6rVYuqrux9Bp8eOAlIuAkRD8+mFpODFqOqqzEu.v6V7.Ag0sIRdrqOJ+JZoTnk7qDrwRNyXXp7EA0JnNoej8RJ6nOSf4DZ7C4U7fFJas3AMNYvyk2gKx1ien7qbDdbpRq+FgHx0MK7+cXFXSkstAX.hFDGkbkhzGZaqN5vSkQm78X4o1iUlZOVcp8Xso1imM0d77o1iWLFOTcDqDH3tQ06R.y5QMG0pyTc8BK8A+DL1dCWH
The frequency modulator is also affecting the gain. In the gif you can see I have no modulators assigned to gain but the little graph still goes up and down when I play a note.
-
@d-healey I wonder if this has any connection to the other filter bug I found...
-
Nope, it might also just be a graphical glitch (the polyphonic filter uses some dummy coefficients when no voice is played which might cause these jumps).