HISE Logo Forum
    • Categories
    • Register
    • Login

    What a mess I made for my self

    Scheduled Pinned Locked Moved Scripting
    9 Posts 5 Posters 693 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.
    • ulrikU
      ulrik
      last edited by ulrik

      Yes, a really mess 🤪
      I had some crazy dream that I should make some sort of mouse controlled MultiPad, where I could control 5 values depending on where I had the mouse and how big the mouse area was, and also be able to shift the different areas by dragging them around.

      I managed to calculate the mouse areas influence on each value(area) by calculating the distance between the mouse and the center of the areas, I also managed to, sort of, make the area of the mouse strengthen and weaken the influence of the areas.

      Now about the area dragging stuff, I have been thinking and thinking and th....for a couple of days and I don't think I've got it right but sometime it works and sometimes it doesn't, my head is spinning around and I feel I mess everything up but my feeling is that it's not so complicated, but I just can't see the logic at the moment...🤔

      If anybody dare to take a look at the mess, and maybe just hint me in the right direction I would be really thankful, but as I said, the code is a mess...

      this is how long I have come so far
      shiftDown && drag - change the order of the areas (this works sometimes)
      altDown && drag - increase/decrease the mouse area (not so smooth as I want it to be)

      multipad.gif

      the project:

      HiseSnippet 2916.3oc2a0sbaabEFz1zMhMtSxL8p1a1xK7.JQQA.RJIaYGKY8SiZir0Dp3lNZXSf.VRti.AXA.EEihloOB4xdYeG5CPySPuu2kdS6ksuAsm8G.rfDfhTwZFOliFIhcO+7cN6YO6YWr5XeOKbPfmuRgkNY7.rRgOrXqwtg81smIwU4v8TJ7AEsH9VNXkWNdfYP.1VoPg6+qo8VXoGnv97eewKMcLcsvIMon7FOhE9yH8IgIsd71+VhiyAl13SH8kntw1GZ44tqmi2P.I2unlx.SqyM6hekIkr6UTovC22lD542JzLDGnT3Auzydbqddib4z+FR.4L.jvC5Js.Awa9.OGaJhospraOhi8wQVbfBHkiSr+6ys+edwiH1j31S7CeDqCTBGx9iB2aVvSWFdZyO7JHAuGvg2GWrkkOYPXROTr8SKdnaH1uioU5gINsJ26O+3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C9x69ahtB+J41Eplym.wLEe0v9sfjGVX.ItPNP5J2EtGcMV9yZzmodlVXWa1Cz7QhN0oOWPzodTmJ8Ms789JKd9c50e+CXs.Xxk8eAvREOh9LJdwrhE0poozmXS9JKKpqXU.6Yyiwsfm52BdZbK3o4sfm0uE7rwsfmMmIOz+gH1YXnWe9zDngi2ms.agB66ZBQYrHRk+OoBNIn
      

      Hise Develop branch
      MacOs 15.3.1, Xcode 16.2
      http://musikboden.se

      Dan KorneffD 1 Reply Last reply Reply Quote 4
      • d.healeyD
        d.healey
        last edited by

        It looks awesome. I don't have time to look at your mess yet though :p

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

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

          @d-healey haha, thank you anyway :)

          Hise Develop branch
          MacOs 15.3.1, Xcode 16.2
          http://musikboden.se

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

            @ulrik Looks really cool ;)
            I've made the same kind of thing both linear and circular by swapping zones/sectors so I'll try to have a look at it tomorrow...
            I can already tell that I used an array of objects. Each sector is an object containing data, like name, position, angle...
            The mouse CB detects the angle in regard of the centre and updates the objects in question. If the sector passes a certain angle, it swaps with the other sector (position value)

            ezgif.com-video-to-gif-5.gif

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

            ulrikU 1 Reply Last reply Reply Quote 6
            • LindonL
              Lindon
              last edited by

              wow both of these are off the scale of coolness...

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 1
              • ulrikU
                ulrik @ustk
                last edited by

                @ustk Nice work!! :)

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @ulrik
                  last edited by

                  @ulrik Just tried to take a look... but I'm missing the Layer functions.

                  Interface:! Line 34, column 14: function not found 
                  

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  ulrikU 1 Reply Last reply Reply Quote 0
                  • ulrikU
                    ulrik @Dan Korneff
                    last edited by

                    @dustbro what Hise build do you use?
                    I've built the project with the latest as of today

                    Hise Develop branch
                    MacOs 15.3.1, Xcode 16.2
                    http://musikboden.se

                    ulrikU 1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @ulrik
                      last edited by ulrik

                      @ulrik Ok, I found a glitch
                      When shift + click I should receive a value saying which area/slice, the marker is closest to, the value is based on the radius and the angle, from which it then calculates the length between each slice and the marker, then it compares the 5 lengths and decide which is the shortest (this are quiet heavy calculations, maybe that's why the glitch?)

                      I used Console.print and found that 95% of the clicks I got the right value but 5% I got nothing.
                      So there's something fishy happening in my code.

                      If anyone is reading the code, look for the line

                      //Console.print("area:"+area+" slice:"+slice);
                      

                      it's around line 220

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

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

                      47

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      101.9k

                      Posts