HISE Logo Forum
    • Categories
    • Register
    • Login

    HISEScript-Sublime

    Scheduled Pinned Locked Moved Presets / Scripts / Ideas
    19 Posts 7 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Christoph HartC
      Christoph Hart
      last edited by Christoph Hart

      Awesome work! I've put quite some effort into making HISE a somewhat decent IDE for scripting (so in Sublime you won't ever get live info like current variable values or context dependent autocompletes for method objects etc.), however there is something with Sublime Text that feels just better than any text editor I've ever worked with, so I'll definitely check it at some point. Also a big plus for calling it HISEScript - I might choose this name over "Javascript" at some point in the future to prevent false expectations.

      A few remarks:

      1. Have you added all custom "HISEScript" additions?
      
      // includes
      include("MyFile.js");
      
      // globals
      global x = 25.0;
      
      // namespaces
      namespace MyButton
      {
      
      }
      
      // local variables
      function onNoteOn()
      {
          local x = Message.getNoteNumber();
      }
      
      1. In the autocompletion in HISE you get a few function prototypes already typed out for you. For example if you type Panel.se, press Escape, choose the paint routine you will get:
      Panel1.setPaintRoutine(function(g)
      {
      	
      });
      

      Is that possible with Sublime Text (I know Visual Assist has a "Snippet" feature which allows you to automatically add boilerplate templates with shortcuts).

      1. If you press Shift + Return, you also get a semicolon at the end of the line in HISE :)

      PS: Oh and don't worry about the headers getting changed. The scripting API is supposed to be 100% backwards compatible - once in a while I introduce "breaking changes" like disallowing anonymous variable definitions because it's the root of 55% of all evilness), but I'll never rename Content.addKnob() to UI.addSlider() or something :)

      LevitanusL 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart
        last edited by

        Oh and by the way: the API documentation inside HISE is generated using the XML output from doxygen. A doxyfile that only processes the scripting API files is available here:

        HISE Root/tools/api generator/xml.doxyfile
        

        (there's also a batch script that copies the most relevant output files, which also contains some useful information).

        If you switch to parsing this output, you might be on the 100% safe side as it's the exact same way I am generating the inbuilt documentation.

        1 Reply Last reply Reply Quote 1
        • LevitanusL
          Levitanus @Christoph Hart
          last edited by Levitanus

          @christoph-hart said in HISEScript-Sublime:

          Have you added all custom "HISEScript" additions?

          only namespaces, I'll add today later, thanks)
          The main problem in additions is fact, that I have been attached too much to various code formatting tools. And one night is not enough for modifying JS beautifier. Quick additions have not worked...

          What about g.methods, they are available as GraphincsObject class methods.
          And, yep, you're absolutely right, that there are not any static analyzer. Nor yet, nor in closest future. I've spent yet a half of year on one static analyzer, that nobody is using :D

          But if methods are used after the dot, the class name is not used:
          0_1543237379672_hise-scopes.gif

          @christoph-hart said in HISEScript-Sublime:

          HISE is generated using the XML output from doxygen

          Thanks, once my regexps are broken, I'll get one more try to handle this xml))
          Shame, but I'm totally incompetent in cpp. Looked long to Your generator's code, then tried to parse headers by GCCXML, then returned to the original idea of stupid tokenization :)

          Resume:
          I'll maintain it for a while during tasks of the first HISE project – later will look to what can be done)

          1 Reply Last reply Reply Quote 0
          • LevitanusL
            Levitanus
            last edited by

            @christoph-hart , Can you, when you have time, provide the list of such "snippets", or, at least, of those, which are not obvious?

            I'm making some, like custom callback definition and external js mandatory callbacks, but I'm a newbie in HISE, so, definitely, will lose things.

            0_1543355620654_2018-11-28_04-52-59.png

            Also, downloaded doxygen and tried it. Cool!) But I'll get to it only when the current system broke, cause it requires to be generated on server-side, and now user can just specify hise folder...

            (isn't updated yet. maybe, closer to morning)

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              From the top of my head (with decrasing importance):

              • all ScriptPanel callbacks that accept a function as parameter. Check the autocomplete popup for this.
              • the custom callback for a UI component (you can create these already with the context menu of a UI component, but still useful for a more Sublime focused workflow)
              • script definitions (for both modules and UI components).
              • the ScriptPanel.setPopupData / FloatingTile.setContent methods which take a JSON object as argument (You can already add the default FloatingTile properties like Type and ColourData).
              1 Reply Last reply Reply Quote 1
              • LevitanusL
                Levitanus
                last edited by

                Christoph, thanks!

                updated:

                added:

                • namespaces
                • locals
                • snippets:
                  • callbacks mandatory
                  • callback of control
                  • include
                • setting "hise_supress_completions": false
                • Math, Array, String objects now parsed from source

                changed:

                • Now syntax is copy of standart Javascript with additions to native scopes, not just added scopes.
                1 Reply Last reply Reply Quote 1
                • Dominik MayerD
                  Dominik Mayer
                  last edited by

                  hey levitanus,

                  I tried to install your HISEScript Package but couldn't find the HISEScript entry in the syntax view, after making sure that the HISE path was set up right.

                  btw: renaming the package-folder to HISEScriptand mentioning the specific Package Settings > HISEScript > Settings - User could also help the user in the install procedure.

                  Thanks a lot for this project! Looking forward to using it.
                  best, d

                  LevitanusL 2 Replies Last reply Reply Quote 1
                  • LevitanusL
                    Levitanus @Dominik Mayer
                    last edited by

                    @dominik-mayer 0_1543425497540_hisescrit location.gif
                    Pity, but now I can't tell more. Will try to install it from the laptop at morning and, maybe on ubuntu.
                    I think it can be, from one hand too high in the folder structure, or too low. But maybe other problems. Maybe, something wrong with paths, getting by the script. But, generally, the syntax has to appear just with pasting it in the right place...

                    1 Reply Last reply Reply Quote 0
                    • LevitanusL
                      Levitanus @Dominik Mayer
                      last edited by Levitanus

                      @dominik-mayer said in HISEScript-Sublime:

                      package-folder to HISEScript

                      Generally, it has to be. But I afraid of other repositories with the same name. So... I hope, when I get to package control, it will be much easier.

                      @dominik-mayer said in HISEScript-Sublime:

                      Package Settings > HISEScript > Settings - User

                      They are mentioned in the install guide on GitHub. Or not quite? ))

                      1 Reply Last reply Reply Quote 0
                      • LevitanusL
                        Levitanus
                        last edited by Levitanus

                        12 days waiting of review to package control...
                        Anyone has posted packages there yet? How long does it take?

                        Still, have not touch any Prettier script to adopt for using with HISE syntax... Too much of proprietary work... Hope... Hope, there will be a couple of months to do what I endeavor.

                        1 Reply Last reply Reply Quote 0
                        • Dan KorneffD
                          Dan Korneff
                          last edited by

                          Wish I was advanced enough to give it a try

                          Dan Korneff - Producer / Mixer / Audio Nerd

                          1 Reply Last reply Reply Quote 0
                          • LevitanusL
                            Levitanus
                            last edited by

                            Finally, available via PackageControl:
                            2019-01-10_07-01-28.png

                            d.healeyD ossian1961O 2 Replies Last reply Reply Quote 6
                            • d.healeyD
                              d.healey @Levitanus
                              last edited by

                              @Levitanus Good work! Now make the same for Atom :p

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

                              1 Reply Last reply Reply Quote 0
                              • ossian1961O
                                ossian1961 @Levitanus
                                last edited by

                                @Levitanus Gotcha! Thank you :)

                                https://www.kontakthub.com/label/Imagik-Sound/
                                https://mirtklaar.bandcamp.com/

                                1 Reply Last reply Reply Quote 0
                                • lalalandsynthL
                                  lalalandsynth
                                  last edited by

                                  Is this outdated , cannot find it via package control ?

                                  https://lalalandaudio.com/

                                  https://lalalandsynth.com/

                                  https://www.facebook.com/lalalandsynth

                                  https://www.facebook.com/lalalandsynth

                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @lalalandsynth
                                    last edited by d.healey

                                    @lalalandsynth Just download it from the github page he linked. It is definitely outdated because HISE has had lots of additions since this ST package was updated.

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

                                    1 Reply Last reply Reply Quote 0
                                    • lalalandsynthL
                                      lalalandsynth
                                      last edited by

                                      ok, if its outdated , guess I will leave it for now.

                                      https://lalalandaudio.com/

                                      https://lalalandsynth.com/

                                      https://www.facebook.com/lalalandsynth

                                      https://www.facebook.com/lalalandsynth

                                      1 Reply Last reply Reply Quote 0
                                      • LevitanusL
                                        Levitanus
                                        last edited by

                                        Actually, The package itself is designed to be always up to date by parsing the current HISE git folder.
                                        But, since I didn't look to the HISE folders\API structure for a while (I just can't find any commit that compiles on my machine), It can leak some API calls.
                                        Still, the package present in packagecontorl.io and you can try it.

                                        1 Reply Last reply Reply Quote 1
                                        • First post
                                          Last post

                                        16

                                        Online

                                        1.7k

                                        Users

                                        11.8k

                                        Topics

                                        102.4k

                                        Posts