Lower Sample Volume while Volume goes up
-
@treynterrio Add a simple gain module to your sampler and set the value of its Gain knob from within your knob's control callback. At the same time you set the Drive parameter of your polyshaper.
-
Ah looks like you can do it without scripting if you use modulators and tables. CC mods could do it - with Macros.
-
@d-healey I've already a Gain module but there is no gain. The only gain I see is from the sampler but I don't know how I could control this.
-
@treynterrio I'm referring to the gain knob of the Simple Gain effect
-
@d-healey aaaah ok got it I've not seen this I was looking for it there already
-
@d-healey the gain now goes down -30 dB. how should I best adjust the knob which min and max? and what do I have to add to make the drive go up?
const var SimpleGain1 = Synth.getEffect("SimpleGain1"); const var PolyshapeFX = Synth.getEffect("PolyshapeFX"); inline function onGainShapeControl(component, value) { SimpleGain1.setAttribute(SimpleGain1.Gain, value-30); PolyshapeFX.setAttribute(PolyshapeFX.Drive,value); }; Content.getComponent("GainShape").setControlCallback(onGainShapeControl);
-
What is the range of your knob?
-
@d-healey the gain 0 to -20 and the drive 0 to 30
I forget something that's what I have
SimpleGain1.setAttribute(SimpleGain1.Gain, -20 - value); PolyshapeFX. setAttribute(PolyshapeFX.Drive, 30 - value);
-
@treynterrio said in Lower Sample Volume while Volume goes up:
the gain 0 to -20 and the drive 0 to 30
I thought you just have 1 knob to control both?
-
@d-healey I have only 1 knob but I don't know how to set the minimum value and max value of the knob so that gain goes from 0 to -20 and drive goes from 0 to +30
-
@treynterrio What do you want the knob on your UI to display to the user?
-
@treynterrio said in Lower Sample Volume while Volume goes up:
@d-healey I have only 1 knob but I don't know how to set the minimum value and max value of the knob so that gain goes from 0 to -20 and drive goes from 0 to +30
use this:
ScriptSlider.getValueNormalized()
and this:
ScriptSlider.setValueNormalized(double normalizedValue)
-
@Lindon could you give me an example how I use this?
-
@d-healey when the user turns the knob up the gain should go down from 0 to -20 and the drive goes up from 0 to +30
-
@treynterrio I understand that, but what do you want the knob on your UI to display to the user? Is it 0-100%?
-
@d-healey yes when it's off it's 0 when it's on 100% (drive 30dB and the gain -20dB)
at the moment the gain works from 0dB to -20dB like it should but the drive goes only from +10dB to 30dB and not back to 0dB
-
myGainKnob.setValueNormalized(myDriveKnob.getValueNormalized());
-
@Lindon I don't think that's what he's after. He only has one UI knob and it needs to set the two effects parameters to different values.
-
@d-healey ```
code_textHiseSnippet 1410.3oc2X80aSbDD+N6bPrKEAHdnuToSQ7fiZHxFBPkhZwINInnhIVwo.8Izl6Vauh818zd6khaEem5Gg7goe.3aP6L2e7sm4H0IEPDxCQdlYmc+syL6uc1afR5QihjJK6FGMMjZYeMmgSE5I8lPXBq82wx95N8IQZpxMU01SCIQQTeKa65OAUX2XIqj+d2i2lvIBOZgJKqmKYdzmxBX5BsC59KLNeOhO8HVfwn2n69dRQOIWFC3otSaqPh2qIioOifCqlik8U10mokpgZhlFYYuz1R+oCmH+cQ53eNKhcLmhBcrFBSTp58jbeDw3us5Mgw8GjuuirrrcFTDEpmFEtsSelOal9hnwMRL3V3gY7vtVY3UuD757gfWEPx1.RKkBoa5LzSwB0EVP77MN6KfjyHBD1MgR5Xsp0plSOILBgd8.xqo6o.gYdz5gsaulK7uU2rYSHzGocOgnbGxBB4TL41w8mbSJGVeLUu6nQTOcqULLuB3XgeCj7oQSHgz8dYU9YXF8qISvYBp6nXgmlIEtRANmCwQfPVI4s7jAgRA.90fEfGSWsYy+rYCC.rdDUukVqXGGqosLMf+es6du1t2My0Ma1v.AkczzvNJ1Iz0R74GtOFYdKf07XHrc5kioVqLCuqrJNeYntGgyOFJba89anU2zX29Loldfn0p3Vp4aa5NuoQipzV1TwopJMiGoTmkisDwAGSUyhnYCDpyJW7dkEq30KMxXLPoXeASePHMSt3zWmJJ0sxBsXQeFBggpSJ4udVI+PNymprX9X89rXpUxFvjrw5W2eGhljOUvrBqTHUoY3FxdG5I.YT5ooFN6PidsVFlL1rLJndgV32.bF1W01xZJ9i+FV3.ShvMNMf7FSbEv784zAxHFlJJrbmSCj9YfwicLkaADsgCY+Anywoy5.0v6yC.LPR+XNQWlVBQWlAbML4Bvy6BXsmZxUOOW0Re3zc6JoRqLYtfv8lNCXZuIUi2ZUfWHk9oFuYL+eqSJeUAXWxYuWdlz7ezgx2mBka4LTqnDn1Z7PBxrkR42zISpyGiKiCW3KiGnnbIwOs7LeXm1c6XHdoJq8u5lrTaEHiEkVqLjeHMjRz8SK9yLtb2CO7IJYb37d8tGmTrbjB3TgPgogCDTHtqM2i8TxnnQv1IYthLMMHVMFiUEZNjdBUEUV2yhCfbuPP4Q3oaajVIhh4ZlWeBbiQoi1IqR6iHI4anCkD4NyIeu4ju+bxaLm7ClS9gyI+nB4z.ZeRHVYfcHMGK9UWLVbXBFPfsrwH2lMd1jmpoLEiwPmEySvkQ+XUzYyU9T0r0mUBr++7s0WL39ezaXibLl15ythSfynfFDi2BtUYDIlqy0VlunuTHCmHELuxmHfJ7wioJSrW4FB5dBNPVn41cOjxojHiiz2o6SgN7HpxGzOWwhyeexUlu9NmT35hjbtecbOY8uhtm7b7ZsZFXY4brXz.eBVJqwDT8hUmjRctUzz.rZ2ivKTlz8eQ77m6Nes6A3MFHuXoqhNWw8NKbbegqugy5Hv+xpxd4YeQgYuKKK4X7PsynGlMNcGJmTp59ELe8jBE+V2J5xYeftSog7OQM+Yi5er3cVZgO.iaoKODN3cFPH+xDfSJIt7.3a3.MZ8E.bOTFqAJr7NZcf1dGBs56QMa9sF1PcpbaTFAzPpvOQ3ef+xL1IuSYzXmbiKZH45YOnwE1gJ8W34uq4jzBtK9houlycd4SEr2x9cx2VwtNUfc4m7RcN79ItICaD7XPDRvMoeVPY.wSIekW52MBw5xIZ.TJR9lwMb5ixtcx+XQNNsWuM9AYXuxyC6Y4tPDtZet2Evm6eA7YiKfOO3B3yCu.97nKfO+3Y5C9htsh0xfT1OPwfcSKrr2cVgUcq+Uj4.YE
-
Oh wait I see what Lindon was getting at. Yeah that's a good approach if you don't mind a couple of extra hidden knobs. I'll post a snippet.