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.
    • MikeBM
      MikeB
      last edited by

      @d-healey Like this?
      See the comment in the Gui and in the ScriptProcessor!

      HiseSnippet 1944.3oc4Ys0baiaElzxX6Jkpr1IoWdDSl9f7VuJRMW51ISajsjch13KbrbtL8kcfIAkvZJ.tjfNQyNYl9Snu0W6Oj9v9Sn+Tx+f1CH3UaFszZS2NSKePiOGfy47gCN3CWrUfvlFFJBLLad5Bepg4OGMYAWNa3LBiaLdjg4sPudtmU.MjJ2kXedjenwtK7IggTGCSyFOU0OylqaD+89mrKwivso4pLLdofYSOfMmIy0ZM34LOu8INzSYyKz6GLXrsfOT3Ih.L0.0yvGBJYJ8HhpaqgLL+j8bXRQvDIQRCMLWeWgyhIyDugq6+KYgry7nJg9FS.GoUuuvyQgX0eaLbFyywJcrGZXXhrxyDMzYh6fNj4vxzmmQ1HtAbtEEyGlqsL30eEgWiBvacM71DMwNf4KyaQgsafFykz.WBLETDV59Zr1uXMzPAzCtr6bx4z8C.gLK57nd81F+vd815wsa0tUbgPWGpKMXHwy6LXhHriLHhpaFlmBk3KHAXKBm50G+GwotdJUNTL2WvAgN2U27c0Vw3dLNE6FwskLAGK35lUlFH75XmZ21fq8fX0t020tUyL0cCn9vDgrixcuK1kKOpcCUpicd5nnykBpFYZUptaoBvIhHIfzNoHsyTMTvX7zttPw6NddcNj.Yn.B2Axgc5m+sM9QE+1ZqG25ca83BC5iDR5w7Na056Z0r06ZgubSttU1VBf8nAU1rZsTvxLrCOZ9YzfzbaZGghpxUsn5U0Zqy7E5nfOlyjG6SSjuZsrQxzETUalfJnqx3Z5alTSuajTJ3FLnzsIRKz2HFxE4ULdw3QDII0QfOg33SCjL0PvbD8Bf2QuXoIZDM7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EzlH3R3v4C7lP8fCIH9gXBpzI+JzwQR+H4GAWsI5Pq8lnNfVhyxcxZ01IelxI6wcthK1nlqJ+DzyDdNUrh9pmhdCzgBmHO0dbEeNC0a3jz.bpkRa9oNiCODp2K9FOWi23nWkuwQk2KrlvcSjESZOqZ7tVE3E1t8+z3M6XE645BUS4fccz9udUednUCJ2TCEXuJ3hHwWOHFH+xXY7qf8NvOkxoAW8bNkeIu+YceIO+Z+Rd5stNMfvC8Egkbb51BgEU9hP59Azu8D0rbQ8CEjfJa58OYeXPVoMSHxnf3xkclKh3xRkGMVomrq7plB8uh2ua8+K77he7W58imonQ8faEYPSqq7T0.cJatuGcO9EvlxfF8yUOh5Rh7joZKWjenfK7mI3L6hU.mPg6zMcJMnH1qb.A29SsmYll6L3DXCDRwp4eyfCfpPR.jmnqXtne8yEKa95WizvEqVYh+eCF9F++ICu90nmdHAJTgq9FeuLfXEtKg9XCgoG5HQtW50BlP4NwB+K3Kow9oGyQ0X+zF+IIFyI1AhuN8QhfItOMVCLt4w+CdZhNTIiydtWDpW2dFyAFwu11Vkt+BH+TsM+tUvl6uB17fUvlGtB17nUvle+JXyWtTaTaFsSjTLWuTDTXsW766XZpuMXbUuw+FAS5qR
      

      "One hour of trial and error can save 10 minutes of reading the manual."
      "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
      HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

        @MikeB If that's what you want then yes...

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

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

          @d-healey Now that's a diplomatic answer - isn't it? :winking_face:

          I want my PlugIn to work smoothly in the end.
          And the many graphic elements of the GUi do not disturb the audio flow.
          I end up with four arpeggiators that control four AudioLoopPlayers.
          Like a small drum machine.

          Since this seems to be a larger topic, wouldn't one of your videos be a good idea?

          "One hour of trial and error can save 10 minutes of reading the manual."
          "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
          HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

            There is some good advice here - https://forum.hise.audio/topic/79/scripting-best-practices

            Basically if you are updating the UI from one of the realtime callbacks (on note on, on note off, on timer) then you should defer the script - it's a good practice to always defer your main interface script.

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

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

              @d-healey

              According to this, everything should fit - I only have one NoteOn call, and it is in the ScriptProcessor before the arpeggiator.

              function onNoteOn()
              {
              if (Message.getNoteNumber() == 60)
              	    Message.setVelocity(5);
              	else 
              	    Message.ignoreEvent(true)	    
              }
              

              No timer, no control.
              and now additionally Synth.deferCallbacks(true); in the init script

              "One hour of trial and error can save 10 minutes of reading the manual."
              "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
              HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

                @MikeB I don't think setVelocity will work in a deferred script, but I might be wrong.

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

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

                  @d-healey

                  That's funny, that doesn't belong in there at all - good thing we talked about it. :beaming_face_with_smiling_eyes:

                  It was still there for testing.
                  I was wondering when the arpeggiator was off that the note was played so quietly - no wonder with velocity 5.

                  You can already have fun with the thing here 👍

                  "One hour of trial and error can save 10 minutes of reading the manual."
                  "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                  HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

                  1 Reply Last reply Reply Quote 0
                  • ?
                    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

                                      26

                                      Online

                                      1.8k

                                      Users

                                      12.0k

                                      Topics

                                      104.2k

                                      Posts