HISE Logo Forum
    • Categories
    • Register
    • Login

    button to activate/deactivate audio loop player range

    Scheduled Pinned Locked Moved Scripting
    10 Posts 2 Posters 429 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.
    • M
      meto396
      last edited by

      Hi, is it possible to activate and deactivate the audio loop player range with a button? Thanks

      M 1 Reply Last reply Reply Quote 0
      • M
        meto396 @meto396
        last edited by

        @meto396 I need a button for this :

        ScreenFlow.gif

        Can anyone help me?

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

          @meto396 Add a button and put the thing you want it to do in the button's callback.

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

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

            @d-healey I've tried this

            const var AudioLoopPlayer = Synth.getChildSynth("AudioLoopPlayer");
            const var Button6 = Content.getComponent("Button6");
            
            inline function onButton6Control(component, value)
            {
                if (value == 0)
                {
                    AudioLoopPlayer.setRange(true);
                }
                else
                {
                    AudioLoopPlayer.setRange(false);
                }
            };
            Content.getComponent("Button6").setControlCallback(onButton6Control);
            
            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @meto396
              last edited by

              @meto396 Does the audio loop player have a .setRange function?

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

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

                @d-healey I tried all range options from the API

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

                  @meto396 you probably need to use setAttribute

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

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

                    @d-healey said in button to activate/deactivate audio loop player range:

                    setAttribute

                    but what is the parameter index for this?

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

                      @meto396 Check in the module browser, it shows all the parameter constants (don't use numbers).

                      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

                        a8a60d65-57a0-40a7-9581-e2def94614bb-image.png

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

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

                        16

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        104.9k

                        Posts