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 @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
          • d.healeyD
            d.healey @Lindon
            last edited by

            @Lindon Where are you dropping in the samples?

            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 Where are you dropping in the samples?

              on the audiowaveform...

              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 That snippet I made is grabbing samples from the sampler's sample map, so I don't expect it would work when using the drag/drop thing.

                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 That snippet I made is grabbing samples from the sampler's sample map, so I don't expect it would work when using the drag/drop thing.

                  Ok- but then I cant get it to do anything but show me the first (index 0) sample name - it wont show me the sample and thus I cant change its size...

                  So - lets say I use a widget (slider) to set the start and end values , first thing I would need is the actual real-world total length of the sample right? Any idea how to get that?

                  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 I couldn't get the waveform to show up either, think this is a bug or I'm not using it correctly.

                    You can get/set any sample property:

                    60f3e3e8-c081-404e-95b5-a736fe4ae584-image.png

                    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 I couldn't get the waveform to show up either, think this is a bug or I'm not using it correctly.

                      You can get/set any sample property:

                      60f3e3e8-c081-404e-95b5-a736fe4ae584-image.png

                      no.... thats the value its been set to... not the actual start (which is always zero) and the actual sample length...

                      In order to work out where the end user wants to set the sample start and end I need to know the actual total real-world length of the sample itself, and use that to set the sample-start and sample-end based on teh widge tIm using to set this - dont I? Or can you thank of another way of doing this?

                      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 Hmmm I see what you mean. It would be good if there was a .length property here. I assume it's not too difficult to add but I know Christoph is super busy at the moment so I wouldn't rely on it appearing any time soon.

                        However I just noticed this

                        508faad7-2830-42a9-b50e-18e5e7c2be9d-image.png

                        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 Lindon

                          @d-healey Ok that might be useful... if I was using a loop player- but Im using a sampler...

                          right well lets assume the AudioWaveform widget is setting the start and end points, and now I just need to save these for this sample in some sliderpack (actually Im using a panel data object but same thing..).

                          Now all I need to do before saving the preset is update this information to the current setting, so I know the sampler and I know the index of the sample.. so I assume I need to use this?

                          Sampler.getSoundProperty(int propertyIndex, int soundIndex)

                          Only as usual - theres no documentation about the property index anywhere I can see....any clues?

                          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 Oh yeah, stupid me, I was thinking it was the same as the audiowaveform.

                            Sampler.getSoundProperty(int propertyIndex, int soundIndex)

                            Yeah it's a bit complicated, you might want to make a separate project to experiment with this.

                            I haven't used it for a while, but my approach was to create a selection using the .createSelection() function. And then perform the actions directly on the sample with .get.

                            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 Lindon

                              @d-healey Okay well I've go this far:

                              const var Sampler1 = Synth.getSampler("Sampler1");
                              inline function onPresetSaveControl(component, value)
                              {
                              	local f = Sampler1.createSelection(".*");
                              	local m = f[0];
                              	Console.print(m.get(1));
                              };
                              

                              where I come upon the usual problem of trying to execute this call:

                              Sample.get(int propertyIndex)

                              when I have no idea what the property indexes are....anyone know where to find these? -specifically I need the SampleStart and SampleEnd

                              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 Type Sampler. and the property constants will appear in the auto complete as in my earlier screenshot

                                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 Lindon

                                  @d-healey -okay thanks, got it - I was applying this in the wrong spot, so for those of you looking here's how to find the sample end for a given sample index

                                  const var Sampler1 = Synth.getSampler("Sampler1");
                                  inline function onPresetSaveControl(component, value)
                                  {
                                  	local f = Sampler1.createSelection(".*");
                                  	Console.print(f[0].get(Sampler1.SampleEnd));	
                                  };
                                  Content.getComponent("PresetSave").setControlCallback(onPresetSaveControl);

                                  HISE Development for hire.
                                  www.channelrobot.com

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

                                    @Lindon -- Okay so I badly need this to get fixed if we can please....I'm trying work arounds with timers etc. but really not working so well I'm afraid...

                                    HISE Development for hire.
                                    www.channelrobot.com

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

                                    18

                                    Online

                                    1.7k

                                    Users

                                    11.9k

                                    Topics

                                    103.2k

                                    Posts