HISE Logo Forum
    • Categories
    • Register
    • Login

    AudioWaveform - callback

    Scheduled Pinned Locked Moved General Questions
    35 Posts 2 Posters 1.4k 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.
    • LindonL
      Lindon @Lindon
      last edited by Lindon

      @Lindon -err... anyone?

      just in passing - it seems to fire on init but never after that ---

      heres a trivial snippet - load your own audio into the sampler...

      HiseSnippet 1220.3oc6X80aaaCDmJNJM1KqXsnCXuL.gf8fCPWfcaZ5.5C0INIEFqNwvNqauUvHQaSDJRMJJ23MzuS6iv9H0uAaGojrn7bRSL5RG5pevP2c7N9i2eoTOovmDGKjHmpmNMhfb1vcvTtZb6wXJG04.jycc6hiUDoWJq8mFgiiIAHGmJuPyvo5pHyu2878wLL2mTvBgdkf5SdIMjpJ31q0ORYrivAjSogVqdmVc7E71BlHAvSE2FnHr+43Qjiw5kshKxYsCCnJgbfBqHwHG28EASGLV7Fd55eEMldFinIZhF.FJk8ISHxITxaNRvBzHWyy9YT6wTVPubeQLBrbuBOSkTOyCb6RCny3W3g9Ji.uBMr8QNqTFxUJA4lWFjW.jbrfzpoP5dtC7kzHUgDMd9B2NbHfMDCgBanjtVzJ+piaaArBtZ6P74jij.wLMpuaiFOzC9aqmUqVMJmQ4DugIbeEUv8D78RBnheFOgLTHCapsiTvp6KBiDbvhOzaBlkP1p1uWqJHLVvHaGIobU8M8YT+yIAaBF9sOqVNBFQTsyUt9lks9lascrVrYOZiYryf7g5WBF.yZAyiEJxI75FbT6s07lWzvgKTVlsXD4BEqyWkWkh04IgmQj1dA8Bg.V4rf0tdYA9oNIqEJ3c3T0IQjL5hz3lKHmAk4k0YOYHDVpxj670Y4NkblHZfNetrCFYNL1U0nepyAXEN2rvN.6ZDQpn5CmyAjIPUeZJZU2CHwmqDQl0lEnQN24FChKJ.voslVPDzJJ+D2Azql6.bXDD.ahhMOzgGPtH0cFC9winrr9INUP+yJJnVVDjvvpxE35NcYBf3copJckCOlplZ2Ib9p9Uu73cCq386IZdMg68b6QU9iWLdWYA3Ehi+ai2rdneo6gCGR7UEfcU2i9kqrg4Gbnr9kLnaCSWQfRm67AXLWz0dLmSkq5Heoi09XMB6VMY9y0deJU68soP49tCTRBNjxGk0s1fGqd22p0e8jDl.GLf9aVK6OaseB3ujk49GsLa0dghDdo8JC48IQDrBB+V5rdq98egTjDMuVu64ljkSkv0Z.WgsfS3DvuqrOiskh33gvwwXqXaQ8Rjiz9pBN8IvcdiKy63jPH1y4Dl9pyNN543wDcrl52EqjzKrWsYWZbJ1Dug6danaNG8ili9wyQuybzOYN5cmi9oEzoNzt3Hclg9t+ycEp6b8tBEXfdX3Hasx8oilY7TNkawXszY9bCtrZIuf9sq849suu2vow0+MbpliwATcn5P9DnFE3nw38g6TNDmvT4bK2unqfKhFK3T+xUDPF9nQDoM1W3AZOkBJHK37fV8ILBN1pj96Z8R3dBXY4B8aju3l+1dKLd8Mtov0S2jy6Si4jU9e+bxqx0c2rojdvtKU+GONugqoutmdL7GKn1Wjnfwq4i3bg4fCfY+9D6ogqnmvlR2PSqAz.BOvP7WvuLgMyGcpE1LWHxO2TvYK6YyaH6Tgv0iNLW+iACkY1ozwvMLzPBFucqfxai8HD6KEu1O8qMn8Gqa3.dBt40tq51US6M6yJ351X6FnPXd3q880EaeODEWrNOZIz4wKgN6rD57jkPmcWBcd5RnyObk5nuJxdIJQXZiXfQuCSSdcNbVxaEzeCHscpCA
      

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon The audiowaveform control seems to be broken for me. Dragging dropping doesn't do anything until I hit compile, and right-clicking doesn't display a file browser - do these things work for you?

        One thought I had in general is that you could trigger the audiowaveform's callback from a panel's preload callback (assuming that switching out the file triggers the preload callback). I can't test this because of the two issues I mentioned above, but it would be something like this snippet:

        HiseSnippet 884.3ocsV80aaaC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c.NYJdysM6HTNnOoXl.3GqW2djD38vOJD3w+mgV2k6yiWAedxJ3y1qfOOcE74YqfO+xJ3yuds9f+UjWk6sIksCvFi1uX3HktugCUVEUgjOq47+BO
        

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

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

          @Lindon Oh I can see in your snippet you are linking the audiowaveform via processorID I assume the same rule applies as for other components, the callback won't be triggered when using processor ID.

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

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @d.healey
            last edited by

            @d-healey - yeah I understand what you are saying but my use-case is much simpler than this:

            (oh by the way right clicking doesnt do anything for me either..)

            The user selects a sample map (in some browser based way) and it loads into a sampler - this sampler is connected to our audioWaveform.
            The AudioWaveform starts out at index 0 and displays the first waveform, the user can then (using a menu ) select other waveforms to display.

            All fine with a passive AudioWaveform so far...but:

            The user needs to be able to change the start and end of the sample, e.g.:

            7ce9a5f1-f2a2-483f-aed3-f7c0378ae553-image.png

            Again all fine with the current Audio Waveform -- except....

            I need to know the length of the new playing segment (Sample End - SampleStart) - which is obtainable and calculatable - but I have no event that tells me when the user has made these start position and/or end position changes....

            (( The reason by the way I need to know this length is to allow at least some sort of manual looping of this audio "segment" - turning looping on wont work as it will likely give the end user clicks - so instead I have to repeatedly time a note thats exactly the end pos - start pos length - so at least its got an envelope....)) - so even this is actuaully a work around for what we both agree is a bug ...not allowing x-fade material outside the start -end

            HISE Development for hire.
            www.channelrobot.com

            1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey -- oh yeah processor id != callbacks - how do I assign an audio waveform to a sampler with scripting?

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon

                how do I assign an audio waveform to a sampler with scripting?

                I think you just use .set("processorId", "sampler") but obviously that isn't going to help here.

                Can you read the length of the sample in the preload callback when the user selects the sample map?

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

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey - yuep
                  its:

                  AudioWaveform1.set("processorId", "Sampler1");

                  reading the length in the pre load is not much help as the end user is changing the length...

                  still .. working on it...

                  HISE Development for hire.
                  www.channelrobot.com

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @Lindon
                    last edited by

                    @Lindon -- yeah still no call back happening...

                    HISE Development for hire.
                    www.channelrobot.com

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

                      @Lindon Yeah using AudioWaveform1.set("processorId", "Sampler1"); is effectively the same as setting it in the properties editor, that's why I said it isn't going to help here. I think what is needed is an additional callback for the audiowaveform control, something like onFileChanged.

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

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

                        What controls does the user use to change the playable area range?

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

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @d.healey
                          last edited by

                          @d-healey said in AudioWaveform - callback:

                          @Lindon Yeah using AudioWaveform1.set("processorId", "Sampler1"); is effectively the same as setting it in the properties editor, that's why I said it isn't going to help here. I think what is needed is an additional callback for the audiowaveform control, something like onFileChanged.

                          Actually I need to be able to change the Sampler attached to the audioWaveform so I need:

                          audioWaveForm.attachSampler("somename");

                          and I need the callback to fire when the audiowaveform has the start and end positions changed..

                          HISE Development for hire.
                          www.channelrobot.com

                          LindonL 1 Reply Last reply Reply Quote 0
                          • LindonL
                            Lindon @d.healey
                            last edited by

                            @d-healey said in AudioWaveform - callback:

                            What controls does the user use to change the playable area range?

                            They use the audioWaveforms own controls: enableRange = true in the audioWaveforms properties...

                            HISE Development for hire.
                            www.channelrobot.com

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

                              @Lindon I think that this will require Christoph level intervention.

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

                              LindonL 1 Reply Last reply Reply Quote 0
                              • LindonL
                                Lindon @d.healey
                                last edited by

                                @d-healey - yeah I think that too... here goes... @Christoph-Hart !!!???

                                HISE Development for hire.
                                www.channelrobot.com

                                1 Reply Last reply Reply Quote 0
                                • LindonL
                                  Lindon @Lindon
                                  last edited by

                                  @Lindon said in AudioWaveform - callback:

                                  @d-healey said in AudioWaveform - callback:

                                  @Lindon Yeah using AudioWaveform1.set("processorId", "Sampler1"); is effectively the same as setting it in the properties editor, that's why I said it isn't going to help here. I think what is needed is an additional callback for the audiowaveform control, something like onFileChanged.

                                  Actually I need to be able to change the Sampler attached to the audioWaveform so I need:

                                  audioWaveForm.attachSampler("somename");

                                  and I need the callback to fire when the audiowaveform has the start and end positions changed..

                                  Worse..... this wont even work dynamically...:

                                  if (a==1)
                                  {
                                        AudioWaveform1.set("processorId", "Sampler1");
                                  }else{
                                        AudioWaveform1.set("processorId", "Sampler2");
                                  }
                                  

                                  I can set this in a script but its ignored until I recompile the script....

                                  HISE Development for hire.
                                  www.channelrobot.com

                                  1 Reply Last reply Reply Quote 0
                                  • LindonL
                                    Lindon
                                    last edited by

                                    NOOOOOO!!!!!!

                                    Now I find that AudioWaveforms WONT save start and end values in
                                    presets!!!!

                                    HISE Development for hire.
                                    www.channelrobot.com

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

                                      @Lindon

                                      You can use a sliderpack to store/restore the start/end values.

                                      I can't get the processorId to refresh the component without compiling either, I suggest opening a github issue.

                                      Here's a solution for loading in different samples which does update. It's much more convoluted and you'll need to experiment to get this working how you want. Also with this method it doesn't actually display the waveform (at least not for me). Another solution is to use multiple waveform controls that you show/hide but this might not be practical depending on how many waveforms you have.

                                      HiseSnippet 1592.3oc6Y8taZbDDeOi2DCMMpNMUpeoRmr5GHUoD.+uJU0VrwPjahsQfSZkpZsVe2BrJG6h1aOmPirTej5iPej5aP6r6c.6cgfbHItoR3OX4clc1427amclASKoviFFJjHm7mNZHE4bKbmQbU+58ILN5vCPNeJlD4yDOmbAsqPNPQCUn8GMjDFR8QNN4dndiN4WEY94u+g8IADtGcpHD5oBlG8wrAL0Tosp8HVPPShO8T1.qcuUsC8D75h.QD.pb3xngDumQ5QOln21JXjyMZ3yTBYGEA.CxY08E9i5zW7bd79eJKjcd.UunBpCbPwhaJB70HVKEUuOKvu03fODAGZqoTQtXp3t3iX9rIxmRIehQg6TKr4CmURCubofWEa3U1Bdy.RNVPBGCo0wc7jrgpoZz34ivGxUTYWBP61P43nA6ou6ZxBzHA63.Db7AfVoYNbcAXFWUZ.4YzlRXwjio3NkKeeW3W26aKT.tOBUtWPjtcHCFFPkUb+NWSVRodTUhrhaLV4FfMuhIUmmIU2XpaLIaGPTDvfF7dLNsjmjBT4db+1zdrP.gSBphYvmQwOkjopQ43HDbZcwfgBNrn3Fo2l14okTRR6RkmZfQwI.R6JFO.Pja2HtmhI3tB99QJkfWQ6HoHnn2Xube.PAQz6U3kExGH7HAtcA6yy55VLQQdPShpPCODp4nDRLIn6PCnFOUbiRekFn4y2E1Ux9+kx+pNxJlXTIMkneln22k4yWHOMHjNW+T8s2OPPMghJEHH9lKltftKg.d1W.Ij1F2qTnVtg5pSBBNGdpWLKmp48BVL9wBE8DdQCyV3xBtYU0s6L0kbZ57tYoVWERNOCKxiFbNUZeup2HT+I86c7q+8tc4HuXhwZiB9gbl5jgT9qqHEJgM00FRPET3RYpL7YI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4Bq7VkKfFP7jhy7h+tSzb7ZFI.R4lud473izqcm7kjfwkKUFM.lH3LOOc4luFximsMUW.a1bArYqEvlsW.a1YArY2EvluYt1nGFauHkXPbqHPPqFwIWNMljbkC8ubItN6.
                                      

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

                                      LindonL 3 Replies Last reply Reply Quote 0
                                      • LindonL
                                        Lindon @d.healey
                                        last edited by

                                        @d-healey thanks I will take a look - so yes I am reverting to using multiple Audiowaveform widgets - one for each of the 32 samplers....

                                        HISE Development for hire.
                                        www.channelrobot.com

                                        1 Reply Last reply Reply Quote 0
                                        • LindonL
                                          Lindon @d.healey
                                          last edited by

                                          @d-healey Okay well all Im getting is:

                                          Interface:! Line 23, column 21: Unknown function 'get'
                                          

                                          ..after I try and drop in a couple of samples...

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                            @d-healey said in AudioWaveform - callback:

                                            @Lindon

                                            You can use a sliderpack to store/restore the start/end values.

                                            The problem with this is - the f***ng AudioWaveform control doesnt fire its callback - so I have no way of knowing when the start and end values have changed!!! Grrr.>>!!!!!!

                                            HISE Development for hire.
                                            www.channelrobot.com

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

                                            7

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.2k

                                            Posts