Piano: added optional velocity argument to handleKeyPress()

This commit is contained in:
Tobias Doerffel
2014-01-14 23:34:03 +01:00
parent 7dfaf2d44b
commit 8c8763721c
2 changed files with 3 additions and 3 deletions

View File

@@ -92,11 +92,11 @@ void Piano::setKeyState( int key, bool state )
*
* \param key the key being pressed
*/
void Piano::handleKeyPress( int key )
void Piano::handleKeyPress( int key, int midiVelocity )
{
if( isValidKey( key ) )
{
m_midiEvProc->processInEvent( midiEvent( MidiNoteOn, 0, key, MidiMaxVelocity ), midiTime() );
m_midiEvProc->processInEvent( midiEvent( MidiNoteOn, 0, key, midiVelocity ), midiTime() );
m_pressedKeys[key] = true;
}
}