HISE Logo Forum
    • Categories
    • Register
    • Login

    Separation of design and function

    Scheduled Pinned Locked Moved General Questions
    22 Posts 3 Posters 825 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.
    • ?
      A Former User @d.healey
      last edited by A Former User

      @d-healey said in Separation of design and function:

      Hey David. In your snippet I see a line in the midi processor timer that goes:

      Interface.setAttribute(Interface.Panel1, 1); 
      

      How exactly does this work?? It changes the color of the panel on compile. In my case, I want to pass it a reg variable called count. I do this with

      Interface.setAttribute(Interface.Panel1, count); 
      

      But how do I get it to repaint the panel on the interface right after passing the count variable in that (midi processor) synth timer?

      Edit: I can, of course run a panel timer (for the repaint) in the interface… but that always misses the first beat of my custom arp graph. I’d like repaint it immediately after setting its value to count in the synth timer.

      thx!

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

        @UrsBollhalder The panel's control callback is triggered by the setAttribute call. If you call component.repaint() in the callback it will update the panel.

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

        ? 2 Replies Last reply Reply Quote 0
        • ?
          A Former User @d.healey
          last edited by

          @d-healey I’ll try that! Thanks a ton!! Thx for the continued sharing of wisdom and knowledge!

          1 Reply Last reply Reply Quote 1
          • ?
            A Former User @d.healey
            last edited by

            @d-healey It works in sync as long as the notes stay below 8th notes. But as soon as the arp is faster, somehow that communication between the synth timer of the midi processor and the panel (which paints my arp), gets scrambled up and it only draws an occasional beat here and there… if I set up a panel timer to repaint, but works. But I’d rather avoid that.
            Also, for the love of god, I can’t seem the get it to work that when I press a note, it starts drawing the first line. It always leaves the first note a blank and paints from the 2nd on. Although I reset my variable to -1 onNoteOff…

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

              @UrsBollhalder said in Separation of design and function:

              somehow that communication between the synth timer of the midi processor and the panel

              Probably because one is realtime and one isn't.

              if I set up a panel timer to repaint, but works. But I’d rather avoid that.

              Panel timer sounds like the right solution for this, is there a reason you don't want to use it?

              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 @d.healey
                last edited by

                @d-healey Too many timers… trying to keep everything performant. With panels full of paint routines and shaders… 😬

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

                  @UrsBollhalder Why so many timers? Do they all have different intervals?

                  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 @d.healey
                    last edited by

                    @d-healey No. it’s not that many. One for the granular, 2 for lfo’s, one for the shader and one for the panel of the paint routine so far… Just trying to avoid too much expansion in general and doing more with less whenever possible… But deferring the UI script is a priority…

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

                      @UrsBollhalder All timers (except Synth.timer) are running in the non-realtime thread anyway, so don't worry about it too much.

                      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 @d.healey
                        last edited by A Former User

                        @d-healey We Swiss tend to be frugal… 😂😁
                        Edit: at least with time… 😂

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

                        25

                        Online

                        1.8k

                        Users

                        12.0k

                        Topics

                        104.2k

                        Posts