Copyright © 2013-2014 MultiMedia Soft

MidiVirtualKeyboard.Note method

Previous pageReturn to chapter overviewNext page

Remarks

 

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.

 

 

Syntax

 

[Visual Basic]

MidiVirtualKeyboard.Note (

hWndKeyboard as IntPtr,

nNote as Int16,

nVelocity as Int16

) as IntPtr


 

[C#]

public IntPtr MidiVirtualKeyboard.Note (

IntPtr hWndKeyboard,

Int16 nNote,

Int16 nVelocity

);


 

[C++]

public: IntPtr MidiVirtualKeyboard.Note (

IntPtr hWndKeyboard,

Int16 nNote,

Int16 nVelocity

);


 

Parameter

Description

 

 

hWndKeyboard

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

nNote

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

nVelocity

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

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred. Check the LastError property value in order to see the last error.

enumDjcErrorCodes.ERR_DJC_NOERROR (0)

The method call was successful.