HISE Logo Forum
    • Categories
    • Register
    • Login

    NewBe Question about Link

    Scheduled Pinned Locked Moved General Questions
    11 Posts 4 Posters 323 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.
    • d.healeyD
      d.healey
      last edited by

      A control can either use a custom callback or parameter ID, not both.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • MikeBM
        MikeB
        last edited by

        And how do I get it to work via script?
        Or rather how do I get the ProcessorID and ParameterID
        into my custom callback?

        Can you show me an example script/snippet
        I learn fast when I see this than when I just read it

        "One hour of trial and error can save 10 minutes of reading the manual."
        "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
        HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

        orangeO 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          First 15 minutes of this video should cover it

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

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

            @MikeB There are several ways to do this. I would do something like that:

            HiseSnippet 1129.3oc6XEtaaaCDlxNrK1atncX+eBA6GJ.YAx1sYCXXXtwIYvnKoFycYq.EHiQhNlHTjFRzYyHH.8QZuK6EXOB6MH6HkTDsisiqA5vxPjARLu69H+3cGOdxcikAzjDYLxoxqGOjhb9DbuwB0f1CHLApydHmGiOjjnnwtoh1c7PRRBMD43T960BbprFx772e2tDNQDPKDgPGKYAzefEwTER615kLN+.RH80rHKqeVqNARQaIWNB3SYrOZHI3bxYziHZyJgQNOZ+PlRF2SQTzDjyZ6JCG2af72Do1eLKgcJmpGTG0ClnTwGH4gZFqkhZOfwC6luuSPvrzsvKTN0K7Y3CYgrajW3MdhQgaABa+gSoEQu51z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+LaLMVALMWALOaEv77U.yNq.luZEv70KDi9mZ6EiTxnz7ePP28MuEmiy9BBjIaNJf9G.B8+lmB
            

            I used 2 Simple Gain units in this example.

            Or alternatively, you can directly get the Knob values with .getValue() and use this value in the .setAttribute.

            develop Branch / XCode 13.1
            macOS Monterey / M1 Max

            1 Reply Last reply Reply Quote 0
            • MikeBM
              MikeB
              last edited by

              It works - both according to David's video as well as
              your snippet - thanks
              BUT: Now I get although all seems right constantly the error message: Line 32, column 23: API call with undefined parameter 0

              If I comment out the line the next one is shown

              "One hour of trial and error can save 10 minutes of reading the manual."
              "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
              HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @MikeB
                last edited by

                @MikeB Is this error happening in the snippet you posted?

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                1 Reply Last reply Reply Quote 0
                • MikeBM
                  MikeB
                  last edited by

                  yes and in this:

                  const var SimpleGain1 = Synth.getEffect("SimpleGain1");
                  const var SimpleGain2 = Synth.getEffect("SimpleGain2");
                  
                  const var Knob1 = Content.getComponent("Knob1");
                  const var Knob3 = Content.getComponent("Knob3");
                  const var Button6 = Content.getComponent("Button6");
                  
                  
                  inline function onButton6Control(component, value)
                  {
                  	  if (value)
                      {
                          local Knob1_value = Math.randInt(0, 16);
                          local Knob3_value = Math.randInt(0, 10);
                          
                          Knob1.setValue(Knob1_value);
                          Knob3.setValue(Knob3_value);
                          
                          SimpleGain1.setAttribute(SimpleGain1.Gain, Knob1_value);
                          SimpleGain2.setAttribute(SimpleGain2.Gain, Knob3_value);
                      }
                  };
                  
                  Content.getComponent("Button6").setControlCallback(onButton6Control);
                  

                  Whereas this is line 31: Knob1.setValue(Knob1_value);

                  "One hour of trial and error can save 10 minutes of reading the manual."
                  "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                  HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

                  LindonL 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey
                    last edited by

                    Nothing obvious is standing out to me. Could you post a HISE snippet? and I'll try it on my system.

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    1 Reply Last reply Reply Quote 0
                    • MikeBM
                      MikeB
                      last edited by

                      Works all of a sudden again - Strange.
                      But I have already read here that this probably occurs more often Probably more often if you try around so much as I still do. Copy/Paste/Compile/Delete etc.

                      "One hour of trial and error can save 10 minutes of reading the manual."
                      "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                      HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

                      1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @MikeB
                        last edited by

                        Slight changes to your code -

                        • Shout if its not making sense...
                        const var SimpleGain1 = Synth.getEffect("SimpleGain1");
                        const var SimpleGain2 = Synth.getEffect("SimpleGain2");
                        
                        const var Knob1 = Content.getComponent("Knob1");
                        const var Knob3 = Content.getComponent("Knob3");
                        const var Button6 = Content.getComponent("Button6");
                        
                        
                        inline function onButton6Control(component, value)
                        {
                            if (value)
                            {
                                Knob1.setValue(Math.randInt(0, 16));   
                                Knob1.changed();
                                Knob3.setValue(Math.randInt(0, 10));   
                                Knob3.changed();
                        
                            }
                        };
                        Content.getComponent("Button6").setControlCallback(onButton6Control);
                        
                        inline function onKnob1Control(component, value)
                        {
                            SimpleGain1.setAttribute(SimpleGain1.Gain, value);
                        };
                        Content.getComponent("Knob1").setControlCallback(onKnob1Control);
                        
                         inline function onKnob3Control(component, value)
                         {
                             SimpleGain2.setAttribute(SimpleGain2.Gain, value);
                         };
                         Content.getComponent("Knob3").setControlCallback(onKnob3Control);>

                        HISE Development for hire.
                        www.channelrobot.com

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

                        24

                        Online

                        1.8k

                        Users

                        12.0k

                        Topics

                        104.3k

                        Posts