HISE Logo Forum
    • Categories
    • Register
    • Login

    LAF + Sampler Functions

    Scheduled Pinned Locked Moved General Questions
    samplerlaflook and feelaudiowavformdraw
    43 Posts 5 Posters 3.8k 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.
    • trillbillyT
      trillbilly
      last edited by

      Hey HISE Gang,

      Im trying to use LAF to change the colors of the Sample/Loop Start and End times in the AudioWavForm Window. I have these functions scripted to knobs on my UI. I see in the documentation that there is no "draw" function for any of these parameters in the sampler (like drawToggleButton). What is the best way to color these parameters?

      Thanks in advance!

      DanHD 1 Reply Last reply Reply Quote 0
      • DanHD
        DanH @trillbilly
        last edited by

        @trillbilly I'm not sure there's any laf functionality for those components just yet.

        Out of interest what method are you using to control the loop start/end via ui knobs?

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

        trillbillyT 2 Replies Last reply Reply Quote 0
        • trillbillyT
          trillbilly @DanH
          last edited by

          @DanH Hey, no problem. Here is a thread I shared script and snippet on.

          Link Preview Image
          Sample Editor Functions + UI Control

          Hey HISE Gang, Has anyone been able to get the Sample Editor functions to be editable by knob/slider/cmbox (Sample Start/End, Loop Start/End, LoopXfade)? I f...

          favicon

          Forum (forum.hise.audio)

          1 Reply Last reply Reply Quote 0
          • trillbillyT
            trillbilly @DanH
            last edited by

            @DanH Do you recommend trying any other method to change these parameters?

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

              I have a feeling these laf functions might be related to waveforms:

              "drawThumbnailBackground",
              "drawThumbnailText",
              "drawThumbnailPath",
              "drawThumbnailRange",
              "drawThumbnailRuler"
              "getThumbnailRenderOptions"
              

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

              Christoph HartC trillbillyT 2 Replies Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @d.healey
                last edited by

                @d-healey Yes, but the sampler-specific areas (loop / sample start) aren't available for customisation yet.

                trillbillyT 1 Reply Last reply Reply Quote 1
                • trillbillyT
                  trillbilly @d.healey
                  last edited by

                  @d-healey Looks like you're right.

                  the "Thumbnail Range" is the Sample/Loop Start & End slider. Looks like it just makes the Loop Range a bit darker in the AudioWavForm.

                  Something I noticed was when using "Thumbnail Range" and printing the parameters, the "textColour" parameter is actually the "itemColour" in property editor.

                  Also, after printing the parameters, I found a color parameter called "rangeColour" which makes the Sample range go completely white and the loop range to go completely blue. Maybe this is the way to edit them separately?

                  1 Reply Last reply Reply Quote 0
                  • trillbillyT
                    trillbilly @Christoph Hart
                    last edited by

                    @Christoph-Hart Ahhhh, got it. I was able to change the color of the Range of Start/Loop but thats about as far as I was able to get.

                    1 Reply Last reply Reply Quote 0
                    • DanHD
                      DanH @trillbilly
                      last edited by DanH

                      @trillbilly I haven't got my head around it yet but I have a feeling it was my thread where you got this script and if it was I remember it has a few issues, not least that every sample length is different and will need to be parsed each time it's loaded etc etc. I'm not sure there's an effective solution right now available but I would be DELIGHTED to be proved wrong! :)

                      @Lindon I seem to remember you might have been working on something related to this?

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

                      trillbillyT LindonL 3 Replies Last reply Reply Quote 0
                      • trillbillyT
                        trillbilly @DanH
                        last edited by

                        @DanH Yes, I believe it was that thread.

                        Detecting the Sample End is something I also posted about for this. @d-healey had pointed me to a thread about Regex that he said may be of some help.

                        Link Preview Image
                        Fun with Regex

                        This is an advanced feature that I just implemented (and you need at least version 0.984 for this). You can now change the properties of individual sample so...

                        favicon

                        Forum (forum.hise.audio)

                        Also, using the knobs makes the AudioWavform View a bit jumpy. Hard to get a precise location unless you drag the Sample Start/End points. This doesnt work for Loop Start/End points though.

                        It does a decent job for what I can figure out.

                        DanHD 1 Reply Last reply Reply Quote 0
                        • trillbillyT
                          trillbilly @DanH
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • LindonL
                            Lindon @DanH
                            last edited by Lindon

                            @DanH said in LAF + Sampler Functions:

                            @trillbilly I haven't got my head around it yet but I have a feeling it was my thread where you got this script and if it was I remember it has a few issues, not least that every sample length is different and will need to be parsed each time it's loaded etc etc. I'm not sure there's an effective solution right now available but I would be DELIGHTED to be proved wrong! :)

                            @Lindon I seem to remember you might have been working on something related to this?

                            well Im not so sure how useful it is but ...
                            essentially this:
                            2245da6d-4d19-450f-ab06-d15417551f60-image.png

                            ..which wants to set the sample length for each sample in the loaded map...heres the code I use...with a little description:

                            postLoadZones = yourSampler.createSelection(".*");
                            // this creates an array of all the zones (wav files) in the sampler
                            
                            		
                            		// for all zones....
                            		for (zi = 0 ; zi < postLoadZones.length; zi++)
                            		{
                            			//Console.print(" ========= zone:" + zi + " start is:" + segmentData[lsi].SampleStart + " end is:" + segmentData[lsi].SampleEnd);
                            			postLoadZones[zi].set(theSamplers[postTargetSampler].SampleStart,YourStartValue);   // that sets the start
                            			postLoadZones[zi].set(theSamplers[postTargetSampler].SampleEnd,YourEndValue); // that sets the end
                            		}
                            

                            HISE Development for hire.
                            www.channelrobot.com

                            trillbillyT 1 Reply Last reply Reply Quote 4
                            • DanHD
                              DanH @trillbilly
                              last edited by

                              @trillbilly I remember now that you couldn't reliably save the presets using the current preset system. When you reload a sample map it reloads the start and end points of everything to what was saved in the sample map as opposed to what you saved in a preset via the ui.

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

                              trillbillyT d.healeyD 3 Replies Last reply Reply Quote 0
                              • trillbillyT
                                trillbilly @DanH
                                last edited by

                                @DanH Ahhhh, that does pose a bigger issue then. Ive been stuck creating some MIDI Packs for my site. I've got a few hours now, I'll mess with it now.

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

                                  @DanH Couldn't you reload the values after changing sample map?

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

                                  DanHD 1 Reply Last reply Reply Quote 0
                                  • trillbillyT
                                    trillbilly @Lindon
                                    last edited by

                                    @Lindon Awesome! Im going to try this out now.

                                    Have you had an issue with what @DanH said regarding the Start/End times saving to what is set in the samplemap rather than the UI?

                                    LindonL 1 Reply Last reply Reply Quote 0
                                    • trillbillyT
                                      trillbilly @DanH
                                      last edited by trillbilly

                                      @DanH I've only saved a few demo presets but as of right now it all seems to be working as expected. I know you said "reliably", how often did it fail for you?

                                      EDIT: Scratch that, I see what you're saying. It saves them but does not load them correctly all the time, at least on my end.

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

                                        @d-healey Yeah I'm thinking of trying to do it in the preset handler post callback.

                                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                        https://dhplugins.com/ | https://dcbreaks.com/
                                        London, UK

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

                                          @trillbilly said in LAF + Sampler Functions:

                                          @Lindon Awesome! Im going to try this out now.

                                          Have you had an issue with what @DanH said regarding the Start/End times saving to what is set in the samplemap rather than the UI?

                                          nope - i want to save the start end values the user selects...

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                            @trillbilly said in LAF + Sampler Functions:

                                            @DanH I've only saved a few demo presets but as of right now it all seems to be working as expected. I know you said "reliably", how often did it fail for you?

                                            EDIT: Scratch that, I see what you're saying. It saves them but does not load them correctly all the time, at least on my end.

                                            so this I think is probably the problem I ran into - it basically a timing issue - the sample map is not loaded instantly - so you are probably trying to set the start end values for zones not even loaded yet...and yes @DanH I ended up doing a o lot of this stuff in preset handler post callback

                                            HISE Development for hire.
                                            www.channelrobot.com

                                            trillbillyT DanHD 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            49

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts