you are asking about a trill (you were very close).
Two ways to implement this
1) learn how a trill is supposed to be played and play in each note in turn at the correct tempo
2) use the trill articulation that comes with those various libraries - rtfm and find out which keyswitch you need to activate it and which keyswitch you need to stop it.