HISE Logo Forum
    • Categories
    • Register
    • Login

    Waveform how to get playback position?

    Scheduled Pinned Locked Moved Unsolved Scripting
    playheadwaveform
    13 Posts 5 Posters 605 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

      I can see a function to set the playback position, but how do we get it?

      My idea is to create a pause button. So the user clicks play, the audio file plays back, they hit pause and it stores the position, when they hit play again I resume from that position.

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

      ulrikU 1 Reply Last reply Reply Quote 0
      • d.healeyD d.healey marked this topic as a question on
      • ulrikU
        ulrik @d.healey
        last edited by

        @d-healey is it not

        AudioFile.getCurrentlyDisplayedIndex()
        

        ?

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

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

          @ulrik Yes, if I had an audio file, but I have a waveform control linked to a sampler.

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

          ulrikU 1 Reply Last reply Reply Quote 0
          • ulrikU
            ulrik @d.healey
            last edited by

            @d-healey Oh, ok I see

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

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

              @Christoph-Hart Any pointers?

              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

                Still haven't found a solution to this one. Also it seems ScriptAudioWaveform.setPlaybackPosition() doesn't do anything, at least when it's connected to a sampler?

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

                clevername27C 1 Reply Last reply Reply Quote 2
                • clevername27C
                  clevername27 @d.healey
                  last edited by

                  @d-healey Do you recall if this was ever resolved?

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

                    @clevername27 Not according to my last post here :)

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

                    clevername27C 1 Reply Last reply Reply Quote 1
                    • clevername27C
                      clevername27 @d.healey
                      last edited by

                      @d-healey I'm baffled how anyone is able to ship a HISE-product. Obviously they do, but I am legit baffled.

                      ? 1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @clevername27
                        last edited by

                        @clevername27 These are edge-cases, the primary modules & UI elements are very well made and stable :)

                        clevername27C 1 Reply Last reply Reply Quote 1
                        • clevername27C
                          clevername27 @A Former User
                          last edited by

                          @iamlamprey I appreciate your response. I do not believe there is a such a thing as an "edge case". An API either works, or it doesn't.

                          1 Reply Last reply Reply Quote 0
                          • O
                            Orvillain
                            last edited by Orvillain

                            Surely the sampler itself should be reporting this, not the WaveForm view ???

                            My brain looks at this problem more along these lines:

                            • Get sampler.
                            • Get currently playing file.
                            • Get sample position for currently playing file.
                            • Use a ScriptPanel and a timer.
                            • Convert sample position into a pixel value.
                            • Draw a vertical line at the pixel value on the X axis, and as tall as you need it on the Y axis.
                            • Each time you want to update the position, clear the old line, and draw a new line.

                            This ScriptPanel would be placed over the top of the existing waveform panel.

                            This is more or less how I did my sample start/end and loop start/end mechanics.
                            9acedb12-7fa2-401d-b99c-4278144257aa-image.png

                            The only thing I haven't done is any kind of update logic. But I'm sure it is possible. Provided you can get the data from the sampler or currently playing audio file.

                            clevername27C 1 Reply Last reply Reply Quote 1
                            • clevername27C
                              clevername27 @Orvillain
                              last edited by

                              @Orvillain Thank you - I'm confused, though, because I don't want to use a sampler. I just want to play an audio file. And HISE has a Module to do that:

                              ce814e3f-0f5a-4001-9e99-385a55da192e-image.png

                              Except, like so many things in HISE, it doesn't do that.

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

                              58

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts