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.
    • Dan KorneffD
      Dan Korneff @orange
      last edited by

      @orange it could be a bunch of things. Did you wrap the SNEX node in a DSP network? Also, remove any unused parameters from the main container.
      I'll try to make a full video on how to implement this dsp tonight.

      Dan Korneff - Producer / Mixer / Audio Nerd

      orangeO FortuneF 2 Replies Last reply Reply Quote 5
      • orangeO
        orange @ustk
        last edited by

        @ustk said in Linking parameters to SNEX:

        Guys who don't release sample based plugins are still the poor children of Hise šŸ™„

        Yes unfortunately. But fx stuff is much stronger than it seems šŸ‘

        develop Branch / XCode 13.1
        macOS Monterey / M1 Max

        1 Reply Last reply Reply Quote 1
        • orangeO
          orange @Dan Korneff
          last edited by orange

          @dustbro said in Linking parameters to SNEX:

          Did you wrap the SNEX node in a DSP network?

          What I do is Create a new DSP Network File ? Is this wrapping? This is another short video about how I start.

          I'll try to make a full video on how to implement this dsp tonight.

          A video would be great and would bring some light to this dark area :)

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

          Matt_SFM 1 Reply Last reply Reply Quote 2
          • Matt_SFM
            Matt_SF @orange
            last edited by

            @dustbro always getting some errors here but a video about a full working process would be awesome :folded_hands:

            @orange in the meantime you'll find some info here : https://forum.hise.audio/topic/4364/snex_node-needs-to-be-wrapped-into-a-compileable-dsp-network
            As Christoph explains, you select the SNEX node and click on the small 'cube' icon to wrap it in a DSP network :

            alt text

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

            orangeO 1 Reply Last reply Reply Quote 1
            • orangeO
              orange @Matt_SF
              last edited by orange

              @Matt_SF

              	float Drive = 0.1f;
              	float getSample(float input)
              	{
              		return Math.tanh(Drive*input)/Math.tanh(Drive);
              	}
              	
              	
              	template <int P> void setParameter(double v)
              		{
              			Drive = (float)v;
              		}
              

              For the above code, I get bunch of errors below:

              āŒ  non-type template argument is not a constant expression
              
                      using FixBlockType = snex::Types::ProcessData<NumChannels>;
                                           ^
              
              āŒ  type 'int' cannot be used prior to '::' because it has no members
              
                              if constexpr (T::hasCompileTimeSize())
                              ^
              
              āŒ  static_cast from 'snex::Types::InternalData *' to 'int *' is not allowed
              
                              return *static_cast<T*>(this);
                              ^
              
              āŒ  type 'typename node<instance<1>>::MetadataClass' (aka 'int') is not a structure or union
              
              

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

              Matt_SFM ustkU 2 Replies Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @orange
                last edited by

                @orange I would love to help you with that but I'm not that advanced šŸ˜–
                Maybe try to write your saturation formula in a Math.exprnode, wrap it and see if HISE manages to compile it into a DLL, or if it throws some errors again.
                Won't help you much - depending on what you want to do - but it might be useful for debugging purposes...

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

                1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @orange
                  last edited by ustk

                  @orange Since you don't seem to place your node inside a frame2_block, you don't need the processFrame function so remove it and test if it works...

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

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

                    @dustbro said in Linking parameters to SNEX:

                    I'll try to make a full video on how to implement this dsp tonight.

                    Hey @dustbro, have you got a chance to do it? Following, please :)

                    Dan KorneffD 1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff @Fortune
                      last edited by

                      @Fortune Not yet. I got a little jammed up with the "day job" :beaming_face_with_smiling_eyes:

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      1 Reply Last reply Reply Quote 1
                      • Dan KorneffD
                        Dan Korneff
                        last edited by

                        Finally had a second to make a quick video. I apologize for the poor quality and zero planning... but you get the idea

                        Dan Korneff - Producer / Mixer / Audio Nerd

                        Matt_SFM orangeO FortuneF ? 4 Replies Last reply Reply Quote 7
                        • Matt_SFM
                          Matt_SF @Dan Korneff
                          last edited by Matt_SF

                          @dustbro Awesome, man ! Thank you very much for taking the time to do it. šŸ™
                          I'm usually facing errors while compiling wrapped nodes, but I'll review my process and report back if I find what I was doing wrong.

                          Edit : wrapping and compiling dll is working fine here. (Tested with SNEX and Math.expr nodes).
                          So clearly I was doing something wrong... I just have to find it out.

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

                          1 Reply Last reply Reply Quote 0
                          • orangeO
                            orange @Dan Korneff
                            last edited by

                            @dustbro That's very helpful, Thank you!

                            develop Branch / XCode 13.1
                            macOS Monterey / M1 Max

                            1 Reply Last reply Reply Quote 0
                            • Dan KorneffD
                              Dan Korneff
                              last edited by

                              FYI I tried the same code in SNEX shaper and got compiling errors. I think something is wrong with that node.
                              I was previously able to compile shaper nodes so I'll take a closer look at what's going on.

                              Dan Korneff - Producer / Mixer / Audio Nerd

                              orangeO 1 Reply Last reply Reply Quote 0
                              • orangeO
                                orange @Dan Korneff
                                last edited by orange

                                @dustbro said in Linking parameters to SNEX:

                                FYI I tried the same code in SNEX shaper and got compiling errors. I think something is wrong with that node.
                                I was previously able to compile shaper nodes so I'll take a closer look at what's going on.

                                Yes, that's what I've got the above errors I posted were in the snex shaper node. That node has definitely got some issues. But will try in normal snex node too.

                                develop Branch / XCode 13.1
                                macOS Monterey / M1 Max

                                Matt_SFM 1 Reply Last reply Reply Quote 1
                                • 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

                                          65

                                          Online

                                          1.7k

                                          Users

                                          11.8k

                                          Topics

                                          103.0k

                                          Posts