Forum

    • Register
    • Login
    • Search
    • Categories

    Arp attribute setting and note playback

    General Questions
    2
    4
    61
    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.
    • Lindon
      Lindon last edited by

      yet more things I dont understand...are calls to setAttribute asyncronous?

      This code:

      function onNoteOn()
      {
          local midiTgt = 0;
          local resettingArp = currentArp;
          currentArp = 1 - currentArp;
          midiTgt = currentArp + 1;
      
          Globals.trgtArp = 1 - Globals.trgtArp;
          if (Globals.trgtArp == 1)
          {
              Console.print("resetting: Arp 1");
              Arpeggiator2.setAttribute(Arpeggiator2.ResetButton, 0);
              Arpeggiator1.setAttribute(Arpeggiator1.ResetButton, 1);
          }else{
              Console.print("resetting: Arp 2");
              Arpeggiator1.setAttribute(Arpeggiator1.ResetButton, 0);
              Arpeggiator2.setAttribute(Arpeggiator2.ResetButton, 1);
          }
          Message.setChannel(Globals.trgtArp + 1);
          //Message.delayEvent(15000); 
      }
      

      I think this should reset each arp in turn and then play a note that it is looking for.(MIDI Channel) .but what this does is give you a single "blip" note - as if the note message hits the arps before they are reset - even adding a delayEvent does nothing --- what am I missing?

      HISE Development for hire.
      www.channelrobot.com

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

        I tried the exact same thing and got the blib note. I think the issue is that changing the attributes of GUI controls happens on the message thread not the real-time one.

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

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

          @d-healey said in Arp attribute setting and note playback:

          I tried the exact same thing and got the blib note. I think the issue is that changing the attributes of GUI controls happens on the message thread not the real-time one.

          OK so do we have a work around? _ I cant see how its the reason you suggest as even applying a delayEvent (which should delay the real-time event - otherwise whats it doing) . Using a delay value that results in a few seconds of delay - still gives me this blip..

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon I don't know of a solution

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

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

            15
            Online

            1.1k
            Users

            6.7k
            Topics

            62.1k
            Posts