Old 07-22-2021, 06:03 AM   #1
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 453
Default Anyway to build a dynamic JSFX on the fly?

Hello again guys.


So I've just been wondering what the limits are to JSFX. I'm aware that JSFX are files but am wondering about the possibility of creating one on the fly. I suppose this can't be created in memory from a ReaScript and then loaded up?


I know a file could be created if possible, to fully customise a JSFX, by stringing it together then writing it to the JSFX folder. But that looks a bit dirty.


Why am I asking? Well I'm thinking of a few reasons. First, foreign language support, I'm not aware of any way for JSFX to support languages other than English as all text and labels are hard coded in one file from what I can see. If someone wanted to support multiple languages would they need to duplicate the JSFX and change all the labels?


Aside from ReaPack I haven't seen any standard way to install them either. I know a file is simple, or folder, if you copy it to the right place, But you still need to open the resource folder and make sure to put it in the right place. So if you had a few different versions depending on language it still needs manual intervention as opposed to a simple installer.


Next up is labels. I don't see a way to read labels from a string or change them in any way. I know you can hide them but from what I can tell they must be preset and can't be changed at will. I see you can define a file somehow which can be selected but again with preset label.


What I did find is that defaults to sliders can be set by resetting them. So at least they can be preloaded. If they need to be loaded from elsewhere. :-D
Hypex is offline   Reply With Quote
Old 07-26-2021, 05:34 PM   #2
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 1,643
Default

Your assessment is largely correct.

For multiple language support, I assume the main issue is labelling of sliders etc? One option is to have a slider to select the language. This would work best if you had the UI in the graphics area rather than using the default sliders. This requires a lot more coding, but it would give you the option of selecting the label text to suit the language. From reaper version 6.30, it is supposed to be possible to show and hide the default sliders, so you could have multiple versions of default sliders, which you would toggle on or off depending on the language. However, I have tried the show/hide slider thing and, to be honest, I couldn't get it to work The other issue is that you are limited to 64 sliders, which may limit the number of languages you could support. If you create your own sliders in the graphics area, you can have as many sliders or language options as you like.
__________________
Mal, aka The Wasters of Time
Mal's JSFX: ReaRack2 Modular Synth

Last edited by Time Waster; 07-26-2021 at 05:44 PM.
Time Waster is offline   Reply With Quote
Old 07-27-2021, 02:52 AM   #3
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 453
Default

Thanks for your reply. Yes one issue I see is labelling of sliders.


I suppose a slider could be used to select language though it's not automated. But then will the info be lost after? However, I expect language to be something Reaper knows or set elsewhere, so a script can simply look it up without asking the user, Though for JSFX it's more limited what it can look up so a preset variable might be best.


Apart from customising the interface each language could have it's own file. But then this just wastes space of repeating code. And there no installer system apart from ReaPack. By comparison Linux installers that must support different languages list them all one block for each message. Another way is a language file that holds them all except for built in English.


I tried to use the new show function but my IDE complained. Must be my now old 6.23 version. But I could hide a slider by putting a dash in front of the label. And inside a jsfx I could set an unused slider to a value. Looks useful.
Hypex is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.