HISE Logo Forum
    • Categories
    • Register
    • Login

    Expansion User Presets

    Scheduled Pinned Locked Moved C++ Development
    60 Posts 5 Posters 4.2k 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

      I am using this batch script that runs doxygen over the scripting Cpp files and converts the XML output to a ValueTree that will be embedded into HISE.

      It's only available for Windows (where I do the bulk of development) though

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

        @Christoph-Hart Shall I make a pull request once I've finished tinkering and tested everything? Then it will be picked up next time you run your script.

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

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

          Seems that Engine.getExpansionList(); doesn't work if callbacks are deferred, what is the reason for this?

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

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

            False alarm, it seems that it's just being weird and complaining sometimes when I open the project. If I can pin it down to something specific I shall let you know.

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

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

              It might be possible that ExpansionHandler::createAvailableExpansions() is being executed after the deferred script execution.

              What you could do is to add some logging code to this function as well as to the script function wrapper around the getNumExpansion() function to see in which order they are executed and if this varies if the scripting callback is busy with a complex onInit function (btw, I saw you using std::cout, but the JUCE way for logging stuff is the DBG macro).

              d.healeyD 1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey @Christoph Hart
                last edited by

                @Christoph-Hart Ok cool, I'll run some tests.

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

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

                  Do expansion sample maps need to be loaded in a special way?

                  Inside my HISE project it seems to find them just fine but when I run the exported application I'm getting errors

                  WARNING: Not found: {EXP::Kazbek}duduk_staccato.xml
                  JUCE Assertion failure in ExternalFilePool.h:1124
                  JUCE Assertion failure in ModulatorSamplerData.cpp:762
                  

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

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

                    @Christoph-Hart said in Expansion User Presets:

                    It might be possible that ExpansionHandler::createAvailableExpansions() is being executed after the deferred script execution.

                    I did some simple tests and it seems that everything is fine, I also haven't noticed the problem in my project happening again so I think it was some mistake I was making.

                    Get list always seems to be called after create available :)

                    CREATE AVAILABLE EXPANSIONS
                    GET LIST OF EXPANSIONS
                    GET LIST OF EXPANSIONS
                    Resizing interface
                    Change scale factor
                    GET LIST OF EXPANSIONS
                    

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

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

                      I think I might have solved the samplemap thing.

                      I was loading the sample map as {EXP::Kazbek}duduk_staccato.xml in my script. But it seems that I only need duduk_staccato.xml and HISE automatically works out that it's a sample map that belongs to the active expansion and fills in the rest.

                      So in my HISE project I need to specify the full sample map name but when I export I don't need to.

                      There's still some other funny stuff going on in my exported app but at least I seem to have figured out this one :)

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

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

                        So in my HISE project I need to specify the full sample map name but when I export I don't need to.

                        Well that's bad. You definitely shouldn't branch the script logic whether you're in HISE or in the compiled plugin. I'll take a look why it doesn't work.

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

                          Also it seems I was premature when I said my test show everything as fine. I've now tested it with my larger project (probably should have done that before) and the scripts are being called before create expansions. I'll look into this some more.

                          This is the same with deferred callbacks enabled or disabled (which makes sense I guess since it's the init and control callbacks).

                          Compiling all scripts
                          Unknown function 'loadDataFile'
                          This expression is not a function!
                          no iterable type
                          Adding plugin parameters
                          Restoring global settings
                          Setting disk mode
                          Samples are validated. Skipping reference check
                          Loading samples
                          CREATE AVAILABLE EXPANSIONS
                          

                          Edit: Actually the get list function is being called first. I'll shut up now until I figure this out :p

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

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

                            Ok, after lots of poking around and head-scratching, I figured it out (as you thought) createAvailableExpansions() isn't being called until after getExpansionList(). So what I've done is put a call to rebuildExpansions(); inside the expansion handler constructor, do you think it would be more appropriate/better to call it from the getExpansionList() function, or somewhere else?

                            The other piece of the puzzle was I had HISE_ENABLE_EXPANSIONS=1 but not HI_ENABLE_EXPANSION_EDITING. So the Helpers::isValidExpansion was returning false. I've modified this to check for file based expansions as well as encrypted without needing editing enabled. Let me know if there is a better way to handle this too.

                            Also now I got around this issue I noticed my sample maps weren't loading again :( so I reverted to the previous format and it works, so not sure what was going on before but the correct format both in HISE and the exported app is "{EXP::" + expansionName + "}" + sampleMap + ".xml"

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

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

                              I've created a pull request. I noticed that my text editor seems to have saved every blank line as a change which unfortunately clogs up the changelog a bit :( I'm assuming this is due to the line ending difference between Windows and GNU/Linux so next time I make edits I'll switch to Windows style line endings and see if that solves it.

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

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

                                Yeah I try to figure out how to show the actual diffs, because I can‘t check in stuff into the precious codebase without reviewing it ;)

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

                                  Not sure if you noticed, but I merged the request and ran the API generator over it so you can use your script functions now in the "official" branch.

                                  d.healeyD 1 Reply Last reply Reply Quote 1
                                  • d.healeyD
                                    d.healey @Christoph Hart
                                    last edited by

                                    @Christoph-Hart Oh excellent, I noticed the merge but forgot about the API generator :) I shall rebuild.

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

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

                                      Almost have my player plugin working, abusing the expansion system to the fullest!

                                      Peek 2019-09-26 22-13.gif

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

                                      C DalartD 2 Replies Last reply Reply Quote 6
                                      • C
                                        coreyu21 @d.healey
                                        last edited by

                                        I’m having trouble inheriting the presetbrowser class from the expansion handler(to show the updated user presets from the expansion folder) Would somebody be willing to help me in the right direction. Thank you lots!

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

                                          This is in the scriptnode branch, no need to tinker with the C++

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

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            arminh
                                            last edited by

                                            Im waiting for tutorial tutorial :D

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

                                            15

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.6k

                                            Posts