HISE Logo Forum
    • Categories
    • Register
    • Login

    Is there a way to give a custom c++ node parameter modulation support without wrapping in a network??

    Scheduled Pinned Locked Moved C++ Development
    10 Posts 5 Posters 72 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.
    • OrvillainO
      Orvillain
      last edited by

      I've written a bunch of c++ effects, and I notice that they appear as options in the HardcodedMasterFX and HardcodedPolyFX modules, even without wraping them in a scriptnode network.

      I was wondering if the parameters can be linked to the wider HISE modulation system, without wrapping them in a scriptnode network?

      I have these preprocessor definitions specified in my project:

      HISE_NUM_SCRIPTNODE_FX_MODS=32
      HISE_NUM_POLYPHONIC_SCRIPTNODE_FX_MODS=32
      NUM_HARDCODED_FX_MODS=32
      NUM_HARDCODED_POLY_FX_MODS=32
      

      But I'm not really sure what I would need to do in my c++ for the effects, to make this happen... if it is even possible?

      Musician - Instrument Designer - Sonic Architect - Creative Product Owner
      Crafting sound at every level. From strings to signal paths, samples to systems.

      Oli UllmannO ustkU 2 Replies Last reply Reply Quote 0
      • Oli UllmannO
        Oli Ullmann @Orvillain
        last edited by

        @Orvillain

        Oh, I didn't know that this high number works.

        NUM_HARDCODED_FX_MODS=32
        NUM_HARDCODED_POLY_FX_MODS=32
        

        Have you already compiled your project with these preprocessor definitions and does it work?

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

          @Orvillain I think you'll only be able to modulate the parameters (aka UI parameter modulation) without the whole MatrixModulation benefits. Also it might not be polyphonic

          Hise made me an F5 dude, browser just suffers...

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • OrvillainO
            Orvillain @Oli Ullmann
            last edited by

            @Oli-Ullmann said in Is there a way to give a custom c++ node parameter modulation support without wrapping in a network??:

            @Orvillain

            Oh, I didn't know that this high number works.

            NUM_HARDCODED_FX_MODS=32
            NUM_HARDCODED_POLY_FX_MODS=32
            

            Have you already compiled your project with these preprocessor definitions and does it work?

            Yep it does work!

            Musician - Instrument Designer - Sonic Architect - Creative Product Owner
            Crafting sound at every level. From strings to signal paths, samples to systems.

            Oli UllmannO 1 Reply Last reply Reply Quote 1
            • Oli UllmannO
              Oli Ullmann @Orvillain
              last edited by

              @Orvillain
              Cool, thank you! :-)

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

                yes, it's a new method that you need to overwrite in your C++ node where you can specify the modulation layout just like you do with scriptnode root parameters. It works similar to the createParameters() callback where you need to populate a list of data objects which will then be used by HISE to setup the modulation scheme:

                void createExternalModulationInfo(OpaqueNode::ModulationProperties& info)
                {
                	// Create a list of modulation slots
                	modulation::ParameterProperties::ConnectionList list;
                
                	// Create a modulation connection info object
                	modulation::ConnectionInfo slot1;
                
                	// modulate parameter with P==1
                	slot1.connectedParameterIndex = 1; 
                	// yellow
                	slot1.modColour = HiseModulationColours::ColourId::Gain; 
                	// only scale (like gain modulation)
                	slot1.modulationMode = modulation::ParameterMode::ScaleOnly; 
                
                	list.push_back(slot1);
                
                	modulation::ConnectionInfo slot2;
                
                	// modulate parameter with P==5
                	slot1.connectedParameterIndex = 5; 
                	// purple
                	slot1.modColour = HiseModulationColours::ColourId::Pitch; 
                	// bipolar / unipolar add mode
                	slot1.modulationMode = modulation::ParameterMode::AddOnly;
                
                	list.push_back(slot1);
                
                	// pass the list to the modulation property object to initialise
                	// the first two modulation slots
                	info.fromConnectionList(list);
                }
                
                griffinboyG ustkU 2 Replies Last reply Reply Quote 6
                • griffinboyG
                  griffinboy @Christoph Hart
                  last edited by

                  @Christoph-Hart

                  Is this the recommended method to use for modulating a c++ node? Works with the matrix modulation system and such? I've been needing to investigate the best way to do modulation.

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

                    @griffinboy yes that‘s how I do it in sbb too.

                    1 Reply Last reply Reply Quote 2
                    • OrvillainO
                      Orvillain
                      last edited by

                      Also, note to self. Don't name your custom c++ node the same name as the network. It won't compile. Dohhhhh.

                      Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                      Crafting sound at every level. From strings to signal paths, samples to systems.

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

                        @Christoph-Hart Amazing! So what I've said is just wrong!

                        Hise made me an F5 dude, browser just suffers...

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

                        25

                        Online

                        2.0k

                        Users

                        12.9k

                        Topics

                        111.7k

                        Posts