Do notes Qeue up?

I have some code here

void button_ButtonPressed(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)
        {
            ledStrip.SetLed(3, true);
            tunes.AddNote(new Tunes.MusicNote(Tunes.Tone.C5,500));
            tunes.Play();            
        }

If I hold down the button, will the music play after ive let gofor 500 ms or will it play every note for 500 ms, possibly making it play for a second after ive let go?

It will play once per press. Your code is only executed when the button is pressed, not when it is held. To handle on a HOLD you’d need to call a loop in a thread that exited on release.

1 Like