@d-healey Thank you!
Though I am still slightly confused on the use of "string" instead of "String" in the list of accepted types (given that the API reference uses "String"):
string elementary a string variable
Posts
-
RE: Question about data types specified in the API documentationposted in Scripting
-
Question about data types specified in the API documentationposted in Scripting
I'm noticing that there are differences in the capitalization for some data types in the API docs,
for example:Content.addAudioWaveform(String audioWaveformName, int x, int y)There is "String" and there is "int".
Is there something I can learn about this distinction?
I am assuming there is a reason for the different treatment given the consistency of usage:
"Array", "Object", "String"
vs
"int", "var", "bool", "double" -
RE: VST3 SDK Goes MITposted in General Questions
@aaronventure Do you have any plans for adding MIDI 2.0 to your upcoming releases?
-
Making a list of global, classless functions for referenceposted in Scripting
So far I have:
trace()
typeof()
parseInt()
parseFloat()
include()
isDefined()
eval()If you can think of any more, please add them to the list.
-
Does the number at the beginning of the HISE snippets have any particular meaning?posted in General Questions
Such as "HiseSnippet 10082" from "Basic Synth"
or
"HiseSnippet 2402" from "Dynamic Plugin Parameters" ?https://docs.hise.audio/tutorials/all/index.html
Is it maybe a randomly generated id number?
Just curious about the convention here. -
RE: Coding in VS Code and HISEposted in Scripting
@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 :)
-
RE: Coding in VS Code and HISEposted in Scripting
Well, so far I have found that if I do not open the included .js file in a tab inside HISE, it seems I can work on changes inside VS Code and they will be retained when I compile in HISE. I don't know much about the caching system, so I can't guarantee this will continue to work, or work inside other environments. I am keeping a backup copy of the changes at every step at the moment just to keep an eye on it.
-
RE: Coding in VS Code and HISEposted in Scripting
@d-healey I'm finding that HISE sometimes does take the changes made in VS Code at other times not. At this point in time I have not figured out the conditions which cause this however. I would like to continue editing in VS Code and then check out the changes by compiling in HISE. Seems kind of silly to cut and paste the entire script over to HISE no?
-
Coding in VS Code and HISEposted in Scripting
I am having issues that when I edit .js include files in VS Code, then hit "compile" in HISE, the .js files sometimes revert their changes, and I'm guessing this is from some cached version of the file in HISE which takes precedence. Is there some way to avoid this problem? Is there a setting to change or a workflow to adopt that will keep the changes made to the .js in VS Code?
-
RE: Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
@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.
-
RE: Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
@d-healey Just that if the markdown files for the Documentation on GitHub has mostly blank files, maybe these are useful? Or maybe I am not understanding the purpose of the markdown files on the GitHub site.
-
RE: Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
@d-healey I hope so! That is what I made them from. I just wanted to be able to use the Scripting API in markdown format, but your response makes me think that I am lacking context or missing something obvious?
-
RE: Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
Ok, the uploads doesn't like .md format so I just put it in a text file:
-
RE: Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
@Christoph-Hart I put the Scripting API into markdown files with on file per class. Would that be useful for the Git Docs? Here is an example:
Unlocker
The
LicenseUnlockerwill aid you in managing HISEs keyfile and unlocking system.You can create anUnlockerobject withEngine.createLicenseUnlocker().const var Unlocker = Engine.createLicenseUnlocker();Class methods
canExpire
Checks if the unlocker's license system has an expiration date.
Unlocker.canExpire()checkExpirationData
If the unlocker has an expiration date, it will check it against the RSA encoded time string from the server.
Unlocker.checkExpirationData( String encodedTimeString)checkMuseHub
If you use the MuseHub SDK this will try to activate the plugin using their SDK.
Unlocker.checkMuseHub(var resultCallback)contains
Checks if the string contains the given substring.
Unlocker.contains(String otherString)getLicenseKeyFile
Returns the license key file as File object.
Unlocker.getLicenseKeyFile()getRegisteredMachineId
Returns the machine ID that is encoded into the license file. This does not look in the encrypted blob, but just parses the header string.
Unlocker.getRegisteredMachineId()getUserEmail
Returns the user email that was used for the registration.
Unlocker.getUserEmail()isUnlocked
Checks if the registration went OK.
Unlocker.isUnlocked()isValidKeyFile
Checks if the possibleKeyData might contain a key file.
Unlocker.isValidKeyFile(var possibleKeyData)keyFileExists
Checks whether the key file exists.
Unlocker.keyFileExists()loadKeyFile
This checks if there is a key file and applies it.
Unlocker.loadKeyFile()setProductCheckFunction
Sets a function that performs a product name check and expects to return true or false for a match.
Unlocker.setProductCheckFunction(var f)writeKeyFile
Writes the key data to the location.
Unlocker.writeKeyFile( String keyData) -
Looking into the hise_documentation on GitHub- any reason why a majority of the markdown files are empty for the Scripting API?posted in Documentation
I am wondering what happened with the .md files here.
https://github.com/christophhart/hise_documentation/tree/master/scripting/scripting-api
I am supposing that an automated process to generate the files is leaving most of them blank? -
RE: MIDI Out Deviceposted in General Questions
I would like to know about this as well. To my knowledge I have not seen a commercial MIDI plugin that can route directly to and from MIDI ports/drivers, but I do remember that the two MIDI plugins here called "midiIn" and "midiOut" attempt to do this:
https://github.com/sleiner/pizmidi/tree/main/pizjuce
Some of the plugins are buggy, so I do not know if they work or not.
I think some of the challenge on Windows is that host apps can gain exclusive control over a port, and I know DAWs like Cubase/Nuendo are aggressive in this regard, but there are utilities to multiply port connections (such as MIDI-OX, Virtual Cable or Bidule), and therefore making it possible for multiple hosts to access the same MIDI input/output.
I would love it if you found a way to do this in a plugin. On an app I believe you should just be able to have access to the output ports from any of the MIDI devices as long as it is not in use by another app (I think it is first-come-first-serve in that regard).
-
RE: Scroll Bar/Scroll within a panel?posted in General Questions
@Gab I have tried in the past, but there is one matter prohibiting the implementation: there are no callback events in HISE for the mouse wheel/touch pad scrolling for a panel. The only scrolling I was able to achieve was with making custom point and click scrollbar handles for the panel, but that is very limiting.
-
Is there a way to capture HISE console logs externally?posted in General Questions
I'm wondering if the logs are exposed somewhere for the console prints external to HISE, or if maybe there is a method to do so (by exporting a log file on every compile). Is this a possibility?
-
Selecting a whole block of codeposted in General Questions
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.