Arp attribute setting and note playback



  • 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?



  • 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.



  • @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..



  • @Lindon I don't know of a solution


Log in to reply
 

18
Online

805
Users

3.0k
Topics

25.5k
Posts