HISE Logo Forum
    • Categories
    • Register
    • Login

    inline function

    Scheduled Pinned Locked Moved General Questions
    30 Posts 4 Posters 1.0k 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.
    • MikeBM
      MikeB @d.healey
      last edited by MikeB

      @d-healey

      Of course

      This is the result without the comments!

      Bildschirmfoto 2022-11-13 um 15.37.36.png

      "One hour of trial and error can save 10 minutes of reading the manual."
      "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
      HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

      d.healeyD MikeBM 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @MikeB
        last edited by

        @MikeB That error implies that presetFile is not what you think it is.

        Use if (presetFile.length > 0) before trying to load it to make sure a preset file has actually been found. Also if you only want a single file and you know the name of the file why not use .getChildFile() instead of findFiles?

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

        MikeBM LindonL 2 Replies Last reply Reply Quote 0
        • MikeBM
          MikeB @MikeB
          last edited by

          It is supposed to be a simple preset browser with no frills.

          There are no examples except this one and it doesn't work anymore and HISE hangs on it all the time in the latest version.

          Now the professionals in HISE programming have looked at this and have not come up with a solution.

          How is a novice programmer supposed to achieve anything here?

          Everyone here says - very simple, build your own sequencer or your own preset browser if it doesn't work the way you want.

          Actually, I just want my arpeggiator not to stop running when I change presets. That's all.

          SOLUTION: own sequencer (there is no description whatsoever, let alone a snippet)
          SOLUTION: own preset browser - there is this one snippet - which no longer works today.

          Translated with www.DeepL.com/Translator (free version)

          "One hour of trial and error can save 10 minutes of reading the manual."
          "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
          HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @MikeB
            last edited by

            @MikeB here:

            HiseSnippet 3271.3oc2as0baabEFTRnSD8kX63IsOzoyNZ5zRUqvPPQIRFOol5Zrh0EVSYG2llXCArjbi.wh.rTxLYxz7So+E5a8sleB8mPdou6+AsmcA.whaTvrIoIkiMGu6d1y46bYOmCVB20kZf87ntJkV9zINXkRWWs2Da1vcFpSrUNXWkR2QsqK1Cy11kdoG1840zT1dhitmG1ToToE+.NckVdIEwmW8fs0szsMvQSon7TJw.eHYDgEMa2NOhXYsutI9TxHIpaz4.Cp8NTK5X.SKpVSwQ23b8A3i04jsfpRoe1dlDF0sGSmg8TJsz1TyI8FRuz1m9mR7HmYg4CzT5ALxe58oVlbDymUYmgDKytg5tmhRI0tQVhE8sD2U8HhIY57QVjaIV.EsCY6QoEhCuEiAOMY3USBdY.oEjfzR9P51p8LbINrnU334ZpGXyvt80AytLT7oUYgEti5NTfBaV0Q5mi22EFLcGU1rVs0PaTq1p2ub428cQbJcoVdHFEcFF4oeA1DQrQNhffxfywigtP2E0yhXbN7kI1E89nPAL.y1gNxgZCCprhDMq.7OZyai0GyH8Gas8XFiZmKCRPGmIBTtKtOwF6gzsrPFgHV21DY.ybFDw3g5ScC.M5L+P2x1PLjGDOgQwBoQeYYD7IBc9qdHAFlGvhHgiI91ilopGmTAn1I.NUn1QqGrVv9RHadnhOohH1YXaSPXHNRNe1nIIUyFSPPfOw4ilojLEGSmIGDLc8BJ6SbXDX5B.g.JCQRVL6TByBW.VInKMi7WjmS5TJm3qHNIhvUxWKO47YhmSNW1xdx44aUO47HKZFxYGd9YqYJKeRjkm+L4KS+0yvSl0WNTmwVP5wniDUj2Bb9ta.EdgGguffuzg5Bmkmf5iYFCI1CDm96S.+n3fMOKEaHF8D3HcPzpIwEa.IimH3Kw1BRZf5O11fGejILBxEv+XQgjIAx+Xg.d+.+9CgLMVvIKAPh7vdgZQ5zAUVgvvi7VYMY9U8ynD6Jq7mgzZAa7qhLBIAaFIPpXD50VCbtViwoQuPp.tmRI2YG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pZsp0TFAY3dtgA2D+NPByr2S84XOqOG6owbrmMli8r4brmlywdZMy8vKtr0XFcj+QNXht6I9EnKUx+4QEQ5J+G.obBkgB
            

            Theres a ton of debugging statements in there to show you how to find out what went wrong for your self - maybe try and follow this approach -

            This fixes one and one only of your callbacks so it works - you will need to go through all the others working out what gets sent in and what comes out...

            HISE Development for hire.
            www.channelrobot.com

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

              @d-healey

              There is a preset file with the following content!

              Bildschirmfoto 2022-11-13 um 15.51.53.png

              "One hour of trial and error can save 10 minutes of reading the manual."
              "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
              HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

                @d-healey said in inline function:

                @MikeB That error implies that presetFile is not what you think it is.

                Use if (presetFile.length > 0) before trying to load it to make sure a preset file has actually been found. Also if you only want a single file and you know the name of the file why not use .getChildFile() instead of findFiles?

                it isnt because you cant say this apparently:

                local presetFile = FileSystem.findFiles(getPresetFolder(),presetName + ".preset", true);
                

                instead you have to say this:

                local tempName = presetName + ".preset";
                local presetFile = FileSystem.findFiles(getPresetFolder(), tempName, true);
                

                HISE Development for hire.
                www.channelrobot.com

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

                  I just tried loading the snippet Lindon posted and it seems to work just fine on my system.

                  You need to add more checking statements to validate that the data you are expecting at each stage is actually returned. Currently the script has no checks and just assumes that all data will be there and will be correct.

                  Peek 2022-11-13 15-05.gif

                  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 @Lindon
                    last edited by

                    @Lindon Working here with local presetFile = FileSystem.findFiles(getPresetFolder(),presetName + ".preset", true);

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

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

                      @d-healey -yeah well that was essentially the line I changed to get a file back - then passed the file back into his function and loadAsObject() there... and as you say it now works.

                      @MikeB - what David and I are both saying is in order to proceed and improve you will need to learn how to debug your own work - theres plenty of examples in the snippet I posted above to get you on the right track.

                      AND: you need to type check/safety check your calls - make sure you are getting back the object type and values you think you are... As you will see that roughly all I am doing in the snippet I posted : checking what has arrived and what is in variables at each step along the way...until I track down what the problem is.

                      HISE Development for hire.
                      www.channelrobot.com

                      MikeBM 1 Reply Last reply Reply Quote 0
                      • MikeBM
                        MikeB @Lindon
                        last edited by

                        @Lindon @d-healey

                        Thanks a lot guys,

                        I've got to call it a day. HISE keeps crashing.

                        giphy.gif

                        I will work on it intensively over the next few days.
                        Have a nice Sunday evening
                        (I think it's already Monday for Lindon)

                        "One hour of trial and error can save 10 minutes of reading the manual."
                        "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                        HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @MikeB
                          last edited by

                          @MikeB its actually late afternoon for Dave and me (we are in the same time zone..) - keep plugging away at it.

                          HISE Development for hire.
                          www.channelrobot.com

                          MikeBM 1 Reply Last reply Reply Quote 0
                          • MikeBM
                            MikeB @Lindon
                            last edited by MikeB

                            @Lindon
                            Funny, somehow I sent you to Australia :-)
                            But you are both in Great Britain.

                            ...and it's tea time there and coffee and cake here in Germany.

                            "One hour of trial and error can save 10 minutes of reading the manual."
                            "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                            HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

                            LindonL 1 Reply Last reply Reply Quote 0
                            • LindonL
                              Lindon @MikeB
                              last edited by

                              @MikeB said in inline function:

                              @Lindon
                              Funny, somehow I sent you to Australia :-)
                              But you are both in Great Britain.

                              ...and it's tea time there and coffee and cake here in Germany.

                              Well I did live in Australia for 25 years...so maybe I seem Australian....

                              HISE Development for hire.
                              www.channelrobot.com

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

                              17

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              102.8k

                              Posts