HISE Logo Forum
    • Categories
    • Register
    • Login

    SNEX nodes parameters

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 227 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk
      last edited by ustk

      @Christoph-Hart

      SNEX node parameters

      • is it possible to change their order afterwards? I tried to modify their indexes, but compiling resets everything in the code editor: (changes only apply when modifying the SNEX code itself)
      snex_osc1.setParameterT(0, 1.);  // core::snex_osc::Speed
      snex_osc1.setParameterT(1, 0.);  // core::snex_osc::Mode
      snex_osc1.setParameterT(2, 20.); // core::snex_osc::Frequency
      snex_osc1.setParameterT(3, 1.);  // core::snex_osc::PitchMultiplier
      snex_osc1.setParameterT(4, 1.);  // core::snex_osc::Level
      
      // TRYING TO JUST GET THIS:
      
      snex_osc1.setParameterT(0, 1.);  // core::snex_osc::Speed
      snex_osc1.setParameterT(1, 0.);  // core::snex_osc::Mode
      snex_osc1.setParameterT(2, 1.);  // core::snex_osc::Level
      

      I don't understand how they've been mixed, and if you open it in Hise the order is not the same...
      EDIT: I just had to modify the order in the XML 🙄

      • Is it possible to remove Frequency and/or PitchMultiplier sliders if we don't need them? If yes, how? If removed from the XML, they are back in as soon as you reopen the project... I think they are inherently attached to the osc_node

      • Is there a way to pass a string value instead of the value itself to a parameter? Like the Mode slider in the filter showing LowPass and consorts instead of 1, 2, 3, 4... Yeah I know, it's just tweaking stuff 🙄

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Is it possible to remove Frequency and/or PitchMultiplier sliders if we don't need them?

        No, they are hardcoded into the snex_osc node and they will determine the frequency of your oscillator so removing them would make the entire node pointless. Just use the generic snex_node if you don't want to create an oscillator.

        Is there a way to pass a string value instead of the value itself to a parameter?

        No, there are no Strings in SNEX. If you don't like magic numbers, use an enum:

        enum FilterType
        {
            LowPass,
            HighPass
        };
        
        void setFilterType(int type, float value)
        {
            if(type == FilterType::LowPass)
                doSomething();
            if(type == FilterType::HighPass)
                doSomethingElse();
        }
        
        ustkU 1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @Christoph Hart
          last edited by

          @Christoph-Hart thanks
          Yeah I already use enum for parameters, it was just about displaying the string aside the knob but it's not important…

          That's what I thought for the hardcoded knobs. The fact is that frequency doesn't mean much because I've made a random oscillator so it's more a speed factor than a freq… but here too, it's not important anyway

          Can't help pressing F5 in the forum...

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          26

          Online

          1.8k

          Users

          12.0k

          Topics

          104.2k

          Posts