HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. rglides
    3. Posts
    • Profile
    • Following 1
    • Followers 2
    • Topics 17
    • Posts 204
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: LAF Function? || How do I LAF for Button "disabled" state??

      @Chazrox I tried that too before the ! attempt :D sometimes it's trial and error

      posted in Scripting
      rglidesR
      rglides
    • RE: LAF Function? || How do I LAF for Button "disabled" state??

      @Chazrox Try this

      const var Button1 = Content.getComponent("Button1");
      
      const var STATE_LAF = Content.createLocalLookAndFeel();
      STATE_LAF.registerFunction("drawToggleButton", function(g, obj)
      {
          g.setColour(0x00FFFFFF); 
          g.fillRect(obj.area);
              
          g.setFont("Ariel", 16); 
      
          if (!obj.enabled)
          {
              g.setColour(Colours.red);
              g.drawAlignedText("DISABLED", obj.area, "centred");
          }
          else if (obj.over) 
              { 
                  g.setColour(Colours.yellow);
                  g.drawAlignedText("HOVERED", obj.area, "centred");
              }
              else if (obj.value) 
              { 
                  g.setColour(Colours.green);
                  g.drawAlignedText("ONNNNNN", obj.area, "centred");
              }
              else 
              { 
                  g.setColour(Colours.grey);            
                  g.drawAlignedText("OFFFFFF", obj.area, "centred");
              }    
      });
      Content.getComponent("Button1").setLocalLookAndFeel(STATE_LAF);
      
      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      Yeah it's true, I did update to this

      inline function onknb_OSC1_VoiceLimitControl(component, value)
      {
      		OSC1.setAttribute(OSC1.VoiceLimit, value);
      };
      Content.getComponent("knb_OSC1_VoiceLimit").setControlCallback(onknb_OSC1_VoiceLimitControl);
      

      but it was very helpful to discover that the function was always working, just not updating in real-time in module window, so the help was massive 🙏 edit: 'update' I mean revert hehe

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @Chazrox oh interesting, yeah I would have thought that'd be some kind of mute hack but nope

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @Chazrox that could be true, I know setting to 1 probably isn't a good idea too. But no, I was getting some really strange sounds cos of the max saturation for sure - EDIT changing in real-time sounds fine actually, very smooth

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @rglides Ah it's cos I set the saturation to max when testing earlier. All good, this really helps, thanks again!

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @Chazrox hehe hackerman to the rescue. Getting weird audio glitches in the generators now, not sure it's related, will keep playing around

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @Chazrox oh!! so it does! Thanks man!

      posted in Scripting
      rglidesR
      rglides
    • RE: set VoiceLimit of sine Wave Generator

      @Chazrox Thanks, good idea but it doesn't work, I'm using a Sine Wave Generator and although I can set octave, semitone etc using numbers, there seems to be no number for VoiceLimit

      posted in Scripting
      rglidesR
      rglides
    • set VoiceLimit of sine Wave Generator

      sorry for the very basic question but how can I set the VoiceLimit of the Sine Wave Generator using a knob? - I've tried this

      inline function onKnob1Control(component, value)
      {
      	OSC1.setAttribute(OSC1.VoiceLimit, value);
      };
      Content.getComponent("Knob1").setControlCallback(onKnob1Control);
      

      and even tried just setting it n the property editor with no luck (I'd rather script though). Can't find anything in the API browser either. what's the trick here?

      posted in Scripting
      rglidesR
      rglides
    • RE: Chat Room Feature || Request?

      @Chazrox Well, as we just discovered, we can, but it would be nice to get that add code button in DMs

      posted in General Questions
      rglidesR
      rglides
    • RE: Chat Room Feature || Request?

      @Chazrox +1!

      posted in General Questions
      rglidesR
      rglides
    • RE: a button to save or store Base64String from a table as a json file

      @Chazrox Getting there!

      posted in Scripting
      rglidesR
      rglides
    • RE: a button to save or store Base64String from a table as a json file

      @Chazrox yeah I saw those but couldn't figure out how to use them in my system with the json files, but I think I got it working. Thanks for looking out man!

      posted in Scripting
      rglidesR
      rglides
    • a button to save or store Base64String from a table as a json file

      I've managed to create some functions that save and load UI states and panel data to and from json files. I'm struggling to gather table curve data for the same purpose. I understand I can copy Base64String and add them to functions to apply to tables, but is there a method other than just ctrl+C to get the Base64String?

      posted in Scripting
      rglidesR
      rglides
    • RE: Save/Load JSON

      @rglides Solved!

      const var SAVE = Content.getComponent("SAVE");
      const var LOAD = Content.getComponent("LOAD");
      
      inline function onSAVEControl(component, value)
      {
          if (value)
          {
              local reverbData = {
                  "OSC1_Reverb_Width": knb_OSC1_Reverb_Width.getValue()
              };
              Engine.dumpAsJSON(reverbData, "reverb_settings.json");
          }
      };
      Content.getComponent("SAVE").setControlCallback(onSAVEControl);
      
      inline function onLOADControl(component, value)
      {
          if (value)
          {
              local loadReverb = Engine.loadFromJSON("reverb_settings.json");
              
              if (loadedData != undefined)
              {
                  if (loadReverb.OSC1_Reverb_Width != undefined)
                  {
                      knb_OSC1_Reverb_Width.setValue(loadReverb.OSC1_Reverb_Width); knb_OSC1_Reverb_Width.changed();
                  }
               }
          }
      };
      Content.getComponent("LOAD").setControlCallback(onLOADControl);
      
      posted in Scripting
      rglidesR
      rglides
    • Save/Load JSON

      Here I have a minimal where I can print the current value of a knob in a format that allows me to copy and paste it directly into a callback - using it for buttons, knobs, panel data etc so it's very useful

      const var PRINT_REVERB = Content.getComponent("PRINT_REVERB");
      const var btn_ApplyReverb = Content.getComponent("btn_ApplyReverb");
      
      inline function onPRINT_REVERBControl(component, value)
      {
          if (value)
          {        
              local outputText = "";
      
              outputText += "knb_OSC1_Reverb_Width.setValue(" + knb_OSC1_Reverb_Width.getValue() + "); knb_OSC1_Reverb_Width.changed();\n";
              
              Console.print(outputText);
          }
      };
      Content.getComponent("PRINT_REVERB").setControlCallback(onPRINT_REVERBControl);
      
      //--------------------------------------------------------------------------------------------------------------
      
      inline function onbtn_ApplyReverbControl(component, value)
      {
      		knb_OSC1_Reverb_Width.setValue(0.1500000059604645); knb_OSC1_Reverb_Width.changed();
      };
      Content.getComponent("btn_ApplyReverb").setControlCallback(onbtn_ApplyReverbControl);
      
      const var SAVE = Content.getComponent("SAVE");
      const var LOAD = Content.getComponent("LOAD");
      

      I'm trying to wrap my head around JSON objects now so that I could save current values of buttons, knobs, panel data etc from the UI as a JSON file in a format that would make it then loadable as a function applied by a load button - similar to my PRINT button. This is a simplified version of what I want, but understanding this would get me on the right path if anyone has any wise nuggets on this. I did think about adding an addButton with some kind of incrementing name as well as the callback text required directly in the printout too, but thought JSON might be a better way to go and would prevent the user from just adding millions of buttons just because they could - Edit, I can't print buttons haha, I'm tripping, been a while since I slept lol. But the JSON question still stands

      posted in Scripting
      rglidesR
      rglides
    • RE: activate MidiOverlayPanel from code

      @lijas90 I think this thread could help you

      https://forum.hise.audio/topic/11218/making-button-flash-upon-mouseclick-and-midi-note/19?_=1737578349604
      
      posted in General Questions
      rglidesR
      rglides
    • RE: Enable Parametriq Eq

      @lijas90 You need to add a generic script reference for the EQ then bypass it in the button callback

      const var ParametriqEQ1 = Synth.getEffect("Parametriq EQ1");
      const var Button1 = Content.getComponent("Button1");
      
      inline function onButton1Control(component, value)
      {
          ParametriqEQ1.setBypassed(value);
      };
      
      Content.getComponent("Button1").setControlCallback(onButton1Control);
      
      posted in General Questions
      rglidesR
      rglides
    • RE: Change the slider name and value placement

      @Mickolos You could export a snippet, it would be a lot easier - In HISE go to Export, Export as HISE Snippet and then in here click the </> in the menu above where you write a message, then replace the ... with the copied hise snippet. You can paste any code with the same method, but a snippet would make it easy to take a look

      posted in Newbie League
      rglidesR
      rglides