Merge branch 'stable-0.4' into stable-0.4-new-fx-mixer
Conflicts: src/gui/FxMixerView.cpp
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Piano.h - declaration of class Piano
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -40,23 +40,40 @@ public:
|
||||
BlackKey
|
||||
} ;
|
||||
|
||||
Piano( InstrumentTrack * _it );
|
||||
Piano( InstrumentTrack* track );
|
||||
virtual ~Piano();
|
||||
|
||||
void setKeyState( int _key, bool _on = false );
|
||||
void setKeyState( int key, bool state );
|
||||
|
||||
void handleKeyPress( int _key );
|
||||
void handleKeyRelease( int _key );
|
||||
bool isKeyPressed( int key ) const
|
||||
{
|
||||
return m_pressedKeys[key];
|
||||
}
|
||||
|
||||
void handleKeyPress( int key, int midiVelocity = MidiMaxVelocity );
|
||||
void handleKeyRelease( int key );
|
||||
|
||||
InstrumentTrack* instrumentTrack() const
|
||||
{
|
||||
return m_instrumentTrack;
|
||||
}
|
||||
|
||||
MidiEventProcessor* midiEventProcessor() const
|
||||
{
|
||||
return m_midiEvProc;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
InstrumentTrack * m_instrumentTrack;
|
||||
MidiEventProcessor * m_midiEvProc;
|
||||
static bool isValidKey( int key )
|
||||
{
|
||||
return key >= 0 && key < NumKeys;
|
||||
}
|
||||
|
||||
InstrumentTrack* m_instrumentTrack;
|
||||
MidiEventProcessor* m_midiEvProc;
|
||||
bool m_pressedKeys[NumKeys];
|
||||
|
||||
|
||||
friend class PianoView;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* piano_roll.h - declaration of class pianoRoll which is a window where you
|
||||
* can set and edit notes in an easy way
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008 Andrew Kelley <superjoe30/at/gmail/dot/com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -50,7 +50,6 @@ class pattern;
|
||||
class timeLine;
|
||||
class toolButton;
|
||||
|
||||
|
||||
class pianoRoll : public QWidget, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -154,7 +153,6 @@ signals:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
enum editModes
|
||||
{
|
||||
ModeDraw,
|
||||
@@ -230,8 +228,11 @@ private:
|
||||
static const int cm_scrollAmtVert = 1;
|
||||
|
||||
static QPixmap * s_whiteKeyBigPm;
|
||||
static QPixmap * s_whiteKeyBigPressedPm;
|
||||
static QPixmap * s_whiteKeySmallPm;
|
||||
static QPixmap * s_whiteKeySmallPressedPm;
|
||||
static QPixmap * s_blackKeyPm;
|
||||
static QPixmap * s_blackKeyPressedPm;
|
||||
static QPixmap * s_toolDraw;
|
||||
static QPixmap * s_toolErase;
|
||||
static QPixmap * s_toolSelect;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#include "lmms_basics.h"
|
||||
#include "midi.h"
|
||||
|
||||
const volume_t MinVolume = 0;
|
||||
const volume_t MaxVolume = 200;
|
||||
@@ -50,4 +51,9 @@ typedef struct
|
||||
} surroundVolumeVector;
|
||||
|
||||
|
||||
inline int volumeToMidi( volume_t vol )
|
||||
{
|
||||
return vol * MidiMaxVelocity / DefaultVolume;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user