Default settings)
-
Hello. I'm trying to get the default settings. What am I doing wrong? Help.)))
-
@udalilprofile remove the space in the declaration
const var ParametriqEQ1
-
-
@ulrik oh, that's it. I solved the problem. Thank you )
-
@ulrik I don't know how to be here! I need to reset Freq1 Gain1 and Q1. How can I indicate this in code?
-
@udalilprofile do you have a snippet?
-
HiseSnippet 1338.3oc2X0raabCDlqj1hp0sowEAE83BidPFvvVqh+qnnvxVVJvnV1JVNI8VJ8JJKBuK4ZtbcqRQ.xiQys7Fzy8VPeB5CPOzis2xkdtc39iEWYEGagjf5tmDme37wYFNyP0QvcIggbAxn7gCCHHiOxr6PlbPiAXJCsy1HiYM2lzGG4I6RjRJ63PzVCCvggjdHCih2SIlQ4Rn3uWswVXOLykLhDB8PN0krK0mJGQsS8ug540B2ibH0WS5kquiKm0f6wi.HUzrJJ.6dB9XxdXkXELQFePydTIWzUhkjPjQos38F1c.+6YIx+PZH8HOhZgCpKrQIjaw85oPrhJpw.pWuNYG8PDxvryHGQwDGwcLaS6QOm9HGxsiYXORCc+gQg7vqXN34nCupZvaBPxPCRkRfzrlccEz.4HNJ7Li4NLIQzGCtccnjHKpfrjYCNHAStnO9DRKAr3bMprZ0pKXuR0py+UVVfqOTZeFVX2k5G3QNfbFQbji8WaGmSr3wDYy98ItxJykHfcpDyoz1xhx7nLhc+HlqjxY1b1VQRIm4nruf6Uwk6GvY.RV.rhWDYdqezp7RKYYCe4L4hgD4lRofdTjjTIOqC3b+tzmPVn5hJTesz8QD4tvO8lFc2VLb50E6G.2cVvdZvLsmbPllOEbzYQSHbzHygVYtTW8byq1qTGdCrm2QvEnJiGIhiWKAeo2ssCStbaomDzAKfac.nNs48mXRvHArAIdCIA0tzjfb1Ju2HOqVBxoKXWKwab0U69JG3ZqeszQUaK1uGaJKUl5RJy6.KlV.+FCf0t7.XM8.nkklWdOtjrOqRr2z5oV1iype+IxKc+7HhIxVUdVbYJVgE4eDQnGKUBB0rxWHz70WHTuNsahqQSPNaGFUte.g85pdiR8mvudvNaikXU0yTZfbADgjpffw1jyfVQI0RKCs0BOQxCftJmGDftKxXt2JsRahSGQ6oTH8JD5GNue024We34KdV65g3yH6v5HHPDL47PCay8gcFKFlA+qiwpoYrWx0L1K7FyXFEyYJiBnK1+.5bw6E4gk4amoxySY.g1b8PT8IXgT4P8d7u05wcUg3rlcnR2ASFiEl.FgDf2EXLcxfO1Lo.3H.Vxr029NZLfBctvHZP9hVChzfX9Fx4.SVCSc+SZCIcRY8FyIVZOO8veb+HcgfJbjmPfnSlEdwye9urgQwqrKv4xi.GviT8lZigRpv0Ay8h76ByG5Rf..iQ7TUWf7ckpwqqpVq.VWBqW7h+A9RY5nVajxzIiodT9SxJPzHRbFo4ooN37M6x4fA.0h5ASTcNR1BGa4Q9HEAG84bUDpkR3Y+5e+manHb27iRy5s73DVIkve7y+dw38X0TBubl+5mhIr13pr93D9xQDtc8VsNrICCAhj71apAsakDzlAtGvHwCpDG19r301OBJUZeOBiHTEVbtjWv7aW0WvDbkeAy9tRv7GJvrv.dXtMtKwmdHzLHTm3CBIpYFNPUoSmdCNVLQVuZiVvgbh5zEKiDwkL2zmGwj4JQV7xdIkyT9RpR+m6kT2.ZDl6wdkyvXRI8lLn9KLDSLF+zrGimQMetbaNiGLfynt5A5CTUsN9XhPG6S7.AyvBCaNhxcpe.wif0SZ+h56BIaXgV49qquv4Z+v2IFu9byD3Zqt.Zeyc.lh+ud.l2KMBdeXCerqf+X2jW8nxS+vXJv4lE+eSU1rsZssCJ9kP5wRenJ2iccyuUWPwZSqh2cZUb4oUwUlVEWcZUbsoUw0eyJpZBsYjj6mb0DgZ2oY7yHMLzFMB8uvwuw8E
-
@udalilprofile said in Default settings):
Have you checked the Hise Tutorial files, there is an example dealing with the ParametriqEq,?
Here's the tutorial projects
link text -
@udalilprofile Ok I just checked the ParametricEq tutorial project, unfortunately it's a bit old and I can't open it
This is the essential part of the tutorial, how to deal with bandOffset etc.
inline function onBand1EnabledControl(component, value) { // Since the parameter index of the parametric EQ is not fixed, // we need to apply some math to get the correct index. // The idea is to use the formula BAND_INDEX * BANDOFFSET + MODE // to get an integer that controls the value we want local index = ParametriqEQ.Enabled + 0 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band1Enabled").setControlCallback(onBand1EnabledControl); inline function onBand1Enabled1Control(component, value) { local index = ParametriqEQ.Enabled + 1 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band2Enabled").setControlCallback(onBand1Enabled1Control); inline function onBand1Enabled2Control(component, value) { local index = ParametriqEQ.Enabled + 2 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band3Enabled").setControlCallback(onBand1Enabled2Control); inline function onBand1Enabled3Control(component, value) { local index = ParametriqEQ.Enabled + 3 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band4Enabled").setControlCallback(onBand1Enabled3Control); inline function onBand1SelectorControl(component, value) { local index = ParametriqEQ.Type + 0 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value-1); }; //! ======================================================================== Type Content.getComponent("Band1Selector").setControlCallback(onBand1SelectorControl); inline function onBand2SelectorControl(component, value) { local index = ParametriqEQ.Type + 1 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value-1); }; Content.getComponent("Band2Selector").setControlCallback(onBand2SelectorControl); inline function onBand3Selector3Control(component, value) { local index = ParametriqEQ.Type + 2 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value-1); }; Content.getComponent("Band3Selector3").setControlCallback(onBand3Selector3Control); inline function onBand4SelectorControl(component, value) { local index = ParametriqEQ.Type + 3 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value-1); }; Content.getComponent("Band4Selector").setControlCallback(onBand4SelectorControl); //! =================================================================== Frequency inline function onBand1FrequencyControl(component, value) { local index = ParametriqEQ.Freq + 0 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band1Frequency").setControlCallback(onBand1FrequencyControl); inline function onBand2FrequencyControl(component, value) { local index = ParametriqEQ.Freq + 1 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band2Frequency").setControlCallback(onBand2FrequencyControl); inline function onBand3FrequencyControl(component, value) { local index = ParametriqEQ.Freq + 2 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band3Frequency").setControlCallback(onBand3FrequencyControl); inline function onBand4FrequencyControl(component, value) { local index = ParametriqEQ.Freq + 3 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band4Frequency").setControlCallback(onBand4FrequencyControl); //! ======================================================================== Gain inline function onBand1GainControl(component, value) { local index = ParametriqEQ.Gain + 0 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band1Gain").setControlCallback(onBand1GainControl); inline function onBand2GainControl(component, value) { local index = ParametriqEQ.Gain + 1 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band2Gain").setControlCallback(onBand2GainControl); inline function onBand3GainControl(component, value) { local index = ParametriqEQ.Gain + 2 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band3Gain").setControlCallback(onBand3GainControl); inline function onBand4GainControl(component, value) { local index = ParametriqEQ.Gain + 3 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band4Gain").setControlCallback(onBand4GainControl); //! =========================================================================== Q inline function onBand1QControl(component, value) { local index = ParametriqEQ.Q + 0 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band1Q").setControlCallback(onBand1QControl); inline function onBand2QControl(component, value) { local index = ParametriqEQ.Q + 1 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band2Q").setControlCallback(onBand2QControl); inline function onBand3QControl(component, value) { local index = ParametriqEQ.Q + 2 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band3Q").setControlCallback(onBand3QControl); inline function onBand4QControl(component, value) { local index = ParametriqEQ.Q + 3 * ParametriqEQ.BandOffset; ParametriqEQ.setAttribute(index, value); }; Content.getComponent("Band4Q").setControlCallback(onBand4QControl);
-
@ulrik I'll try this code now. But it seems to me that the "default settings" option should be easier to implement. Something tells me that some minor changes are needed in the code that I sent you.) But I don’t know that for sure.
-
@udalilprofile In your snippet you have 2 band, this code will set the first band to value of 20
ParametriqEQ1.Freq + 0 * ParametriqEQ1.BandOffset
where the "0" is the index of the band you're setting
if you want to set the second band to a "default" value, you have to use the code like this:
ParametriqEQ1.Freq + 1 * ParametriqEQ1.BandOffset
where you have the index of 1 for the second band
HiseSnippet 1491.3oc2X0sbSaDEVJNhoVzRgNLc5k6joyTC0Srk4uz1oSLwwlISwDSb.5cz0Rqi2AocEqVEhoCS40fqJuF8Nl9DzGidI2zqaOq9wdUhiIwTXJUWo8rmyd9z4+U8DbWRTDWXXVd2wgDCyO1p+XlbTqQXJyXqMMLuf0ljg3XeYehTRY6EYrw3PbTDwyvzrzsTrYVdYijmWu9FXeLykLkjgw84TWxsoAT4Tp8Z9CTe+NXOxtz.MtuZysb4rVbedL.oRV0MBwtOBuG4NXEaKYYXdl1dTIWzWhkjHCyk2f6Mt+H9SXo7eeZDcfOQsvwnObPoj6v88THVQ0n0HpuWu7O8HCCSqdSMDkRMDWzpK0iNg9TCx4S1.MUBc6g4REgWoBvyQGd00f2LfjoFjVNERWvpuqfFJmtiBOm0ZKljHFhAytNTR40XI9YrZwANXxUCvOhzQ.KlHQkqWudUz0pW+RemsMX5ijn8wBTeZPnOYGx9Dw.Gz2iRhIVcOhr8vgDWYkURY.kwwJJooLeJifFFybkTNCwYaDKkbliR6BteEWdPHmA3nJnC+Xxkr+Y6x0pYifmBJb0Hh7lRofNHVRpTbqc37f9zmRpVeUElOUx9.h71vq9KhraJFu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wxXQRIyaFviYxBkHKMuKQ6rfWhd4+ycI5O.ZDV3d9kywXZI81Ln9KLDSBF+r7+CSN0hwxc4Ld3HNi5p6n2QU0Zu8HBcrOyOHXFVXXyoTtXycH9DrdP6W171PvFVnUt+zZKbN0+yiY5u9BqT3hTIfnObGfoz+qGf48Rif2G5H.6J3OzM8VOp3zOJgB7cyR9sjks5pVibLRtIjtuL.px8PW2hG0QDrwhJ3UVTAu5hJ30VTAu9hJ3MVTAW6MKnpIzMik7fzTSCit8ZmbMRSSsQiL9GfV8x2f
-
@ulrik Thanks for the snippet. But now I have a different question: how can I bind other buttons (gain, q)?
-
@udalilprofile the same way you did with the freq
instead for Freq, use Gain and Q
-
@ulrik yesssss) thanks ))))