HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Chazrox
    3. Posts
    • Profile
    • Following 6
    • Followers 5
    • Topics 156
    • Posts 1,285
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Background Task || Help me understand this please.

      @ustk aaahhhh here you go! haha. I gotta see this...brb.

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Background Task || Help me understand this please.

      @ustk I ended up figuring it out. I had it all twisted up. lol. I get it a little bit now tho. Thanks! 🙏

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Background Task || Help me understand this please.

      I think im confused how to name the functions properly.....

      Screenshot 2025-11-09 at 12.51.38 AM.png

      Screenshot 2025-11-09 at 12.51.54 AM.png

      posted in Scripting
      ChazroxC
      Chazrox
    • BackgroundTask.setFinishedCallback() || How to get status....

      How do I get the isFinished or wasCancelled state for scripting?
      You can see what I did. Although my function seems to complete (do what I expect), I dont see either of the first two Console.print()'s or the one inside my isFinished() check.

      obviously I stole this little part from docs. Everything else seems to be working fine, I just get no action out of this part for some reason....

      // We can use the finish callback to show / hide some elements
      bgFindTokens.setFinishCallback(function(isFinished, wasCancelled) ////////////////////////
      {
      	bgFindTokens.setProgress(0.0);
      
      	Console.print("Finished: " + isFinished);
      	Console.print("Cancelled: " + wasCancelled);
      	
         /// if (isFinished)//  <-----I tried this too...
      	if (bgFindTokens.isFinished)
      	{
      		Console.print("We FINISHED");		
      	}
      });
      
      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Background Task || Help me understand this please.

      @ustk Sweet. So other than that, is that pretty much the process?

      I have helper functions that are called inside of my parsing script but exist outside of my function. Do those need to be dealt with specifically or are they automatically handled on the background thread also because they are called from within my background function?

      posted in Scripting
      ChazroxC
      Chazrox
    • Background Task || Help me understand this please.

      I have a heavy token parsing function that crashes when I query large directories. I was told to execute this function on a 'background thread' so I've been looking into it. I just need some clarification from someone with experience with this please.

      I have this function:

      inline function onbtnFindTokenControl(component, value)
      {
      
      // Search files here
      
      }
      btnFindToken.setControlCallback(onbtnFindTokenControl);
      
      

      This function is triggered with a Button on my interface labeled "LOAD".

      Based on what i've read so far....is this pretty much how you do this?

      inline function onbtnFindTokenControl(component, value)
      {
      // Search files here
      }
      btnFindToken.setControlCallback(onbtnFindTokenControl);
      BackgroundTask.callOnBackgroundThread(onbtnFindTokenControl);
      
      // I could put this into the button callback and changed my button callback to 
      // a regular inline function.....is this correct?
      
      
      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Ableton Automation can't do math?

      @iamlamprey Looks like the value is being normalized somewhere.

      posted in General Questions
      ChazroxC
      Chazrox
    • RE: Syntax Error ?

      @Lindon I havent gotten that one much before. I get whats happening now. 🙏

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Setting ControlCallback w/ Loops ?

      @Lindon Thank You 🙏 Im gonna try this in a bit and get back to you. Appreciate it! Love the energy. ⚡

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Setting ControlCallback w/ Loops ?

      @Lindon @Oli-Ullmann @d-healey 💀

      Thank Yous! ha. 🤛

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Syntax Error ?

      @d-healey Yeah I think it was a wrong type of value trying to be written in.

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Setting ControlCallback w/ Loops ?

      @Orvillain sheet. lol. See.. I told you im goofing it. all the loops got me in a loop. lol. Im not exactly sure how to go about that at the moment. Im definitely mixed up a little bit but still trying to figure it out.

      posted in Scripting
      ChazroxC
      Chazrox
    • Syntax Error ?

      I dont remember changing anything to do with this part of the script and all of a sudden I cant get rid of this error message "Syntax Error" . Any clues?

      Everything was working fine until it wasnt. No clue why all of a sudden, Syntax Errorr...
      Screenshot 2025-11-07 at 1.25.44 AM.png

      EDIT:
      I figured out how to get rid of the error, but I dont know what caused it. Can someone please shed some light?

      How I fixed: deleted "DrumKits.json" and re-compiled.

      posted in Scripting
      ChazroxC
      Chazrox
    • Setting ControlCallback w/ Loops ?

      Can someone please advise on this....

      im trying to learn how to set control callbacks with loops for obvious reasons when dealing with large amounts of components.

      I know i've seen an example of this before somewhere but I cant remember where, so I've been trying to do it from scratch but i've been stuck. Can you please advise?

      Be nice, this is my first time doing this. 😆

      const var SimpleGain1 = Synth.getEffect("Simple Gain1");
      const var SimpleGain2 = Synth.getEffect("Simple Gain2");
      const var SimpleGain3 = Synth.getEffect("Simple Gain3");
      const var SimpleGain4 = Synth.getEffect("Simple Gain4");
      const var SimpleGain5 = Synth.getEffect("Simple Gain5");
      const var SimpleGain6 = Synth.getEffect("Simple Gain6");
      const var SimpleGain7 = Synth.getEffect("Simple Gain7");
      const var SimpleGain8 = Synth.getEffect("Simple Gain8");
      
      const var samplers = [
          AudioLoopPlayer1Sampler,
          AudioLoopPlayer2Sampler,
          AudioLoopPlayer3Sampler,
          AudioLoopPlayer4Sampler,
          AudioLoopPlayer5Sampler,
          AudioLoopPlayer6Sampler,
          AudioLoopPlayer7Sampler,
          AudioLoopPlayer8Sampler
      ];
      
      
      const var SampleVolumeKnobs = [Content.getComponent("knbVolume1"),
                                     Content.getComponent("knbVolume2"),
                                     Content.getComponent("knbVolume3"),
                                     Content.getComponent("knbVolume4"),
                                     Content.getComponent("knbVolume5"),
                                     Content.getComponent("knbVolume6"),
                                     Content.getComponent("knbVolume7"),
                                     Content.getComponent("knbVolume8")];
      
      inline function onSampleVolumeKnobsControl(component, value)
      {
      	for (i = 0; i < samplers.length; i++) // used samplers.length to be difficult. im using this length    somewhere else also so it was convenient 
      	{
      		i.setAttribute(0, value);				
      	}
      };
      
      inline function allSampleVolumeKnobs(component, value)
      {
      	for (i = 0; i < 7; i++)
      	{
      		if (value)
      		{
      			SimpleGain[i].setControlCallback(onSampleVolumeKnobsControl);
      		}
      	}
      }
      

      I have a good feeling that I goofed this. lmao.

      posted in Scripting
      ChazroxC
      Chazrox
    • RE: Wavetable Synth Crash on note played

      @whereami518 Do you have anything scripted in onNoteOn?

      posted in General Questions
      ChazroxC
      Chazrox
    • RE: Imgur not working in the UK is really starting to piss me off! 😂

      @dannytaurus
      So you've never seen my pretty profile pic before?? haha
      Nice to meet you!
      Screenshot 2025-11-05 at 12.49.55 PM.png

      posted in General Questions
      ChazroxC
      Chazrox
    • RE: Imgur not working in the UK is really starting to piss me off! 😂

      @dannytaurus ahh thats whack! lol

      posted in General Questions
      ChazroxC
      Chazrox
    • RE: parameter properties desappear

      @AGD_ What was it?

      posted in Newbie League
      ChazroxC
      Chazrox
    • RE: Check if (!FILE) do this...

      @Oli-Ullmann @iamlamprey I promise you guys I was looking for this. hahaha. Thank You 🙏

      That was it...Thank you guys!

      posted in Scripting
      ChazroxC
      Chazrox
    • Check if (!FILE) do this...

      Im trying to just check if a text file exists, read the text....if no file exists, create an empty text file.
      If I was doing this correctly the file should be created upon compiling (f5) correct?

      // Search All Files
      reg rootFolder = FileSystem.getFolder(FileSystem.Desktop);
      reg allFiles = FileSystem.findFiles(rootFolder, "*.wav", true);
      
      const appDataFolder = FileSystem.getFolder(FileSystem.AppData);
      const fileData = appDataFolder.getChildFile("LastUserSelectedFolder.txt");
      
      const LastSelectedLocation = "Test this";
      
      
      Console.print(fileData.loadAsString());
      
      if (fileData)
      {
      	rootFolder = fileData.loadAsString();
      	Console.print("File Is Here: " + rootFolder);
      }
      else
      {
      	Console.print("Nothing Is Here");
      	fileData.writeString("");
      }
      
      posted in Scripting
      ChazroxC
      Chazrox