HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. VirtualVirgin
    3. Posts
    • Profile
    • Following 1
    • Followers 0
    • Topics 137
    • Posts 518
    • Groups 0

    Posts

    Recent Best Controversial
    • Selecting a whole block of code

      Is there a keyboard shortcut to selecting a whole block of code, similar to the way you can select a whole line by placing the cursor at the beginning of a line and using "Ctrl+Shift+right"? Just thinking it would be great to quickly select whole functions or a full namespace this way.

      posted in General Questions
      VirtualVirginV
      VirtualVirgin
    • RE: panel in front

      Ok, so I found an issue with the ZLevel for panels.
      It seems it does not function when the panel is set to:
      "allowDragging" "Disabled".

      I found this snippet from @ustk which demonstrates the basic ZLevel change for panels when clicked:

      HiseSnippet 929.3ocsVEsaaaCEkxIpnVctXEnOOH3mjAxBjSZZKPQ65hcRgwZRLp6BFZQWACEsEQnHEDoRlQP9W1+v9W56849x9C7tTxxRYQHM1.QuHcO26k5PxykWNLQRnJkLAY078SioHqevdzTgNrWHlIPC5irdn8AXkll3lCs6zXrRQCPVVq8FCfUy0QYO+6urKliEDZIDBcrjQnukEwzknCe8uw378wAz2yhpD8Sd8.hTzSxko.eVy1GEiImhmPODaBqgMx5d6EvzxjQZrlpPVquqLX5nP44h73OloXmvoFitnQv.kCuujGXXrAE0KjwCFVLuUHXTFVtJrV9pvisOfEvVfWtZ7iYNbKyn55gUiahdc+9zyuN5YUgdqmSuGYOhjvh0kdLb6A1CDvF0XLrETkV4whZ7SMr6IgHD5MivmR2OALVjg2S882vcGe+NuvwwA1GTZ2yvItwBtx8kterHyITcOYTrT.FdsGhET91s6rQKG2q8bCozc4SYq1c9zKZAbarLw0K1kIx3VmVNWjORwapn5CjoJZOLmeBHc7FmJHZlT3Q6jGyEk+T1XWO5lDNibJMnyUIiNjoLi1GdK8LJ2qc1RUaXkw37R38kNq7SAmbkhCkZ5QBuNNW3zDFR2+uqwiq0mYQJQx4zjZcaJpRtoD8DoQmPS1.1e4ozEABpqqJeevsS9Rx2ypDnTLPvzGESmaWs9qXVW30GsXxVEpbNVEMapUSXkPWu9AMWSAe86C5i0XSI0bLHtXZhlYlsV8omAmUkWf0ztOUcpVFCi5BgHxxQm4sUQ4mQWhXvL6914xZzegrrstD9WSMebL7w4r.cnw3afQHkMITar9avBjoxy6mfmLgIl.LnQFPg5UY9Q8L5Sk6QB9TDSSiJNcr48PnYyLmZVhtUUXzRP6sxo8WJn8+bWR6Y6TKsmCuLzd6bZ+mEz9q2gzdF5U0Q6BXz0OiF5THCR4X8UaeX5YN2ATTdkyoMmEKTL8zp8TWhdJ925Vd2V59H6gLMIrd91nF9B0V207cdG5V16MdLknKI6516+GqZ63kfJuSlpAAzAXcByn+NLMZDHGHTfIBPUpL5sFFkbtsuw1rxLhJBxLlAOyc10XaM2Y2BmnHLIQ9YR9gal6.b+LDfShrqB0DtSFX61EkcDNjms+l9nH3pIelPLKE+Lv85yYqUHmsWgbdxJjyNqPNOcEx4YqPNO+FywbqveMUKixKS.fg6k0rwxZOAFTYYJRz+ATnnDPF
      
      

      but if you set "allowDragging" to "Disabled", the the ZLevel no longer changes when clicked:

      HiseSnippet 952.3ocsV0saaaCElxIpnVatXEXO.B9J4hf.+eSPwVSiSRmwpSLl6JF1vPGCEUDQnHEDoRlQQeG1iPusWu2f8brGh8F3cnjUj7paWiQKuQ57cNGxOc3GOTSSjDpRISPVNOedLEY8k1ylKzgiBwLAZ7QHq6YOAqzzD2bnCmGiUJpOxxZqmZ.rpuMJa7OO9PLGKHzRHD5ERFg9LVDSWhN8fumw4mf8oOmEUI59GLlHEijbYJvmsraihwjKwWPOEaBqlM56vpPj0CrGzsGou+C861cv9CI3gz8CvAAc542u+v81uSu8w82aHs8.j0cN1mokIyzXMUgr19Po+7YgxqE4KvKXJ14bpwnCZFrx4vmH49lOQCJZTHi6OsnPoPvrLsrrsUdY6qsmv7Y2fWV99pLGtkYTs.ZUaU5s0JzqSU50tB8VCkrpPosyoz8smQRXw5ROF97E1iEvtY.F1mpRk7XQ0rqYORBQHz6FgujdRBXbSFdCa2dG2Asa25QNNNvlkR6dENwMVvUteiqyuTuH2Kn5QxnXo.L7ZNEKn7dMasSCGWX7ABpyGSPca1x4WeTCfBAxDWuXWlHiBsZ37p7ji2UQ0SjoJ5HLmeNHi7BREDMSJ7nsxiYYnlAKv0itKgyHWR8aUhaF5PlxLa+7ynWQ4dMypHMgBfw4qgmu1YiGEbxUJNUpomI7Z47Jm5vT59ecEDrVelpThjyoIq0s4.VxGJQOQZz4zjcfsQdJ8l.AQzpJS62uxr5AGR9lVk.khwBl9rXp38cbBsbmFd6GGeDViMx4kXPbwzDMyPAqinWAMSxE20sOhptTKigY8F4A.qy71nP5aTKHFHvuqct7B86v2h0eBq0byK6AubMyWGZL9avHjxtHTardCXAZG40EJHkYdGYzHJ2yD74HllFUzsp9cPnEKLcwJQ6VEFcKXY2bV9WEr7skrbYuxeK5fBlVz8z+faEaWLXsrcI7sgs8xY6eTv16Y8ImsKPe65XaAL5ca9Asck9obrd0dwlarV5.NFrRCPSSNghomW8FsOYMn+Xo38smxzjv0ywZqgivgkOGbb40ZMrONHfRzkDba6S9oOO2gg9AYplItXBVmvLRpSSilAa0DJr5BPnYZCYUyHNysaarMUfYTgelwBXrzYGis0RmcJbhhvjD4KI4M+LWbd2LDfShrexnN72NfsaGTVCwp04H3d7WRHqNUuShc2zD6soI1eSSbvll3vMMwGtoIt2+ehley5IoZYT9wFDZxziytMwx5XAFTfYpUz+BvtP6LB
      
      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: panel in front

      @Chazrox I may be wrong, but I think that is only for keyboard input.

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      @d-healey Even if gets and loads the files using the "{PROJECT_FOLDER}" wildcard? That has to be used for Engine.loadFontAs anyway, so why wouldn't it also work for this?

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      Ok, sorry about that.
      This one actually works:

      // this will load all of your fonts which are stored in the projectFolder/Images/Fonts
      inline function loadAllFontsFromProjectFolder()
      {
      	
      	local fontsFolder  = FileSystem.getFolder("{PROJECT_FOLDER}").getParentDirectory().getChildFile("Images").getChildFile("Fonts");	
      	local fontFiles = FileSystem.findFiles(fontsFolder, "*.ttf;*.otf", false);
      
      	for (file in fontFiles)
      	{
      		local fontPath = file.toString("FullPath");
      		local pathParts = fontPath.split("/");
      		local fontNameWithExtension = pathParts[pathParts.length - 1];
      		local targetName = "";
      
      		// if the file name suffix is "-Regular", loadAs will use just the prefix
      		if (fontNameWithExtension.contains("-Regular.ttf") || fontNameWithExtension.contains("-Regular.otf"))
      			targetName = fontNameWithExtension.substring(0, fontNameWithExtension.lastIndexOf("-Regular."));
      		else
      			targetName = fontNameWithExtension.substring(0, fontNameWithExtension.lastIndexOf("."));
      	
      		Engine.loadFontAs("{PROJECT_FOLDER}Fonts/" + fontNameWithExtension , targetName);
      	}
      }
      
      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      Ok, well I made it to the Fonts folder by navigating form the Audio folder, back to the Project folder, then on down.Screenshot 2025-08-29 at 9.36.45 PM.png

      But now I'm having an issue with

      File.toString();
      

      which returns the path for "Filename" instead of just the filename:

      Screenshot 2025-08-29 at 9.39.50 PM.png

      The Docs says it should just return the file name and not the full path:

      Screenshot 2025-08-29 at 9.40.10 PM.png

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      I've tried using File.Show() on each of these variations here and all three open to the Audio Files folder in the Project Folder instead of the Project Folder itself, so it seems like there is an error with the FileSystem processing of the wildcard?

      Screenshot 2025-08-29 at 9.00.03 PM.png

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      @ustk It doesn't seem to resolve to anything though: Screenshot 2025-08-29 at 8.36.48 PM.png

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      @d-healey They are.

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      Even if I use the AppData folder and let it search recursively in any child folders, it does not return any fonts: Screenshot 2025-08-29 at 7.59.07 PM.png

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      @VirtualVirgin Actually, after testing this does not work. It is not finding any of the files.
      Does anyone know how to navigate to the project folder and then the fonts folder to get all of the files there? I can't seem to find a path to do it using the FileSystem.

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: Set font style?

      @ustk Thank you!

      I made an inline function to load all of the fonts from your project fonts folder and auto-name them. I thought it would be easier just to drag the .ttf or .otf into the Fonts folder and let this do the rest. FYI- the naming here removes "-Regular" from the loadFontAs target name so for instance "Nunito-Regular" will now just be referred to as "Nunito". The other types will keep their suffix.

      // this will load all of your fonts which are stored in the projectFolder/Images/Fonts
      inline function loadAllFontsFromProjectFolder()
      {
      	local appDataFolder = FileSystem.getFolder(FileSystem.AppData);
      	local fontsFolder = appDataFolder.getChildFile("Fonts");
      	local fontFiles = FileSystem.findFiles(fontsFolder, "*.ttf;*.otf", false);
      
      	for (file in fontFiles)
      	{
      		local fontPath = file.toString(File.FullPath);
      		local fontName = file.toString(File.Filename);
      		local targetName = "";
      
      		// if the file name suffix is "-Regular", loadAs will use just the prefix
      		if (fontName.endsWith("-Regular.ttf") || fontName.endsWith("-Regular.otf"))
      			targetName = fontName.substring(0, fontName.lastIndexOf("-Regular."));
      		else if (fontName.endsWith(".ttf") || fontName.endsWith(".otf"))
      			targetName = fontName.substring(0, fontName.lastIndexOf("."));
      
      		Engine.loadFontAs(fontPath, targetName);
      	}
      }
      
      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • Set font style?

      How do I use different font styles in with the graphics?

      Trying this but it doesn't take and HISE gives me the default font instead:

       g.setFont("Fredoka-Bold", buttonSize);
      

      It must be something simple, I'm sure.

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: panel in front

      @ulrik How does the ZLevel work exactly?

      I have a few panels on a panel:
      Screenshot 2025-08-29 at 2.39.33 PM.png

      When I use:

      	// move to front and allow keyboard input when clicked
      	if (event.clicked)
      	{
      		this.setZLevel("Front");
      		this.grabFocus();
      	}
      

      It will move a panel to the front, but only once.
      Once I have clicked on all three panels I have here,
      they just stay in that ZLevel order and never change subsequently:

      Screenshot 2025-08-29 at 2.37.29 PM.png

      I must be missing some aspect of the feature.

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • Is there a way to change the double-click delta time threshold?

      Is there a way to change the time in milliseconds for the double-click threshold?
      I would like to make it a little shorter, as I am finding I am triggering unintended double-clicks when I am doing what I think of as single clicks in moderate to quick succession.

      posted in General Questions
      VirtualVirginV
      VirtualVirgin
    • RE: Search & Replace...

      @Christoph-Hart Thanks :)
      I was using "Ctrl+D" after finding the first occurrence, but this is quicker.
      I was hoping that there was search and replace feature that worked across the external .js files as well. Doing a big cleanup at the moment so looking for ways to correct older names I had for certain data labels which may be used in multiple scripts.

      posted in Bug Reports
      VirtualVirginV
      VirtualVirgin
    • RE: Search & Replace...

      Still broken? I can't get it to do anything.

      posted in Bug Reports
      VirtualVirginV
      VirtualVirgin
    • RE: Trouble with Array.contains()

      @d-healey Right on both counts of course!!

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • Trouble with Array.contains()

      Screenshot 2025-08-08 at 11.59.35 AM.png Screenshot 2025-08-08 at 12.00.30 PM.png

      in this function:

      inline function getAllNoteObjectsInTie(staffIndex, barNumber, noteObject)
      {
      	if (noteObject.type != "note" || !isTied(noteObject))
      		return;
      		
      	local objectIndex = findObjectIndexFromNOR(staffIndex, barNumber, noteObject);
      	local startAddress = findTieChainStart(objectIndex);
      	local intialNoteObject = scribeData[startAddress.staffIndex][startSddress.barNumber][startAddress.objectIndex];
      	local noteObjects = [];	
      	
      	noteObjects.push(intialNoteObject); // push the first noteObject in tieChain
      
      	local i = objectIndex +1;
      	
      	while (true)
      	{
      		local nextObj = findNextNoteObject(staffIndex, barNumber, i);
      		noteObjects.push(nextObj);
      		
      		Console.print("nextObj: " + trace(nextObj));
      		
      		if (nextObj.specialFlag.contains("tieEnd") || nextObj.type == undefined)
      			return noteObjects;		
      	}	
      	
      }
      

      Where the Console.print is clearly showing that

      nextObject.specialFlag does indeed contain "tieEnd":

      Interface: nextObj: {
        "noteObject": {
          "type": "note",
          "noteValue": "1/2",
          "x": "1/1",
          "y": [
            "D#6"
          ],
          "noteNumber": [
            75
          ],
          "direction": "down",
          "selected": [
            0
          ],
          "specialFlag": [
            null,
            "tieEnd"
          ],
          "attachments": {
            "stem": {
              "heightExtension": 0
            }
          }
        },
        "staffIndex": 0,
        "barNumber": 3,
        "objectIndex": 1
      }
      

      What might be causing the .contains not to work on an array?

      posted in Scripting
      VirtualVirginV
      VirtualVirgin
    • RE: MIDI FX Chord Plugin -- Using Message.sendToMidiOut() For Generated Notes

      @dusseldorf
      sendToMidiOut() will not capture generated notes at that level.
      You have to place sendToMidiOut() in a script in a container level beyond the one your MIDI notes are being generated in.

      Screenshot 2025-08-07 at 11.39.19 AM.png

      And don't forget to put it on the other MIDI callbacks as well!

      posted in Scripting
      VirtualVirginV
      VirtualVirgin