DesktopNotePlayer.PlayNote

From Xojo Documentation

Method

DesktopNotePlayer.PlayNote(Pitch as Integer, Velocity as Integer)

New in 2021r3

Supported for all project types and targets.

Plays the note specified by the pitch at the velocity specified.

Examples

The following example plays the Church Organ at the passed Pitch and Velocity.

NotePlayer1.Instrument = 20
NotePlayer1.PlayNote(60, 60)

The following line of code stops the note:

NotePlayer1.PlayNote(60, 0)