Forum
    • Categories
    • Register
    • Login

    Play an Audio File?

    Scheduled Pinned Locked Moved Newbie League
    8 Posts 3 Posters 46 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.
    • V
      veryveryhaps
      last edited by

      Is it possible to drag and drop (then play) an audio file on the interface? I can't find anything about it in the documentation or the forums, but I seem to remember being able to do it while I was experimenting with samples-- unfortunately I did not save that project.

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @veryveryhaps
        last edited by

        Yes is the answer

        @veryveryhaps said in Play an Audio File?:

        (then play)

        Do you want it to play automatically?

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        V 1 Reply Last reply Reply Quote 0
        • V
          veryveryhaps @David Healey
          last edited by

          @David-Healey
          Either one would work, I think. Thank you for the quick response!

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @veryveryhaps
            last edited by

            @veryveryhaps You can add an audio waveform component to your UI which has built in drag n drop. Connect it to a sampler or audio loop player. Then add a callback for the drop action and trigger the note from there.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            V 2 Replies Last reply Reply Quote 0
            • V
              veryveryhaps @David Healey
              last edited by

              @David-Healey

              Thank you, that works perfectly!

              1 Reply Last reply Reply Quote 0
              • V
                veryveryhaps @David Healey
                last edited by

                @David-Healey

                Sorry, but is there a way to pause and continue it inside the interface? I tried adding a button to trigger it, but it doesn't seem to be a property in the looper.

                David HealeyD dannytaurusD 2 Replies Last reply Reply Quote 0
                • David HealeyD
                  David Healey @veryveryhaps
                  last edited by

                  @veryveryhaps I haven't really used the loop player much so I'm not sure what's possible with it. I think there is some documentation for it though.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  1 Reply Last reply Reply Quote 0
                  • dannytaurusD
                    dannytaurus @veryveryhaps
                    last edited by dannytaurus

                    @veryveryhaps The Audio Loop Player responds to MIDI like any other sound generator.

                    If you only want to trigger it from the UI try playNoteFromUI. It's meant for triggering sound generators from UI elements. It simulates pressing a key on the virtual keyboard.

                    There's also the cunningly-slightly-differently-named noteOffFromUI to stop playback.

                    As for pausing playback and continuing from the same point, I'm not sure.

                    const var loopNote = 60;
                    const var channel  = 1;
                    
                    inline function onPlayButton(component, value)
                    {
                        if (value) // button ON
                            Synth.playNoteFromUI(channel, loopNote, 127);
                        else // button OFF
                            Synth.noteOffFromUI(channel, loopNote);
                    }
                    
                    Content.getComponent("Button1").setControlCallback(onPlayButton); 
                    

                    Meat Beats: https://meatbeats.com
                    Klippr Video: https://klippr.video

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

                    16

                    Online

                    2.2k

                    Users

                    13.4k

                    Topics

                    116.4k

                    Posts