HISE Logo Forum
    • Categories
    • Register
    • Login

    Paint Routine: Multiple rectangles by mouseaction

    Scheduled Pinned Locked Moved General Questions
    7 Posts 4 Posters 327 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.
    • toxonicT
      toxonic
      last edited by

      I'm trying to build a sequencer with paint routine on a panel, and i'm at the very beginning.
      Curently i'm trying to get multiple rectangles on the panel and i have no clue, how to do that.
      In the following snippet, i can only create one rectangle at a time.
      Any suggestions? Or maybe other ideas instead using paint routines?

      HiseSnippet 1124.3ocsV8taaaCDmxwZsxaEaEXO.B8SRYNt1wcoCHXaNwIYyXMoFUYEonnKiQh1hHxjdRzIwaHuq6QXu.Ca2Ip+l4FTXrpOX36te2we73w633XoOKIQFSLrNc4bFw3yL8VJTgCCobAYzADiuvzi8aKXBeV74mxRTj8WNmljvBHFFa7CHJCqljzu+562mFQAjkpHjWK49rWvmwUkZGO3m3QQGQCXmxmUA8yFLxWJFJijK.FsgYWxbp+kzorSnHrFlDiO4v.tRF6onJVBwn49xfkdgxqEZ7ulmvuHhgB8HdPfzpORFEfLF0RFFxiBFmuySHPTFWlG1PmG9Ryi4A7B8UyGnA6ROplOLZTmdaTid8pRutUn2JnjQEJ0TSoGa54GymqJsf74SMGITr3ITHsWkJZrjF+cSygR.gP0YF8R1QwfPgGN6zsaaa3G2caAY9Dk8UzX6wTAKpm82Zm63TlZnb1bo.Dbdh17S.WZgnmih6EynUCgXwLOEadBDj9aeGCmFCGpnkc1MM.JT9GY7ogJshDvSO9uyzR9Qb+KGKSNSKFDSmVJka7M0LBRslrP3q3RAvOtPY6L0s0ezxpfrvxq2G3l6EReZz9xEhfDGLUXUgR.vBmda+2Y+zxs..Lmp0PscFpzL..pk0zNSfB98hhbzE2IctHBhfalwDL+h5KLGyBPiZ+dExLVvqX9JpXZDy4sE4j14637+bV6Jb+css6Cg41VYaUXcFiYCHfJtf4jlZvywJ.NVtHgMjFEcADFm7rnC6J3rOMEh44a7fDFtoOlpB6Di7yA9zR.GYZ7ctoMTdUMw3ZukcWW6MscJpPPEtPByoVBTq8qrSONvkb4G3Rtr9R1u9RlU6sh0r+cVS9D6rHllrgyiVVvt2pH0CToFkeZ9NxcSc5Y2JneScz8SQqIi6lKKfmeHBny+6VUp+srTg7jN9g39MvAo4sUYJ5CPyTdVMVN2OQc2xoXQvXV3Kx5J2vrVw5CD3V2cKtrIEmHUrWJbRKUfJO66ZZxjUZCa0DKihXwqzLNmH99bDObufE2FZxDsfU.DZdVuir46uib0AF95NeU.JEiDb0KmyDuuwHjr1kv+94QGPUTrMdlN.2bVrhiTv3.1UvLQcScKyCXIWpjySwl0ikX7.Up0Gk2xGO9Hbnw9CM0WUI2TL1bvuNXY4Lzuav07.UXgh+bwfvzlAkP9kAv0a404WxAJ84lPuI6REj+6zGXtmLXQDUUeXH9BfLCv4QsIP3TFQBWsr5KD9eaB4GJEer4XtxOb0brwJ3Hbp8wfiYuq3QlGNYBzHujfMMO5rONOhfn6yOE5QFyg5EySfK9v3EeFr5BnJBuOXz.qb0xcQYLC3wDAoB+C7kYrGJajYrWtQxLper7be8sP7kKOLUCvIQ5i1rLOFks6QRuYB9Y1sSWxL3QTm66ia+sfKSq1msWCe5uF97r0vmudM7Ym0vmmuF97M2qO36W2agRNSec.TL9vz1UFFGJnPkUZUH4eAWg0oD
      
      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @toxonic
        last edited by ulrik

        @toxonic If you paint one rectangle it has to be stored somewhere so that it not will be erased when you paint the next.
        You can store the value anywhere, in a slider pack or in the panel that you're using the paint routine...or ...

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

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

          @ulrik The best way to store panel related data is either the panel.data object which is just a simple JSON object that can be populated or if you want to restore it automatically, the value slot itself (using getValue() / setValue()).

          ulrikU 1 Reply Last reply Reply Quote 3
          • ulrikU
            ulrik @Christoph Hart
            last edited by

            @Christoph-Hart yes you're absolutely right, easier handling of restoring 👍

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

            1 Reply Last reply Reply Quote 1
            • toxonicT
              toxonic
              last edited by

              @Christoph-Hart @ulrik Thank you for your replies, i'll get thsi feature working, i guess. But i'm afraid, that a sequencer with basic functionality might be a huge task for someone with such little programming skills like me. For example, editing, moving and deleting existing notes - ino ideas, how i should be able to do this.
              Maybe i shoul overthink this project again... :face_with_tears_of_joy:

              Matt_SFM 1 Reply Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @toxonic
                last edited by

                @toxonic there's a recipe in the docs which can be useful for what to want to do (if I understood correctly what you want to do) :

                404 Not Found

                favicon

                (docs.hise.audio)

                Develop branch
                Win10 & VS17 / Ventura & Xcode 14. 3

                toxonicT 1 Reply Last reply Reply Quote 2
                • toxonicT
                  toxonic @Matt_SF
                  last edited by

                  @Matt_SF thank you man, this seems to be a good starting point! :-)

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

                  23

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  102.8k

                  Posts