HISE Logo Forum
    • Categories
    • Register
    • Login

    Get Root Note

    Scheduled Pinned Locked Moved General Questions
    42 Posts 6 Posters 1.6k 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

      const var AudioLoopPlayer1 = Synth.getChildSynth("Audio Loop Player1");
      
      
      const var knb_Root = Content.getComponent("knb_Root");
      inline function onknb_RootControl(component, value)
      {
      
      	AudioLoopPlayer1.getAttribute(7, value);
      };
      Content.getComponent("knb_Root").setControlCallback(onknb_RootControl);
      
      

      "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
      • d.healeyD
        d.healey
        last edited by

        Probably need to get it as an audioSampleProcessor

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

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

          @d-healey noop the same - its not work!

          "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
          • d.healeyD
            d.healey
            last edited by

            What error do you get?

            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

              Works here

              HiseSnippet 938.3oc4Ws0aaaCElz1pn16BV2xC6Qgh8fCPWfzVuLfhhllD6AikjZDkUrWFJXjN1lHTjBTTYyXX+G2Ok8OX6PIKK4DAOWsa.a9IwyExOdt7cnmpUg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zqxLp3hVQTvzQ4udkRWOPm1k76jALje.
              

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

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

                @d-healey said in Get Root Note:

                Console.print and Knobvalue changes after click "Compile" - and only then.
                if the knob in the module changes nothing happens.

                Label does not change.

                I am completely lost?

                HiseSnippet 1306.3oc4W0saaaCElJNrq1asXsKWzKEB1EN.oN1aMcqnXnNwwoHn4GuH2fcyV.sDsMgoHEjnRiaQA1E6h8zrmg9HrWg8Fr2fsCojrjSbR87PJFV0Ulm+324PxuywcBktznHYHxpb2wATj0mgcFKTCaMjvDn81AYcW7AjHEMzNQz1iCHQQTOjkUomqEXUdYj46Oe11DNQ3RyEgPmHYtz8Y9LUtzNMeAiy2k3Q6x7KX8iZtmqTzRxkw.dJgqiBHtiHCnGRzlsDFYcq1dLkLzQQTzHj0xaK8F6LT9JQh8mvhX83T8hFHGHPIh2Ux8zHVKE0ZHi60IKuiPHKbm7pPojpvJ3CXdrIxyqFetQgctGEqGVKccvqQQ3Ue9gmUA3sbB7tG1wMjEnx0nw1mh2S.GT8IvQPQXkXKZo3R3VRvBgplOYDc2PXwDOp9350W2dy50W6oUp.GCQJ6yHg1aE6wj6KkAc3jwzvF1ems49QsATkQmCwOfSm.jpqZjZqcwN0mUgPlGwWHj8zgICJPfZI8CjBXQ0UMZ0N.efEQRNsVPHCTcQjXPfREx5EqnWV6wRo5PohtlIVLAmIn18iEtJlTXKElMRigPIupaF.VGfHOltVk2To7Dg0hnpSzh+2fgxtCIhATupvue6SqbsYudCSgVKBm2CdETcZDaRp7Z59jdT9UWTSTqqpWtNjna9KDUWUQOWs551Kdsn77ULxP8rqFSgaHLERI81bjnpA6UdaE6Kppe+YpKMVbZ3LUq4pBuNGqJh86QCKV4zFBOZmlU.e0rBEIsbSJJELTJ1SvTGEPEWEWAJsRpYMRQEXpxvYb2TNCGNyiFhX.0vmfM2oPF.myCeXSzK2aGhhjEFHhvtDPCULcBXsC8LfUOgJpLdGZzHkL.Hnmb3A4bxldmzM0bZY1yaiSN4PmOYCa9SMGOYw67ZhJDm69dAODGr0uBdNV+iMrPnH0Xc47VFCP9LOOffRFwzGW46yQMgtZANrWax72rxu87+30+xy7K1QCg7I4v7cm1LJtee14lVQ8Yb+H31dvd9PGJj08wuLhZ6Q6Sh4J6nQPbfmZindckF6ifywtvKmskmq4j0KMbJcjAwA5rYqdxynPywKQ1CsbjdwbhZ59P5luoJz4UQBeMot.x2wEaNeizbZdg68vcXJ2gyFuKMC7BW8towaZq96fa2uO0UkC1kw69C2780KBkuHCJSnMoIszWAe41oWyHX+97NBVvbOBFzs2EN1nEuJYNK6FBDwLwfhJzvrsf.0BuhHHi6ehre96alL2.TQCUP3mxZ5YzvnoivtLd5TfMwa.OzBi1vm35AVxkAajx.sQ21NcenyVGzY+1Naz5zcHgiBHdm9jMO0oic0FqU6UjyPlW3XqIutwV+3Sd.hCH2.lLcbSp3ko2pzbeEX1SdVeVi1s7+om77CGWTo4CtumgiKmgQGl9tUag41A0fw6CsoLTyYRm9YzARgLXnTvbm9lHPvOX.MrH1mYBAC9.uFxkrRyiobJIpvylur49vnWjvK9X5ePsnw7WKttyqGfSfqs9su8+O5gT5iydHGKiU.G7AD3hplK6vXeGf51kBHQHnb83lVKoGLLYc8L5MGpvyr3ufuTkMzqsRU1HS4Gj8.HyCkm5lLxp9t7sMRf7VXX8KiOPu1dxrpXb8Z00y1wN00UWteXCDZ197UKfOe8B3yiV.e1bA74wKfOeyB3y2ds9naFsUrR5m7TDDzos4+LXYMYB.qRn+FRsGD3C
                

                "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
                • d.healeyD
                  d.healey
                  last edited by

                  changed() isn't a function by itself, you have to call it on a component class, like myButton.changed();

                  I don't understand what you're trying to do though, do you want the loop player's root note knob to be set by the knob on your UI?

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

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

                    @d-healey said in Get Root Note:

                    changed() isn't a function by itself, you have to call it on a component class, like myButton.changed();

                    already clear - Tried everything

                    I don't understand what you're trying to do though, do you want the loop player's root note knob to be set by the knob on your UI?

                    Very simple.
                    When you load a sample in the sample player, the RootNote stored in the sample is displayed in the AudioLoopPlayer.

                    I would like to put it on a knob that also shows it in the GUI when changing a sample.
                    and with which I can also change it if necessary.

                    like in the snippet. when you throw a sample into the player it shows you the RootNote. The button in the GUI does the same but only when compiling.

                    "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 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @MikeB
                      last edited by

                      @MikeB You'd need a callback that is triggered when a sample is loaded, maybe the pre load callback does this. Putting it in the control callback won't work as that callback is only triggered when the knob is moved. You could also link them by parameter id, I'm not sure if that works in both directions though, and it won't change the label.

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

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

                        @d-healey
                        I have tried a little bit and I can't take over any value from anything.

                        Neither from AudioLoopPlayer nor from a filter or delay.
                        It is not possible to show a value of a parameter of a module in a knob in the gui.
                        At least I don't succeed
                        It only works in one direction from the GUI to the module.

                        "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 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @MikeB
                          last edited by

                          @MikeB Did you try the preload callback? It is possible with a timer, but that's not a very efficient way to do it.

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

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

                            @d-healey

                            I can only find these two functions and both seem unsuitable - don't they?

                            getPreloadMessage
                            Returns the current preload message if there is one.
                            
                            Engine.getPreloadMessage()
                            
                            
                            
                            getPreloadProgress
                            Returns the preload progress from 0.0 to 1.0. Use this to display some kind of loading icon.
                            
                            Engine.getPreloadProgress()
                            

                            "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
                            • d.healeyD
                              d.healey
                              last edited by

                              It's actually part of the panel class (not 100% sure why).

                              Link Preview Image
                              HISE | Scripting | ScriptPanel

                              The ScriptPanel API methods

                              favicon

                              (docs.hise.audio)

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

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

                                @d-healey
                                I'll try that out tomorrow.
                                Thank you David. 👍

                                "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 1
                                • MikeBM
                                  MikeB
                                  last edited by

                                  This does not work.

                                  Question in the round
                                  Has anyone ever managed to display the "RootNote" of the sample loaded in the AudioLoopPlayer in the GUI?

                                  Or the value of any knob of a module?

                                  Bildschirmfoto 2021-09-08 um 10.19.43.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

                                  DanHD 1 Reply Last reply Reply Quote 0
                                  • DanHD
                                    DanH @MikeB
                                    last edited by

                                    @MikeB Did you try a timer? Maybe have the timer run when loading a new audio file and then turn itself off after a second or so.

                                    DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                    https://dhplugins.com/ | https://dcbreaks.com/
                                    London, UK

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

                                      @DanH No - but David advised against this.
                                      That would not be a Healeyfied method 👎 :-)

                                      "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

                                      DanHD 1 Reply Last reply Reply Quote 0
                                      • DanHD
                                        DanH @MikeB
                                        last edited by

                                        @MikeB Seems like a perfectly reasonable method to me!

                                        However I'm not confident the preload callback would work - did you test that function yet?

                                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                        https://dhplugins.com/ | https://dcbreaks.com/
                                        London, UK

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

                                          @DanH How would you trigger the timer only when the audio file is loaded? If you can trigger the timer under such a condition then that would be fine, but then why would you need the timer?

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

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

                                            @d-healey good point re needing the timer if you can trigger a callback when the file is loaded (assuming the root note is instantly assigned upon loading)

                                            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                            https://dhplugins.com/ | https://dcbreaks.com/
                                            London, UK

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

                                            22

                                            Online

                                            1.8k

                                            Users

                                            11.9k

                                            Topics

                                            103.9k

                                            Posts