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.
    • 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
                                • MikeBM
                                  MikeB @DanH
                                  last edited by

                                  @DanH In my plug-in, the user can select the desired sample from 100 by means of a knob, and this four times for four AudioLoopPlayers.
                                  A new sample is loaded with each scrolled value.
                                  So I can scroll through the samples in 1 second with the mouse wheel.

                                  If I set a timer here, it won't follow - I think.

                                  "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 well if you already have a callback for loading samples (via your knob) can you not get the value of the root note and update the ui control in the knob callback?

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

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

                                      @MikeB Do what DanH says, just pull the value inside your sample selector's callback.

                                      Knob1.setValue(AudioLoopPlayer1.getAttribute(AudioLoopPlayer1.RootNote));

                                      @DanH I tried the loading callback but unforuntately it doesn't trigger with the audio loop player.

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

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

                                        @DanH Go to the beginning of the entry.
                                        We were already here. That was the first and actually sensible thought, but it doesn't work. Or at least I (beginner) and David (Jedi Knight) can't solve it.

                                        "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 d.healeyD 2 Replies Last reply Reply Quote 0
                                        • DanHD
                                          DanH @MikeB
                                          last edited by

                                          @MikeB snippet?

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

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

                                            @MikeB It does (should) work. But your original post didn't explain what you were trying to do :p This is the first mention we've had of a sample selector on your UI. Post a snippet with that.

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

                                            DanHD MikeBM 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            34

                                            Online

                                            1.8k

                                            Users

                                            11.9k

                                            Topics

                                            103.9k

                                            Posts