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

    Topics

    • VirtualVirginV

      Making a list of global, classless functions for reference

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      3
      2 Votes
      3 Posts
      28 Views
      It_UsedI

      @VirtualVirgin I looked at the js manual, of course there are more functions, but only the ones you mentioned work in Hise, maybe undefined match to context

    • VirtualVirginV

      Does the number at the beginning of the HISE snippets have any particular meaning?

      Watching Ignoring Scheduled Pinned Locked Moved General Questions
      3
      0 Votes
      3 Posts
      47 Views
      VirtualVirginV

      @Christoph-Hart Thanks!

    • VirtualVirginV

      Coding in VS Code and HISE

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      20
      0 Votes
      20 Posts
      469 Views
      VirtualVirginV

      @Christoph-Hart Sounds great! I'm traveling today so I won't get a chance to build and test until tomorrow, but I look forward to it :)

    • VirtualVirginV

      Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?

      Watching Ignoring Scheduled Pinned Locked Moved Documentation
      12
      0 Votes
      12 Posts
      239 Views
      VirtualVirginV

      @Christoph-Hart said in Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?:

      Aw poor @VirtualVirgin that was half an hour that you'll never get back

      "Aw poor @VirtualVirgin that was half an hour that you'll never get back"

      No worries! Was learning how to generate markdown files from text.
      I made text files of all of the classes in the API, then ran a python script to transform it to markdown. Just a learning experience. I then went on the generate JSON for the API with the following schema:

      { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Scripting API Method", "type": "object", "properties": { "class": { "type": "string", "description": "The class this method belongs to." }, "method": { "type": "string", "description": "The method name." }, "description": { "type": "string", "description": "A description of what the method does." }, "syntax": { "type": "string", "description": "The usage syntax string for the method." }, "parameters": { "type": "array", "description": "List of method parameters.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The parameter name." }, "type": { "type": "string", "description": "The parameter type." }, "optional": { "type": "boolean", "description": "Whether the parameter is optional." }, "description": { "type": "string", "description": "A description of the parameter." } }, "required": ["name", "type", "optional", "description"], "additionalProperties": false } }, "returns": { "type": "string", "description": "The return type of the method." }, "examples": { "type": "array", "description": "Code examples demonstrating usage.", "items": { "type": "string" } } }, "required": [ "class", "method", "description", "syntax", "parameters", "returns" ], "additionalProperties": false }

      Which makes this for example:

      [ { "class": "Array", "method": "clear", "description": "Clears the array.", "syntax": "Array.clear()", "parameters": [], "returns": "", "examples": [ "const var arr = []; // Declare an array\n\n// preallocate 10 elements, do this if you\n// know how many elements you are about to insert\narr.reserve(10); \n\nfor(i = 0; i < 10; i++)\n{\n\t// Add an element to the end of the array\n\tarr.push(Math.randInt(0, 1000));\n}\n\nConsole.print(trace(arr)); // [ 523, 5, 76, 345, 765, 45, 977, 223, 44, 54]\n\narr.clear();\n\nConsole.print(trace(arr)); // []" ] }, { "class": "Array", "method": "clone", "description": "Creates a deep copy of the array.", "syntax": "Array.clone()", "parameters": [], "returns": "A deep copy of the array.", "examples": [ "const arr1 = [0, 1];\n\nvar arr2 = arr1;\n\n// Changing any element in arr2 will also change it in arr1\narr2[0] = 22;\nConsole.print(trace(arr1)); // [22, 1]\n\n// Reset the element 0 back to 0\narr1[0] = 0;\n\n// Cloning the array creates a new dataset in memory, separate from the original array\narr2 = arr1.clone();\nConsole.print(trace(arr1));\narr2[0] = 22;\nConsole.print(trace(arr2));" ] },

      I'm sure this is all elementary for you and David, but I'm just learning how to do some these data formats and transformations with parsers etc.

    • VirtualVirginV

      Is there a way to capture HISE console logs externally?

      Watching Ignoring Scheduled Pinned Locked Moved General Questions
      2
      0 Votes
      2 Posts
      565 Views
      d.healeyD

      @VirtualVirgin There's Debug Mode

      639036a8-eead-4095-90a5-51213ad283d9-image.png

      I don't think this write the output of Console.print though, so you'd need to handle that yourself.

    • VirtualVirginV

      Selecting a whole block of code

      Watching Ignoring Scheduled Pinned Locked Moved General Questions
      3
      0 Votes
      3 Posts
      549 Views
      dannytaurusD

      @VirtualVirgin The editor drives me batty. It functions so differently to what I'm used to that I'm constantly making subtle typos that fail to compile.

      I'm looking into coding in my familiar code editor and hopping back to HISE just to hit F5. Thinking about it, there might even be a way to automate it. Set up a file watcher and every time a script file int he HISE project is saved, tell HISE to compile. 🤔

    • VirtualVirginV

      Set font style?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      16
      0 Votes
      16 Posts
      745 Views
      d.healeyD

      @VirtualVirgin might work, try it in the compiled plugin and let us know

    • VirtualVirginV

      Is there a way to change the double-click delta time threshold?

      Watching Ignoring Scheduled Pinned Locked Moved General Questions
      1
      0 Votes
      1 Posts
      58 Views
      No one has replied
    • VirtualVirginV

      Trouble with Array.contains()

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      3
      0 Votes
      3 Posts
      128 Views
      VirtualVirginV

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

    • VirtualVirginV

      Completely flummoxed over panel value...

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      4
      0 Votes
      4 Posts
      141 Views
      ustkU

      @VirtualVirgin hard to tell without knowing what scribeData is

    • VirtualVirginV

      Any ideas on why .charAt() would suddenly stop working?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      7
      0 Votes
      7 Posts
      196 Views
      VirtualVirginV

      @d-healey Actually, I think I just found the error:

      local MPN = direction == "up" ? noteObject.y[0] : noteobject.y[noteObject.y.length -1];

      vs.

      local MPN = direction == "up" ? noteObject.y[0] : noteObject.y[noteObject.y.length -1];

      I forgot the camelCase on noteObject for the false branch :P

    • VirtualVirginV

      Is there a way to search all included .js files?

      Watching Ignoring Scheduled Pinned Locked Moved General Questions
      3
      0 Votes
      3 Posts
      116 Views
      VirtualVirginV

      @aaronventure Thanks!
      This is great! What a useful feature.

    • VirtualVirginV

      How can I efficiently remove a key from an object?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      7
      0 Votes
      7 Posts
      316 Views
      Christoph HartC

      @d-healey yeah something like JSON.delete(obj, key) is the easiest way, the delete syntax would require a real brain-twister with the current parser.

    • VirtualVirginV

      Is there a guide for the SVG to path converter?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      7
      0 Votes
      7 Posts
      409 Views
      C

      @d-healey They are now in the docs: https://docs.hise.audio/scripting/scripting-api/scriptpanel/index.html#setmousecursor

    • VirtualVirginV

      Just wondering about how this logic condition evaluates

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      6
      0 Votes
      6 Posts
      270 Views
      VirtualVirginV

      @d-healey said in Just wondering about how this logic condition evaluates:

      @VirtualVirgin said in Just wondering about how this logic condition evaluates:

      Yes! That is the solution :)

      You can probably also get rid of the ternary operator at the end - ? true : false because the statement itself should return true or false.

      Yes, that makes sense. It is just evaluating to that anyway, so no need to make it redundant.

    • VirtualVirginV

      Any particular reason that eval() does not work here?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      8
      0 Votes
      8 Posts
      292 Views
      d.healeyD

      @VirtualVirgin parseInt and trace

      I think I made a video about undocumented functions (if I didn't I should).

    • VirtualVirginV

      Out of curiosity, why are external .js files not allowed inside a namespace?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      6
      1 Votes
      6 Posts
      519 Views
      Christoph HartC

      I think the reason is just that the JS parser can‘t build namespaces across multiple files, but I don’t think there‘s a valid reason for touching that part of the codebase…

    • VirtualVirginV

      LAF to draw text input of a slider?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      10
      0 Votes
      10 Posts
      1k Views
      ChazroxC

      I just found this on the forum compliments to @HISEnberg ! 🙏

      https://forum.hise.audio//post/100409

      Content.makeFrontInterface(200, 50); const var Label1 = Content.getComponent("Label1"); const var lblCss = Content.createLocalLookAndFeel(); Label1.set("text", "CSS Label"); // Email/Key Label Laf lblCss.setInlineStyleSheet(" * { letter-spacing: 2px; font-weight: regular; } /** Render the default appearance. */ label { background-color: var(--bgColour); color: var(--textColour); border-radius: 5px; padding-left: 50px; padding-right: 20px; text-shadow: 2px 2px 5px rgba(0,0,0,0.3); } /** If you edit the text, it will use this selector. */ input { text-align: left; padding-top: 0.5px; padding-left: 50px; padding-right: 20px; caret-color: white; font-weight: bold; } /** Style the text selection with this selector. */ ::selection { background: #50FFFFFF; color: white; } "); Label1.setLocalLookAndFeel(lblCss);
    • VirtualVirginV

      Very strange behaviour with Engine.getUptime()?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      8
      0 Votes
      8 Posts
      865 Views
      VirtualVirginV

      @d-healey There isn't a particular standardization spec for MIDI 1.0 timestamps that I am aware of so I was thinking the HISE timestamp would be related to an internal clock. I would expect the output to be in samples, milliseconds or maybe PPQ, but I don't see that reflected in your Console.print there.

      @Christoph-Hart
      How do the timestamps for MIDI messages work in HISE?

    • VirtualVirginV

      How do I use LAF to draw the dropdown of a comboBox?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      5
      0 Votes
      5 Posts
      574 Views
      VirtualVirginV

      @Chazrox Thanks!!