@d-healey yes. The project needs at least one expansion.
Posts made by CyberGen
-
RE: Console.blink() not blinking?
-
RE: Console.blink() not blinking?
@d-healey in regards to the scripts-disconnected issue, I was able to trace it down to a Engine.setCurrentExpansion() call. It seems that when this is called, it moves all user scripts into a "user" submenu and then the scripts show as disconnected.
Can you please help me confirm this?
-
Add the code below to an external script file like the on in the post above.
-
Uncomment:
//Engine.setCurrentExpansion(expNames[0]);
-
Hit F5.
-
Your script menu should now have a "user" stack and the script should appear disconnected.
const expHandler = Engine.createExpansionHandler(); const expList = expHandler.getExpansionList(); const expNames = []; //Set Default Expansion inline function setDefaultExpansion() { for (e = 0; e < expList.length; e++) { local p = expList[e].getProperties(); local n = p.Name; expNames.push(n); } //Engine.setCurrentExpansion(expNames[0]); // this can also be: // expHandler.setCurrentExpansion(expNames[0]); }; setDefaultExpansion();
-
-
RE: Console.blink() not blinking?
@d-healey @CyberGen said in Console.blink() not blinking?:
I haven't been able to reproduce it.
I take that back... I wasn't doing it correctly... I can reproduce it now.
simple test
Content.makeFrontInterface(600, 600); Console.clear(); Console.blink(); Console.print("do you see me?"); //Move this to external file. Console.clear(); Console.blink(); Console.print("do you see me?");
HiseSnippet 687.3ocsUssSaCDDc2PLpw8hJR8CvhmBRHHokBUpO.kboJpMPTCE02PKqmPVk06ZsdMknp9O2+f1YsCXmRDWhZ8CQYtb183YNy3AFMGRRzFBs1ISiAB8YdCmpriaMlITjdsIzW30mkXASPtqCmFyRRfPBktxGcNn0pRxd909GxjLEGJbQHmpEb3yhHgsv6fC9jPJ6xBgSDQkxdmC5w0pVZoNE4yJdMHwL9D1EvQLWZU7HzU6DJrZyPKyBIXNGpCmNbr96p77OUjHNWBNiljg3Ak6lzZrPFN3520DBgVcPwa9J4u4uxquHTbi+hJvKyBDTfnbMfV4tnTyGAknknT0bJsl2PtQDaKh33yS85ovFxHFVpKSk7bIUtf50RiYnraEwl.cMnwMHpuaiFaFf+rw688wzRzRXKtDXl5nmqcbtTnlT1QrQnr0WOTGLUmFj.PPDr+5tyve6s6quDBriEIAVc.bEdSJlLXj.w8O3JFkp3VgVEnUGosvwp5a3+C+Z9+zO3uCMZzBi4pFFsTBlEF1oBM2Ev5pznyAylAWxjovMIhso468q9v5877lSoD0pdJg83XXlcWsLz0Sc++1JExrtK9uu1qMyxbhmY9v7hAiU3nCsMbIN8kKkp40FRlX0w372szYnBWGlJY14k8t46YAv5wbZMmdRkHrSKO++HlEZbmyBOTJtl2.gkOdwbrxB3HVo9evwYaPdtWmQi.tsffU859skccw8b8eQmZEpK5yrFwUDp2QoQCwEmb.uckBj3g6Qq3TK41Mb1tJvPPElY7a7YVvlNa5rfMuNHIhwM5y34SAtcTOIyCxIU1J4Z32FP6fljrIix04Hbk4Yb97G0s.95kE3aVVf6rr.e6xBb2kE3dKKv2c+.ceQ6CoVcT9XCgzePmrUITZGECUfYpUxePQoUzR
-
RE: Console.blink() not blinking?
@d-healey I haven't been able to reproduce it. I started from a clean project. But I can't get user files to stack in the way the are show in the gif.... Somehow this is al related to the user/docu/etc stack and this particular project.
-
RE: Console.blink() not blinking?
@d-healey Check out the gif below. I start out in "onInit" with a blink and a print and it works. I switch to my arp.js page, and not only does it not blink or screen print, when I hit F5 it switches the combo box to show the script editor as disconnected. This happens with all other user scripts.
What could be causing this?
-
RE: Console.blink() not blinking?
@d-healey no, it's not that. Things are working beyond the blinking point, and I moved it to the top for testing.
I just noticed that it works when I'm working on the onInit script but it does not work on any of the includes scripts. Weird. -
RE: Console.blink() not blinking?
@clevername27 great alternative when you need a debug hint and you don't need to print out something. But it stopped working for me. Along with the green mini printout that shows up next to the actual line of code.
Anyone one else missing these debug tools?
I'm using version 4.
-
Console.blink() not blinking?
Hi,
I fear I may have turned something off.
For some reason Console.blink is not doing it's thing. And Console.print() does not display the green mini print-out next to the code. Only prints inside the debug console.
Is there a setting to turn these things off that I might have inadvertently changed?
-
RE: How to Reset LFO to Start via script?
@CyberGen fortuitously discovered that setting the ignoreNoteOn to 1 acts as a reset signal. Whenever triggered, the LFO goes back to the start of it's cycle without having to play a note. You might sometimes need to set it back to 0 immediately (depending on what's required of the LFO) but it's a good workaround.
-
LFO current way point. --- .get and .set.
Hello,
A feature request, if I may.
Current Way Point (0-1): It would awesome to have access to the LFO's current position in its oscillation cycle. For lack of a better term, I'm going to call it wayPoint. A normalized value 0-1, where 0 represents the start of the oscillation and 1 represents the end, It would allow tracking for customizable visual feedback for the user.
Currently the only way I've found to get around this, is to create a "paired" LFO in saw mode, which runs parallel to the "real" LFO at all times. This trick gets me that 0 -1 position. Needless to say, It's not a great solution, as they fall out of sync from time to time not to mention doubling all my LFOs just for this functionality.
Equally useful would be to have the ability to set the position of the LFO to any point of its oscillation cycle, without playing synth notes or using ignoreNoteOn . This can be used in many ways, including customized step sequencing , multiple LFO syncing, rhythmic sound shaping, etc.
That's all I got.
Thanks for considering it.
-
How to Reset LFO to Start via script?
Hi,
I need a way to reset an LFO to the starting point of its oscillation, no matter where in the cycle it currently is. Ideally, I would like to do this via a script or control without relying on IgnoreNoteOn.
I was going to request it as a feature, but Iβm wondering if thereβs already a way to force it back to its initial phase position. My goal is to achieve a clean LFO reset without affecting the rest of the synth or triggering unwanted sound events.
I had posted about this a long time ago, but I can't find the post now.
Has anyone managed to solve this issue or found a workaround to reliably reset the LFO in this manner?
Any insights or suggestions would be greatly appreciated!
Thanks!
-
RE: Access to Tablemode Viewport Component values
@Soundavid Hi,
I'm using the table mode in a similar way, and I was wondering if it's possible to change the button's text with a callback (not in the onInit).
For example, in your table, could you change the text of some buttons in your 'MIDI Learn' column to say 'Unlearn' if certain conditions are met? Or, once I set the text in the onInit, am I pretty much committed to it? -
Password to ************
Hi yall,
I'm wondering if there is a way to easily mask a password input label with asterisks as the user types them in. Any suggestions? -
RE: WP License Manager / JWT Authorization - HELP?
@CyberGen A list of License Manager API endpoints. Might be useful for those using the License Manager API.
Base Endpoint:
/wclm/v3
Methods: GET
Description: Base route for the wclm/v3 namespace.
Verify License:
/wclm/v3/verify
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for verifying a license.
Activate License:
/wclm/v3/activate
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for activating a license.
Deactivate License:
/wclm/v3/deactivate
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for deactivating a license.
Get License Details:
/wclm/v3/get-license-details
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for retrieving the details of a license.
Get Product API Meta:
/wclm/v3/get-product-api-meta
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for retrieving product API metadata.
Get License Status:
/wclm/v3/get-license-status
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for retrieving the status of a license.
Get Current User Licenses:
/wclm/v3/get-current-user-licenses
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for retrieving licenses associated with the current user.
Register License Key:
/wclm/v3/register-license-key
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for registering a new license key.
Set License Status:
/wclm/v3/set-license-status
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for setting the status of a license.
Create License Key:
/wclm/v3/create-license-key
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for creating a new license key.
Update License Key:
/wclm/v3/update-license-key
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for updating an existing license key.
Delete License Key:
/wclm/v3/delete-license-key
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for deleting a license key.
Add License Key Meta:
/wclm/v3/add-license-key-meta
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for adding metadata to a license key.
Update License Key Meta:
/wclm/v3/update-license-key-meta
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for updating metadata associated with a license key.
Delete License Key Meta:
/wclm/v3/delete-license-key-meta
Methods: GET, POST, PUT, PATCH, DELETE
Description: Endpoint for deleting metadata associated with a license key. -
RE: WP License Manager / JWT Authorization - HELP?
I leave this here cuz, nobody ELSE should spend a week of their lives figuring this out.
The code below works for me doing the following.
User Authentication:
Set up credentials for JWT token generation and sent a POST request to the /wp-json/jwt-auth/v1/token endpoint to authenticate and receive a JWT.Token Handling:
The received JWT is used for subsequent requests to ensure each request is authenticated.Token Validation:
The token is validated by sending it back to the server, ensuring it's valid and active before proceeding with any sensitive operations.License Activation:
Post-token validation, we proceed to activate the license using the license key and other necessary details, which are then verified by the server.// Server Address Server.setBaseURL("https://yourserver.com"); // Credentials for authentication const var credentials = { "username": "you@yourserver.com", "password": "yourpassword" } // Relevant references const var authUrl = "/wp-json/jwt-auth/v1/token"; const var validateUrl = "/wp-json/jwt-auth/v1/token/validate"; const var activateUrl = "/wp-json/wclm/v3/activate"; reg jwtToken = ""; // Some debug stuff Console.clear(); if (Server.isOnline()) Console.print("Server is Online!" + "\n"); Console.print("Authorization URL: " + authUrl); Console.print("Validate URL: " + validateUrl); Console.print("Activate URL: " + activateUrl + "\n"); // Authenticate and retrieve token inline function authenticateUser() { Console.print("Starting authentication process..."); Server.callWithPOST(authUrl, credentials, printResponse); }; inline function printResponse(status, response) { Console.print("Received response: " + JSON.stringify(response)); if (response.token != "") { jwtToken = response.token; validateToken(); } else { Console.print("Authentication failed: " + response.message); } }; // Validate the JWT token inline function validateToken() { Console.print("atempting to validate"); if (jwtToken != "") { Server.setHttpHeader("Authorization: Bearer " + jwtToken); Server.callWithPOST(validateUrl, {}, function(status, response) { Console.print("Validation response: " + JSON.stringify(response)); if (response.code == "jwt_auth_valid_token") { Console.print("Token is valid!"); activateLicense(); } else { Console.print("Token validation failed: " + response.message); } }); } else { Console.print("No JWT token found."); } } // License activation details const var licenseData = { "license_key": "your-prod-key-lic" }; // Activate the license inline function activateLicense() { Console.print("Starting license activation..." + licenseData.license_key); // Set the Authorization header with the JWT token Server.setHttpHeader("Authorization: Bearer " + jwtToken); // Send the POST request to activate the license Server.callWithPOST(activateUrl, licenseData, handleActivationResponse); }; // Function to handle the response from license activation inline function handleActivationResponse(status, response) { Console.print(response.signature); if (response["response"]["result"] == "success") { Console.print(response["response"]["message"] + "!"); } else { Console.print(response["response"]["message"] + "!"); } }; // Example: Trigger authentication when a button is clicked inline function onButton1Control(component, value) { if (value) authenticateUser(); } Content.getComponent("Button1").setControlCallback(onButton1Control);
-
RE: WP License Manager / JWT Authorization - HELP?
This worked for me.
- Generate an RSA Key Pair
Open a terminal or command prompt.
Run the following command to generate a private key:
openssl genrsa -out private.pem 2048
Extract the public key from the private key:
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
- View the Keys
If you want to see what your generated keys look like, you can display them using the cat command:
cat private.pem cat public.pem
- When setting the private key in WP License Manager API include:
-----BEGIN RSA PRIVATE KEY-----
and
-----END RSA PRIVATE KEY-----
That should take care of it.
- Generate an RSA Key Pair
-
RE: WP License Manager / JWT Authorization - HELP?
@CyberGen @d-healey @orange @Dan-Korneff
Hi again fellas,
I've got things to work almost all the way. I will share the final code for future reference when the final issue is resolved. So far, the token is downloading properly and validation is working. License activation works but, the signature is still giving me trouble.
If I don't set a private key in the license manager API page, HISE's console gives me: "signature": "private key not set". But if set a key made with HISE's RSA key generator, it gives me: "signature": "error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length"
I tried different private key configs and algo configs, same result. Can someone share the proper settings for the License Manager API private key? Or the right length? or an app the generates the right format of key?