GUI for the Parametric EQ



  • @dustbro said in Stereo Effect Project. Example?:

    @duno I was wondering the same thing, so I decided to do a little test.
    By using the Console.print() command, I was able to see that ParametriqEQ.BandOffset is an Integer that is equal to 5. By doing the same with ParametriqEQ.Gain, I saw that was equal to 0.
    These are Index numbers that dictate which control you are scripting.
    Looking at the Module browser, I can see that each EQ has 6 Index points for each EQ node:
    0_1543578002280_Screen Shot 2018-11-30 at 6.38.19 AM.png
    The first 5 appear to be controls, and the BandOffset is just an index used to multiply.
    At EQ Node 0, the index is:
    0 - Gain
    1 - Freq
    2 - Q
    3 - Enabled
    4 - Type
    So what happens when you have another EQ node in the effect? The index list starts over at 5.
    5 - Gain
    6- Freq
    7 - Q
    8 - Enabled
    9 - Type
    And then the next node would start at 10.
    So what does it all mean?? lets do some math.

    {
        local index = 1 * ParametriqEQ.BandOffset + ParametriqEQ.Gain;
    	ParametriqEQ.setAttribute(index, value);
    };
    
    

    In the script above we're creating a local variable called index. This is used to gather an integer that is directly related to a specific index on the EQ.
    If we convert them to numbers, the equation looks like this:
    1 * BandOffset + Gain
    or
    1 * 5 + 0 = 5
    5 is now passed to the line of code below:

    ParametriqEQ.setAttribute(index, value);
    

    Which is the same as if we typed:

    ParametriqEQ.setAttribute(5, value);
    

    Looking at the chart above, we can see that Index 5 is the Gain of 2nd EQ node.



  • @dustbro nice one man! That should help me lots!



  • The formula is pretty simple: You take the band index that you want (starting with zero!), multiply it with ParametriqEQ.BandOffset and then just add the parameter enum you want to control.

    So:

    Frequency of the 14th band: 13 * Eq.BandOffset + Eq.Frequency

    Q of the 12049th band: 12048 * Eq.BandOffset + Eq.Q...



  • @Christoph-Hart Thanks Christoph



  • Ok I built a 4 band eq into my project. It doesnt work after saving and reopening. I decided to isolate the issue. It crashes my hise on import. Does it crash yours?

    HiseSnippet 2000.3oc6Z0rcSaDEdTHhRLDHPomxRcXUfFBV1geZoTLIwFkCIAaLkS2AJRiimhrFizX.CGNvxtta5gth2.51tiscWOm9Bvi.uAzYzO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lDKnA1rJ7WKG1UuwlNayP90lGiqPTYguBQhR2SJ2DQL5lMemJC9R2sxdMeCtPVyJ6+G3GQ1oka7S6t29px6zsu5Lg6+ZkANOARSOJ39vs4fd9auvkUIOKdwNMwx7wNlAU9M8vLTgeVFlgpwuUc1lKEYXNOOtTRPuLeQ1LCWIIFWMoguMInpoopJe4sdVRQV0TrUMEcUSwW0KyWdomkqjB4TTVkiyGolzgJ55.pJ90ADbW7.1dI2Pm33Uc.cjrMcqdFPZtmsMzxa.cJVYA9OWN7zDZC8FfkkX6SLnQU1yRAMpF139x6nmtgC9AAG4MKU9HdVn5116NTNCMwk9rh5nyDQt7hkY0AgdfgA6CrKP+3L69TYB5S0InOKMA84RSPet7DzmqLA84pE1G1UK8lCH3d9S9RMzrt+gJHEtxCclEv+BFZPsJ


  • @Tod-Slaughter Same here Win 10 X64 | hise 2.1.0



  • @Natanr thanks 🙂 Nice to know it's not just me



  • @Tod-Slaughter I'll check today



  • I found some issues in your snippet, like the name of the MasterEq that is, in fact, MasterEq1
    Some callbacks have a wrong name (same name used twice or more)
    Bad band offset...

    But despite these corrections, it still crashes...



  • Ok so the cause of the crash was the name of the main container which was the same as the EQ

    I simplified your code, you don't need the local index since you can directly put the band offset calculation in the setAttribute.
    Also, an if(value) statement is mandatory if you want your EQ to reflect the buttons at compile time (otherwise the last callback will always be taken into account, no matter the state of the buttons)

    HiseSnippet 2094.3ocyZ0sbSaDEdURVJwfgPKcJW0QMyzYBz.XGGBokgFQRrQYHFrwTldGHKsNdKxRNxx.FlLPuquAc3NdCn216xscF5Lcl9BjGAdCn6per1U+YYGnDcmN6d91uyYOZ2ydzVyxTE0qmoEPX16MnKBHbRXiAF1s2nsB1.r0l.gOCVSwp7tf0GzUoWOjFPPX5aRaTX1Y.NOuas0UzULTQAh.f6ahUQai6fsCjVS5VXc8JJZn6g6vz6kk1R0zXCScy9DhLMr.nqh5iT1AcaEZ2lBBDNVYMrsoUCaEaTOfvLqapMnQaymX31+6i6gapinuT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pfR7WeMCskC2iqvVDGpfUXq8EUvUCqxpgA86CDLmKw7oJ3ue64bkTjMAaGIQHawHrs3xQP9JrU4wQxJrI35H4prU9vQRDJWjiyBSyO8Oc1l9iI56tl8ompsphskS9IjYxFjCcphHAeFFHcmIzonIl39dA+Brz.4LACEnmX0qwhz2E7Zrnei+uLFcTTsLefWwuowxG2QBwtMbtrhyRhbIuKVbXYhfEtTAZlX3GnpR+B6hjuNiWmkl.cJMA5r7DnyUl.cVYBz4pSfNqlpNz6s4M5aa1wc0WhfZkcKugf+VOjUV.+Wwdv9e
    


  • I didn't think the name would have made a difference but that does open here. Many many thanks! ☺



  • @Tod-Slaughter Hise stopped crashing the very moment I changed the master container's name...
    Glad it works 😉



  • @Tod-Slaughter I just noticed there's still a mistake in the Low and LowMid Q



  • @ustk It's not working in my project. I'm just checking if you changed the knob ranges too



  • No the knob ranges are the same



  • @ustk Just spotted that too



  • @Tod-Slaughter if it's not working, have a look at the IDs (eq, master container...) in your project too, and be sure they correspond to the script definitions



  • Fixed the q



  • @Tod-Slaughter again it was an error in the callback definition:

    HiseSnippet 2115.3ocyZ0saaajEdnsmr0pQMNsYQyMK.gKV.mtto5Gme1Fj0LxVJzH1IRUoA8tFJxQVSCEoLEURTJLR1612fhbWdCZus24aW.u.Kv9B3GghE68cmg+HNCIGJJ4jFq63Yly27cNyYl4LGMMcr0QCGZ6.jV9giGf.RmG1drkaus5ogs.6rMP5O.ap4T+.PswCzFNDY.jjV7tzFkVdIf2uecyZZlZV5nHQ.virw5ncw8wtQRapbOroYCMCzCw8Y58FJ6naaskso8HBQVDVBLPS+IZ6ituFsaK.ARmqtA101osqlKZHPZoZ1Fia2y9YV98+Q3g3NlH5GkAsI.4KtgsoAkwTofs5gMMZFZvCADTZFY9K5a9WBtG1.OQdjaXEuFjizf0eHsPVzqLK8Jke5IwPuk7o2Egs0cvCbiZgxsODtikKxoqFYJfkV98Erv8tHbKaROrbuZesmfZ3P9XhFqc8RkVW9ZkJckaUrPwBe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PlIaStzoNhD7YYgL8lPWflXh+2kBKvRaj2DLThdi0fFKS+VJnwxgM96xXzWS2w96BJ9MMV9C7jPraKu2q3xjHWx2xkmTlHXoqVhlIF96z0oqv9Bxpyz0oxbnS04PmMlCct1bny0mCctwbnyMyTG5S27Nibs66u6KQPy59k2PJ7nGxNKf+OvXab+7
    


  • It doesn't matter what i do this is what happens when I load:

    My knobs drop off the set ranges and crash the eq

    alt text

    alt text


Log in to reply
 

10
Online

491
Users

1.7k
Topics

13.0k
Posts