Stereo - Left - Right Channel Selector with Script FX
-
Hi guys
I am trying to make a Stereo - Left - Right Channel selector with Script FX for processing audio. I think it should be done in processBlock page but I couldn't figure it out. For example; When "Right" is selected, it will select only right channel and route to the left channel too. So we will hear only right channel on
both right and left channel (it will be Right Mono). For "Left" selected it is similar too. Here is the starting point.
Or should it be done in a different way?HiseSnippet 1427.3oc6Y0saZbDEdWiGm.otpoJQs2zpUQ8BrjSEfcrSkUUH1fcQ0XP.0oQpRzIKClQdYlU6NqSnVQJ22GodSdDxiPtq212f1yr6B6vlEBqcrUaTQQxLy4m86bl4bNerooC2j35xczzy1YjMQS+SPsGwDC1a.lxzpUQSOGpdsJ2ucsJU01cjM10kzSSWOyAR45YWVy+ye8ncwVXlIIZKMsi4TSxgzgTQztMK+iTKq8w8HcnCUzdyx0L4r83VbO.KYPEzrwlmhOgbDVp1RHM8Up1iJ3NsEXAwUSe4c48F0d.+4r.8Ol5RelEQtnnVavQAauO2pmDwxc01a.0pWywwrqllNpYTFHSPF3Nn5zdzI6GkI9LeAFQVnlOzWZdvqnJ7Jr3vSWAdKG.uaiZa5PsEQRjX6VnZLAwoOFNBTgUftZ5+AZONn.S7sCwmR12AVLwf7aUnv5FEKTXsc56wLETNyfyNhKHMX4WK244xl6k4hKoe+jDIeHNbKKhSRRkG4Nywr7LugOi3rtwYXKOxX8fHe5TKZ1oV0Sdyf.VQQNqFiJZXSXyJgqElkfTelPPAeS3m3+zvD+tdBAmoQg7aVTvhhZ9HFflt+s4TXZowlFUJkFy2H1S9mpUAKvxaNgQBDc1DGAUl3zqPNCJICtGkEUg3dpfa6GpCs4LYbqmaAB1WDgVR4QSV7pcKKHu.7wMQs6TsU0FZOm1SLHR4NkGPnmLPocvNkcv8n7Cb3d1S180MKaO9LoF7f+hP20sdiiZzcuFGcb0VvFPGBGn4.bINTI3aDd2viytgHWKUwVIkXyvNoXaEzgU2uy0Yj8UnCI8Ecg9PLFw5xEeanDeuwKo36FnV0N3GtVCvuF0R55YFguaOPn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uINquVtmuVtrjA4WPrIcyijyoxutPdcwyy8+P9LwR+Vgmn+cgqJ9jsiQlhOQ+a0KDv4E9e3u8KJ1S19Wbl8uPr6egH6u3u0RARF3rUMWKYUMyhaQ.MV8vSkb34SHHmo9TnfwzDnMykSnmz.wsIhQD25P2QcDPwMvAITIrKsbRrI9qKLAwQGLsu2h+U7DvrnbsV.yhQXVZxZIyRQXVVkY4HL2Pk4FQXdOUl2KByMUYtYDlaoxbqHLuuJy6Gg4Onxb5hThgbd.WtPHJWLVgTix7blL+dF54JoNGo.DcKEvL.83vl7xVgvS8r1LXmV4BlSCcg2XjbWXEOalPG3bNEB8fe2N4dv07M5Li+uo+wy0gOBcF160.3My8VdqGvrGouOlhsk3XJtfWFvqS5KCvJwuLflFbgKz0FQcrXN3hpVNBuRp7ph4tzYE2mzLRICu8DgmhbqVYBwRpYzVHphPO9Uh0J7ebkFjImFUJW9uePMJRzNuCVDM8a5XHBVYtSsntkqoC9QRr1J18MJjKoRVKykApqOreGHWcv+yjL28bvslchO1gHAUUidF1TzGzyG+bQiuAHWS9DpyVF0fQYVCYThg5sy1XwL4SNAOy8lXCnGx4HiSCobyJswlXjiRo02T4.BEirE4I7ELWTL44hEcd8kPe2UWV6q+wwOaKyGQ+rsKiJTQ6wO.Noif0EFKV2kdmv59+3oeOhmdDxvl0yvGtprEypdTDmuTu+4.YgMjq0m9VXk2AFIFS0yvPVCbWwsf30nTp0nbp0XiTqw8RsFalZM1J0Zb+EngDSvCc4rQ900BBsp48iAzz7g.4UhC9OfpnZmH
-
channels[0] + channels[1] makes a mixture audio stream for choosing only Left or Right. So I removed it.
Also for example if we select Left, we should hear the Left signal on the Right side too, so we should hear Left signal on two channels. I modified the code but it still disables other channel. Any thoughts?
HiseSnippet 1456.3oc6Y80aaaCDWJNLs1cYXcnEaurAgh8fyP6fsSZRGBFpahcxLVbrgsa5JFF7XkoiIhLofDUZ8JJP+dsW5Gg91ds.6KvddurcTR1hVQ1UNoonnXFAwg2+3cG4c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tVH1tB+r5BfYBMc84URW84zHj.P3pWSTIGcSHBN0DeJRvDZ2zh6InriqiENTXXzMOzaXa.zuIILMJA3omShBJXcgwXaZSX87W7uvmPlEkq0CYVLFyRiWKYVJFy0UYtdLlanxbiXLuqJy6Fi4lpL2LFysTYtULl2Sk48hw76UYNYwBhVcVPjNWXWmOpjXlLcXZeK3.NqMuvfcWYgyUJPe2RA9jlQRngdYyH.w9VaJzZqbNysQtvaLSuKrhuMSoC7VNIh7feyI8dvUBL5T.NtQvwy0POBeJw+EO3Ok+l9q6ycFZrOgQbjHmJNmW+vqS6qevN0u9gFlBvE53fYt1bWRQUKGiWIUdUHBO1zhGPZJojg2dP3oH2UKOlXI0ZwlXlhPO9UvZE9Otbc53Six49y+59UYXnsdaBDM8Z3ZBAqL2MkA8rbIORhtWwtuQgbIUx5YtLv48g8ac482CbjIct6aAob1w9XapDFWU1oDKnOnuO94Piu9XOKwXpSWFUmy31C3Lpo5syVDX17wGSl5dShAzCDBr4IQTtQ4VDKB1Uoz5aJe.kQvNPdhbNyEESetXdmWeIJvcMj09Feb7fhY9H5AEuLpPg1ie.bRGCyKJQLuKcgv79+3peGhqdH1zg20L.xprEyU8o.muL++cDYQ0kqMl7dek2AFBio5ZZJqAtCbKHYMJsvZr9BqwFKrF2cg0XyEVisVXMt2bzPhI3AdB9vf5ZfPyp9OLftd.DH+Rbs+CGFPi+C
-
oh yes I haven't read properly your question... My eyes were still glued in the morning
-
Ok, now it works perfectly.
Now, if we can assign a Mid-Side Processing to this, all of the spatial process will be done in just a Script FX :)HiseSnippet 1550.3oc6Y0saaaCEVJNJM1cYXcHEaWrMHTrKbVaGrc9qCAqUMwNYFKN1v1KcECEFrxzwDQlTPhJMtEEXOB6EX.6kXWsa5ivtXO.cuA6MXiTR1hRQVQJsInnXBAwl7vygemyg7vOJ2xhnCssIVRx46N1DJI+AJcFioC2YH.gkpWURtfRi5Uuam5UqIs8XSfsMrujrbt83xkyOuj6y+7fsAF.rNLnKIoCIHc39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