Forum

    • Register
    • Login
    • Search
    • Categories

    Expansion Sample Maps -Sorted Naturally by default now?

    General Questions
    3
    17
    229
    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.
    • DanH
      DanH last edited by

      I've just noticed in an Expansion Pack that I (thought I had) finished that all the sample maps are incorrectly saved in presets and the sample map list that I access via a combo box is now in alphabetical order. It was never in order previously. Is that a new change?

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

        @danh said in Expansion Sample Maps -Sorted Naturally by default now?:

        sample maps are incorrectly saved in presets

        What does that mean?

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

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

          @d-healey it means that every preset has a value for the combo box saved in it, and that value corresponds to a list of sample maps that has now been rearranged into alphabetical order, and therefore loads the wrong map.

          Make sense?! 😆

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

            @danh said in Expansion Sample Maps -Sorted Naturally by default now?:

            a list of sample maps

            Is this list from Sampler.getSampleMapList()? or one you created manually?

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

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

              @d-healey more or less:

              local cx = expHandler.getCurrentExpansion();
                      sampleMaps = cx.getSampleMapList();
              

              It used to be in an oder I couldn't really figure out, jumbled up, but now straight alpha.

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

                @danh I'm not seeing any commits specific to that function so this change must be a side-effect of some other change that was made. Try some different commits until you find the one where the change occurred.

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

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

                  @d-healey Alphabetical is great, as long as it stays that way for the future!!

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

                    @danh You can sort the list yourself with the sort function to make sure it does 😉

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

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

                      @d-healey I did try that, and the list in the combo box went alphabetical, but it seemed it still loaded the sample maps as before. I couldn't figure it out!

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

                        @danh Did you only sort the list as it was written to the combo box items list or did sort the array that contains the sample maps and the combo box items?

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

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

                          @d-healey I did this:

                          sampleMaps.sortNatural();
                          
                          d.healey 1 Reply Last reply Reply Quote 0
                          • d.healey
                            d.healey @DanH last edited by

                            @danh And that array is also used to populate the combo box?

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

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

                              @d-healey aye:

                              SAMPLEBOX.set("items", "");
                              SAMPLEBOX.set("items", sampleMaps.join("\n"));
                              
                              d.healey 1 Reply Last reply Reply Quote 0
                              • d.healey
                                d.healey @DanH last edited by

                                @danh You don't need to clear the combo box before populating any more, that bug was fixed 🙂

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

                                ulrik DanH 2 Replies Last reply Reply Quote 0
                                • ulrik
                                  ulrik @d.healey last edited by

                                  @d-healey said in Expansion Sample Maps -Sorted Naturally by default now?:

                                  You don't need to clear the combo box before populating any more, that bug was fixed

                                  👍

                                  Hise Develop branch
                                  MacOs 13, Xcode 14.0.1
                                  http://musikboden.se

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

                                    @d-healey good to know. So the code looks ok? Maybe I'll have another go - although maybe impossible to tell now 😆

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

                                      @danh said in Expansion Sample Maps -Sorted Naturally by default now?:

                                      So the code looks ok?

                                      From the tiny amount you've posted, yes.

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

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

                                      10
                                      Online

                                      1.1k
                                      Users

                                      7.0k
                                      Topics

                                      64.7k
                                      Posts