HISE Logo Forum
    • Categories
    • Register
    • Login

    Fun with Regex

    Scheduled Pinned Locked Moved Blog Entries
    13 Posts 3 Posters 2.5k 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

      The sound property indexes no longer seem to be correct, is there an enum we can use?

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

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        What about Sampler.Root ?

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

          @Christoph-Hart Perfect, thank you.

          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

            I've noticed a discrepency between getSoundProperty and setSoundProperty that has been confusing me for the last hour or so.

            The sound index passed setSoundProperty relates to the sample selection, while the sound index passed to getSoundProperty relates to the entire sample map. I think it would make more sense if both related to the sound selection. I can implement this and make a pull request or do you think it would be better as a separate function?

            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

              I've made a pull request, it's a tiny change.

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

              1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart
                last edited by

                Actually I have redesigned that entire system to use a more "modern" approach last year. You can create an array of sample objects and then just iterate over them to avoid all this index mess:

                for(sample in Sampler.createSelection(".*"))
                    sample.set(Sampler.RootKey, sample.get(Sampler.RootKey);
                

                There are a bunch of calls that create these arrays (for example you can use Sampler.createListFromGUISelection() in order to create custom workflows and macro operations).

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

                  @Christoph-Hart Ooo I shall try this out, thanks!

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

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

                    @d-healey Sampler.SampleState always seems to return 0.

                    const selection = Sampler1.createSelection(".*");
                    
                    for (s in selection)
                        Console.print(s.get(Sampler.SampleState));
                    

                    I'm thinking we can use this for a purge all until played type of functionality.

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

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

                      Is the point of this Regex stuff to allow end users to modify something like the velocity mapping of a sampler in a compiled plugin?

                      1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart
                        last edited by

                        You could do that, but it will be super complex to implement a data model that stores this information as the sample maps will be restored to their original state.

                        The prime use case for this is to automate tasks while sample editing, but you can also do simple stuff in the end user plugin.

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

                          @Christoph-Hart Yeh sweet all good, sample start modulator and the note functions can still do what I need :) thanks for clarifying

                          1 Reply Last reply Reply Quote 0
                          • HISEnbergH HISEnberg referenced this topic on
                          • First post
                            Last post

                          15

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.4k

                          Posts