HISE Logo Forum
    • Categories
    • Register
    • Login

    Change Combo Box Items With Buttons

    Scheduled Pinned Locked Moved General Questions
    31 Posts 4 Posters 1.6k 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.
    • ustkU
      ustk
      last edited by

      @Tod-Slaughter yep, but this way you force the first samplemap of each category, it's an extra step that can annoy the user who wants to quickly switch between, let say, "D" & "J", but maybe it is not important in your design...

      Can't help pressing F5 in the forum...

      Tod SlaughterT 1 Reply Last reply Reply Quote 0
      • Tod SlaughterT
        Tod Slaughter @ustk
        last edited by

        @ustk said in Change Combo Box Items With Buttons:

        @Tod-Slaughter yep, but this way you force the first samplemap of each category, it's an extra step that can annoy the user who wants to quickly switch between, let say, "D" & "J", but maybe it is not important in your design...

        If it's done the other way I have to show/hide multiple combo boxes and reload the sampler everytime a combobox is hidden and an alternative is loaded. Then I'd have to also change my randomiser script to accommodate all the extra combos. This is simpler and will probably translate to the preset system a lot easier too. The 1st line in my combos is an empty samplemap "category" heading.

        1 Reply Last reply Reply Quote 0
        • ustkU
          ustk
          last edited by

          @Tod-Slaughter ok I got it, but everything can be easily automated.
          your randomizer can randomize the CB that shows up (by randomizing the selected button category), and the value inside

          I would be annoyed if, every time I select another category to see what's inside, the actual instrument is blanked...

          Can't help pressing F5 in the forum...

          Tod SlaughterT 2 Replies Last reply Reply Quote 0
          • Tod SlaughterT
            Tod Slaughter @ustk
            last edited by

            @ustk said in Change Combo Box Items With Buttons:

            @Tod-Slaughter ok I got it, but everything can be easily automated.
            your randomizer can randomize the CB that shows up (by randomizing the selected button category), and the value inside

            I would be annoyed if, every time I select another category to see what's inside, the actual instrument is blanked...

            I shall bear it in mind for sure. I hate instruments with bad design and buggy code. I'm not so good on code so I like to make everything crash proof as a priority and then the user design has to come second based on those choices. The coding you did above has already helped me start to optimise my stable but lengthy code and I can see how I could change things to your suggested flow. Maybe i'll change my mind.

            1 Reply Last reply Reply Quote 0
            • Tod SlaughterT
              Tod Slaughter
              last edited by Tod Slaughter

              in your code

              " for (s in SampleSet) "

              How does it work? Is it just a way to create a sub arrary using the first letter of the original array?

              why not "for (w in SampleSet)"??

              1 Reply Last reply Reply Quote 0
              • ustkU
                ustk
                last edited by

                @Tod-Slaughter I am coding for less than a year, so my knowledge is very relative...

                The letter here can be anything, even a word if you want...

                the way I see this is:

                • the function scans the array,
                • attribute each element of the array to "s",
                • then iterates in order to set the same callback to each array element

                My description might not be accurate though...

                Can't help pressing F5 in the forum...

                Tod SlaughterT 1 Reply Last reply Reply Quote 0
                • Tod SlaughterT
                  Tod Slaughter @ustk
                  last edited by

                  @ustk said in Change Combo Box Items With Buttons:

                  @Tod-Slaughter I am coding for less than a year, so my knowledge is very relative...

                  The letter here can be anything, even a word if you want...

                  the way I see this is:

                  • the function scans the array,
                  • attribute each element of the array to "s",
                  • then iterates in order to set the same callback to each array element

                  My description might not be accurate though...

                  That's perfect buddy! thanks a bunch you made my day.

                  1 Reply Last reply Reply Quote 0
                  • Tod SlaughterT
                    Tod Slaughter @ustk
                    last edited by

                    @ustk said in Change Combo Box Items With Buttons:

                    @Tod-Slaughter ok I got it, but everything can be easily automated.
                    your randomizer can randomize the CB that shows up (by randomizing the selected button category), and the value inside

                    I would be annoyed if, every time I select another category to see what's inside, the actual instrument is blanked...

                    Would you get the combo (value) position from the previous combo and pass it to the new one to keep continuity when changing?

                    1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk
                      last edited by

                      that's definitely an idea that is better than cutting the sound. But it is not so different than forcing the first element as you did (which is not a bad idea either)

                      Can't help pressing F5 in the forum...

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

                        Link Preview Image
                        W3Schools.com

                        Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.

                        favicon

                        (www.w3schools.com)

                        HISE Development for hire.
                        www.channelrobot.com

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

                        30

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.0k

                        Posts