HISE Logo Forum
    • Categories
    • Register
    • Login

    node_properties.json file for costum c++ modules

    Scheduled Pinned Locked Moved General Questions
    11 Posts 2 Posters 228 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.
    • T
      treynterrio
      last edited by

      Hi there, I'm currently trying to use costum c++ modules in HISE but I don't understand what I should write in the node_properties.json file. Can anyone give me an example? Thanks

      griffinboyG 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @treynterrio
        last edited by

        @treynterrio

        You don't need to write anything in that file, it's automatically maintained. Compiling networks as .dll inside of hise automatically updates this metadata file

        T 1 Reply Last reply Reply Quote 0
        • T
          treynterrio @griffinboy
          last edited by

          @griffinboy ok but why does my exported Module in HardcodedMasterFX only have this one Slider called "MyParameter"?

          griffinboyG 1 Reply Last reply Reply Quote 0
          • griffinboyG
            griffinboy @treynterrio
            last edited by

            @treynterrio

            You will have to share more detail with us about both what you have done, and the result that you are getting

            T 1 Reply Last reply Reply Quote 0
            • T
              treynterrio @griffinboy
              last edited by

              @griffinboy I've copied the .h file into the dspnetworks/thirdparty folder and the .cpp file into the src folder then I've created the node_properties.json file and named it like the .cpp file.

              Then I've opened the .xcodeproj from the dspnetworks/binaries folder in xcode.

              go Product > Scheme > Edit Scheme and changed Release in "Run" to Debug

              and then I've Pressed play.

              I can see the Module now but there is only one slider with the Name "MyParameter" and this doesn't do anything

              griffinboyG 1 Reply Last reply Reply Quote 0
              • griffinboyG
                griffinboy @treynterrio
                last edited by

                @treynterrio

                Have you compiled DSP networks as dll inside of hise? I think it's either under tools or export.
                Sometimes compiling from visual studio is not the same as compiling in hise. I think since the latest update this has been different.

                T 1 Reply Last reply Reply Quote 0
                • T
                  treynterrio @griffinboy
                  last edited by

                  @griffinboy I have already tried both but in the end I only have this "MyParameter" slider in the module which has no function

                  griffinboyG 1 Reply Last reply Reply Quote 0
                  • griffinboyG
                    griffinboy @treynterrio
                    last edited by

                    @treynterrio

                    Can you show the node code for the parameters?
                    Is this your own programmed node? The framework you need to se is very specific. I think I don't really understand the problem you are describing. Is this an issue with a specific node? The MyParameter parameter is from the default c++ external node template and usually means you are basically running an empty node that hasn't been programmed to anything yet... So possibly the compilation is not working?

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      treynterrio @griffinboy
                      last edited by

                      @griffinboy stretchcpp.zip here is one of the files I tried that I've found online and the others where made for me.

                      griffinboyG 2 Replies Last reply Reply Quote 0
                      • griffinboyG
                        griffinboy @treynterrio
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • griffinboyG
                          griffinboy @treynterrio
                          last edited by griffinboy

                          @treynterrio

                          template <int P> void setParameter(double v)
                          	{
                          		if (P == 0)
                          		{
                          			// This will be executed for MyParameter (see below)
                          			jassertfalse;
                          		}
                          		
                          	}
                          	
                          	void createParameters(ParameterDataList& data)
                          	{
                          		{
                          			// Create a parameter like this
                          			parameter::data p("MyParameter", { 0.0, 1.0 });
                          			// The template parameter (<0>) will be forwarded to setParameter<P>()
                          			registerCallback<0>(p);
                          			p.setDefaultValue(0.5);
                          			data.add(std::move(p));
                          		}
                          	}
                          };
                          

                          The .h file is the scriptnode itself. As you can see, it has one parameter called MyParameter

                          I think it's not been set up properly, whoever you got this from has not set up the node to do any processing, as seen by the empty process and process frame

                          template <typename T> void process(T& data)
                          	{
                          		
                          		static constexpr int NumChannels = getFixChannelAmount();
                          		// Cast the dynamic channel data to a fixed channel amount
                          		auto& fixData = data.template as<ProcessData<NumChannels>>();
                          		
                          		// Create a FrameProcessor object
                          		auto fd = fixData.toFrameData();
                          		
                          		while(fd.next())
                          		{
                          			// Forward to frame processing
                          			processFrame(fd.toSpan());
                          		}
                          		
                          	}
                          	
                          	template <typename T> void processFrame(T& data)
                          	{
                          		
                          	}
                          
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          16

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.4k

                          Posts