HISE Logo Forum
    • Categories
    • Register
    • Login

    Linking parameters to SNEX

    Scheduled Pinned Locked Moved General Questions
    25 Posts 6 Posters 2.1k 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.
    • Matt_SFM
      Matt_SF @orange
      last edited by Matt_SF

      @dustbro Again, thank you for putting us on the right path :)

      I made some tests and found out some things, so I'll leave that here if others are also having problems wilth compiling the DLL.

      What I did before, and what generated error when compiling my networks : I always enabled "Allow compilation" of the whole network >> this generates errors. You only wrap and compile into the dll, the nodeor the chain containing the graph. ( @DanH 😉)

      I tried to compile more complex networks, but some nodes seem to throw errors during the DLL compilation process. (i.e. the xFader.node).
      Also, avoid renaming chains/nodes/etc... during the wrapping process. I'm not sure but HISE doesn't seem to like it.

      I managed to compile a SNEX & a Math.exprnode and it's working fine. I also managed to compile a chorus & a delay into a DLL, then compiling the whole plugin, for the sake of comparing performances. For a simple graph, there's not much of a difference (on HISE's perfLabel, there's about 1-2% of performance gain, but it's worth testing it with more complex graphs).

      I'll make some more tests during the next days...

      EDIT :
      I'll update a list of the nodes which produce errors when compiling :

      • control.xfader
      • control.converter

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      1 Reply Last reply Reply Quote 3
      • FortuneF
        Fortune @Dan Korneff
        last edited by Fortune

        @dustbro Thank you so much for this awesome tutorial.

        @Christoph-Hart it would be very helpful, if there are some snex examples (one parameter or multiple parameters, different DSP examples...etc.) at least in Hise Tutorial projects. Can you add please?

        Otherwise most of us won't be able to use this beauty. The SNEX documentation is very lacking. Maybe still not ready to use since there are lots of errors and bugs?

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User @Dan Korneff
          last edited by A Former User

          @dustbro Thank you man! One question about multi parameters. You've used this for one parameter (a = Drive knob):

          	template <int P> void setParameter(double v)
          	{
          		if (P == 0)
          		{
          			a = (float)v;
          		}	
          	}
          

          If we use 2 parameters (let's say a and c), would it be like this? Or anything more needed?

          	template <int P> void setParameter(double v)
          	{
          		if (P == 0)
          		{
          			a = (float)v;
          		}	
          
          		else if (P == 1)
          		{
          			c = (float)v;
          		}	
          	}
          
          Dan KorneffD ustkU 2 Replies Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff @A Former User
            last edited by

            @Steve-Mohican You got it! (P==1) (P==2) etc...

            Dan Korneff - Producer / Mixer / Audio Nerd

            1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @A Former User
              last edited by

              @Steve-Mohican @dustbro It's easier to use an enum:

              	enum MyParameters
              	{
              		Gain = 0,
              		whatever1,
              		whatever2
              	}
              	
              	template <int P> void setParameter(double v)
              	{
              		if (P == MyParameters::Gain)
              		{
              			a = (float)v;
              		}
              		else if (P == MyParameters::whatever1)
              		{
              			b = (float)v * 2.0f;
              		}
              		else if (P == MyParameters::whatever2)
              		{
              			c = (float)v / 4.5f;
              		}	
              	}
              

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

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

              9

              Online

              1.7k

              Users

              11.8k

              Topics

              103.0k

              Posts