Difference between revisions of "NotePlayer.PlayNote"

From Xojo Documentation

m
m
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
 
{{Description
 
{{Description
 
|text = Plays the note specified by the pitch at the velocity specified. }}
 
|text = Plays the note specified by the pitch at the velocity specified. }}
 
  
 
==Examples==
 
==Examples==
Line 16: Line 15:
  
 
<rbcode>
 
<rbcode>
   NotePlayer1.Instrument=20
+
   NotePlayer1.Instrument = 20
   NotePlayer1.PlayNote(60,60)
+
   NotePlayer1.PlayNote(60, 60)
 
</rbcode>
 
</rbcode>
 
  
 
The following line of code stops the note:
 
The following line of code stops the note:
  
 
<rbcode>
 
<rbcode>
NotePlayer1.PlayNote(60,0)
+
NotePlayer1.PlayNote(60, 0)
 
</rbcode>
 
</rbcode>

Latest revision as of 14:49, 31 July 2017

Method

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

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)