External text editor for scripts
-
- Member
- Posts: 1271
External text editor for scripts
I know that creating a good text editor is not a priority, and I have a huge list of requests for improving the existing editor to get it to the point where I would be comfortable using it for more than adding a missing semi-colon to the end of a line. Even that can be frustrating. Is there a space before the semi-colon? I can't tell. Or: Oops, deleted the last character trying to put one in.
The kerning is horrible, you can't use tabs, no support for indentation, position of characters move when color changes, the cursor gets out of synch with the character position periodically, etc, etc.
But in earlier versions of Usine there was tight integration with external editors. Wondering if we could bring that back. I have VSCode set up nicely for Delphi, but I constantly have to copy and paste back and forth.
I'd love the option to never see that text editor window again. Although I guess I will still need it for the object names list...
Edit: Maybe the preference could be just to override the double-click on a script to open it in an external editor, and the button in the script parameter window would still open the built-in editor. Or maybe there could be a separate button in the script parameter window for opening the object list...
The kerning is horrible, you can't use tabs, no support for indentation, position of characters move when color changes, the cursor gets out of synch with the character position periodically, etc, etc.
But in earlier versions of Usine there was tight integration with external editors. Wondering if we could bring that back. I have VSCode set up nicely for Delphi, but I constantly have to copy and paste back and forth.
I'd love the option to never see that text editor window again. Although I guess I will still need it for the object names list...
Edit: Maybe the preference could be just to override the double-click on a script to open it in an external editor, and the button in the script parameter window would still open the built-in editor. Or maybe there could be a separate button in the script parameter window for opening the object list...
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
-
- Member
- Posts: 1271
I think just having a 'RELOAD SCRIPT' button in the editor would go a long ways. Then I can save changes from my editor and just press the 'reload' button. Of course this means that the script needs to keep track of its source file like patches do.
BTW, is there a way to find out what file a patch references, vis-a-vis 'reload patch'? There are times when I've inadvertently got two versions of the same patch in two different folders, and not all versions of the patch in my WKP reference the same file. It would be nice to know what file the patch references.
In fact, a global 'reload all' option for scripts would be amazing. And maybe also for patches and subpatches too. I so often make a fix to a subpatch or a script, and then have to change it in a dozen other different places (easier with the search function, but still a pain...)
BTW, is there a way to find out what file a patch references, vis-a-vis 'reload patch'? There are times when I've inadvertently got two versions of the same patch in two different folders, and not all versions of the patch in my WKP reference the same file. It would be nice to know what file the patch references.
In fact, a global 'reload all' option for scripts would be amazing. And maybe also for patches and subpatches too. I so often make a fix to a subpatch or a script, and then have to change it in a dozen other different places (easier with the search function, but still a pain...)
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Hello,
You're right on many topics, reality is not so simple
Script doesn't refer to a file on your hard disk, it is included inside the patch itself. So, to be able to send to an external editor and to reload, you need to refer to a file.
Then, it leads to issues very quickly, changing anything in the path and everything is broken.
Regarding the idea of a "reference" patch you can modify and apply the modification on all "followers" was study at the office. But it is very tricky. And leads also to many issues.
Reference, or comparisons are under the radar, for sure.
As mentioned before, we working on new object programming capabilities in Usine, far from it's primary goal. Global Arrays and inspector, introduced in HH5 and deeply improved since then were thé first steps. More with break points to read values everywhere in your workspace.
Regards
Sylvain
You're right on many topics, reality is not so simple
Script doesn't refer to a file on your hard disk, it is included inside the patch itself. So, to be able to send to an external editor and to reload, you need to refer to a file.
Then, it leads to issues very quickly, changing anything in the path and everything is broken.
Regarding the idea of a "reference" patch you can modify and apply the modification on all "followers" was study at the office. But it is very tricky. And leads also to many issues.
Reference, or comparisons are under the radar, for sure.
As mentioned before, we working on new object programming capabilities in Usine, far from it's primary goal. Global Arrays and inspector, introduced in HH5 and deeply improved since then were thé first steps. More with break points to read values everywhere in your workspace.
Regards
Sylvain
-
- Member
- Posts: 1271
That all sounds good.
I'm not sure how the issue of Script not referring to a file on disk is a problem to allow reloading. A patch in my wkp is also not on disk, but it does implement a 'reload patch' function. How is that done? I'm just thinking the script could work the same way....
I guess maybe it is simpler because only top level patches can reload? But for the reload to work, the info about 'location last saved to' has to be stored somewhere, right? (or is it 'location last loaded from?? I'm not even sure, which is maybe why reload doesn't always work as I expect.)
Not a big deal, as I now just select 'open script' from the editor and if I sort by date, usually my script is the top item in the folder that opens. Not always, though, so I have to be careful--which means the process can't quite be mentally 'automated'.
But for me it's better than copying and pasting, because the two versions stay the same.
EDIT: even if the editor window itself remembered the most recent path, that would be helpful. It doesn't need to be stored in the wkp at all. The reload button would need to be greyed out, or not shown, when the window is first opened, as the path would be empty, but once the user selected a script from file, it would be enabled. Then it's just 'save' in the external editor, and 'reload' in the script window.
I'm debugging a huge script right now, and it would so streamline things....
I'm not sure how the issue of Script not referring to a file on disk is a problem to allow reloading. A patch in my wkp is also not on disk, but it does implement a 'reload patch' function. How is that done? I'm just thinking the script could work the same way....
I guess maybe it is simpler because only top level patches can reload? But for the reload to work, the info about 'location last saved to' has to be stored somewhere, right? (or is it 'location last loaded from?? I'm not even sure, which is maybe why reload doesn't always work as I expect.)
Not a big deal, as I now just select 'open script' from the editor and if I sort by date, usually my script is the top item in the folder that opens. Not always, though, so I have to be careful--which means the process can't quite be mentally 'automated'.
But for me it's better than copying and pasting, because the two versions stay the same.
EDIT: even if the editor window itself remembered the most recent path, that would be helpful. It doesn't need to be stored in the wkp at all. The reload button would need to be greyed out, or not shown, when the window is first opened, as the path would be empty, but once the user selected a script from file, it would be enabled. Then it's just 'save' in the external editor, and 'reload' in the script window.
I'm debugging a huge script right now, and it would so streamline things....
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
did you try the 'include' directive ?
{$include C:\Users\senso\Desktop\test.fastscript}
{$include C:\Users\senso\Desktop\test.fastscript}
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
- Member
- Posts: 1271
I had no clue.
That's great!!
Can you reference the application path, or does it have to be hard coded?
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
in the next major release the INCLUDE directive will search the file inside the package of the current Usine application. If it is not found, it will ask to locate the missing file.
Olivier Sens
www.brainmodular.com
www.brainmodular.com