HISE Logo Forum
    • Categories
    • Register
    • Login

    Arp Force Repaint?

    Scheduled Pinned Locked Moved Scripting
    8 Posts 2 Posters 269 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
      last edited by A Former User

      I have a button to invert the notes on the arp FloatingTile, it works as expected, but sometimes doesn't repaint the FloatingTile, and requires multiple clicks to do so (even though the notes are changing).

      Is there any way to force a repaint for a FloatingTile?

      inline function onButton_ArpNotesInvertControl(component, value)
      {
      	if (value)
          {     
              local notes = [];
              for (s=0; s<SliderPack_ArpNotes.getNumSliders(); s++)
              {
                  notes.push(SliderPack_ArpNotes.getSliderValueAt(s));
                  SliderPack_ArpNotes.setSliderAtIndex(s, 0-notes[s]);
                  SliderPack_ArpNotes.changed();
              }           
          }
      };
      

      Update: I believe the repaint issue is with the Arp's FloatingTile, not the front end one. Regular scripts work but this inversion one just doesn't for some reason.

      1 Reply Last reply Reply Quote 0
      • MikeBM
        MikeB
        last edited by

        Quick question:

        Doesn't it do that when the arp is running?
        When the arp is not running everything goes well!?

        "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 @MikeB
          last edited by

          @MikeB So while the arp running it won't repaint at all, after noteOff it takes 2-3 clicks (which work, just don't repaint) and then it repaints every click after that.

          Also I said FloatingTile in the post but I obviously mean SliderPacks ;)

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by A Former User

            Here's a quick video to demonstrate what I mean

            I think it has something to do with both getting and setting sliders in the same script.

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by A Former User

              Okay some more weirdness:

              After hitting the button and having it not update, if I right click on either the front-end sliderpack or the arp's one, it calls the repaint and moves the sliders as expected.

              Update: Okay, if the Arp Loop finishes, the repaint works on click. It also works normally as long as I don't call getSliderValueAt() anywhere in the script...

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by A Former User

                SUCCESS!

                var arpNotes = [];
                
                inline function onButton_ArpNotesInvertControl(component, value)
                { 
                    if (value)
                    {     
                        for (s=0; s<SliderPack_ArpNotes.getNumSliders(); s++)
                        {
                            arpNotes[s] = SliderPack_ArpNotes.getSliderValueAt(s);
                        } 
                    }
                    
                    else
                    {
                        for (n=0; n<SliderPack_ArpNotes.getNumSliders(); n++)
                        {
                            SliderPack_ArpNotes.setSliderAtIndex(n, 0-arpNotes[n]);
                        } 
                    }
                    SliderPack_ArpNotes.changed();
                };
                

                Make sure the Button is momentary, this splits the script and calls the getValue in the on state, then changes the sliders in the off state.

                1 Reply Last reply Reply Quote 1
                • MikeBM
                  MikeB
                  last edited by MikeB

                  Wonderful 👍

                  I noticed that too - that when the arp is running almost no changes are made to the sliderpack.
                  That's why I'm trying to somehow separate the sliderpack (graphics) from the arp (audio).

                  "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 @MikeB
                    last edited by

                    @MikeB I guess a scriptpanel with custom paintroutine would solve everything, but it would take a lot of coding which I don't really want to do if I can avoid it 😂

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

                    44

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    102.3k

                    Posts