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
    12 Posts 5 Posters 277 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.
    • 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
                      • OrvillainO
                        Orvillain
                        last edited by

                        96158df7-cac1-4906-beec-f0160caf5cd5-image.png

                        Woaaahhhh that's amazing!! I really dig it! And honestly, seems so much easier to my mind than messing around with scriptnode directly.

                        fe564898-c847-45ea-ae47-70b718cf4614-image.png

                        @Christoph-Hart Can I check with you... in the c++ code do we need to do anything special to support scale/unipolar/bipolar modes ... or does that just happen automatically when using the matrix modulator as a source, and an (for example) LFO in the global modulator container (set to bipolar itself)

                        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 1
                        • OrvillainO
                          Orvillain
                          last edited by Orvillain

                          And I assume these are the modulation colour references to use:

                          		HiseModulationColours::ColourId::ExtraMod
                          		HiseModulationColours::ColourId::Midi
                          		HiseModulationColours::ColourId::Gain
                          		HiseModulationColours::ColourId::Pitch
                          		HiseModulationColours::ColourId::FX
                          		HiseModulationColours::ColourId::Wavetable
                          		HiseModulationColours::ColourId::Samplestart
                          		HiseModulationColours::ColourId::GroupFade
                          		HiseModulationColours::ColourId::GroupDetune
                          		HiseModulationColours::ColourId::GroupSpread
                          

                          Is there any limitations around which colour a particular parameter should use? Or is it really just down to how you want it to appear in the module tree??

                          And for the ParameterModes, would it be these ????

                          modulation::ParameterMode::ScaleAdd
                          modulation::ParameterMode::ScaleOnly
                          modulation::ParameterMode::AddOnly
                          modulation::ParameterMode::Pan
                          modulation::ParameterMode::Disabled
                          
                          

                          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
                          • First post
                            Last post

                          42

                          Online

                          2.1k

                          Users

                          12.9k

                          Topics

                          112.0k

                          Posts