Copyright © 2013-2014 MultiMedia Soft

MidiVirtualKeyboard.Note method

Previous pageReturn to chapter overviewNext page



Acts on the key corresponding to the given note on the virtual piano keyboard. The key pressure can be real, e.g. generating a note on the MIDI stream, or simulated: in this latest case the key on the keyboard results to be pressed but no sound is generated.


For further details about the use of the virtual MIDI keyboard see the MidiVirtualKeyboard object section and the How to manage the virtual MIDI piano keyboard tutorial.





[Visual Basic]

control.MidiVirtualKeyboard.Note (

hWndKeyboard as OLE_HANDLE,

nNote as Integer,

nVelocity as Integer

) as enumDjcErrorCodes



short control.MidiVirtualKeyboard.Note (

OLE_HANDLE hWndKeyboard,

short nNote,

short nVelocity








Handle of the virtual keyboard as returned by the call to the MidiVirtualKeyboard.Create method


Note to play. Can be a key number from 0 to 127; 60 means middle C


Velocity of the note. 0 means key released while values from 1 to 127 mean pressure.



Return value






enumDjcErrorCodes.ERR_DJC_NOERROR (0)

The call was successful.

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.