hydrogen 1.2.6
MidiLearnable Class Reference

Every widget which supports MidiLearn should derive from this Class. More...

#include <MidiLearnable.h>

Inheritance diagram for MidiLearnable:
EventListener Button WidgetWithInput Fader Rotary

Public Member Functions

 MidiLearnable ()
 
 ~MidiLearnable ()
 
std::shared_ptr< ActiongetAction () const
 
void midiMapChangedEvent () override
 Update m_registeredMidiEvents since the underlying #H2Core::MidiMap changed.
 
void setAction (std::shared_ptr< Action > pAction)
 
virtual void updateTooltip ()
 Indicates child class to recalculate its tool tip in case m_registeredMidiEvents changed.
 

Protected Attributes

std::shared_ptr< Actionm_pAction
 
std::vector< std::pair< H2Core::MidiMessage::Event, int > > m_registeredMidiEvents
 Stores all MIDI events mapped to m_pAction.
 

Additional Inherited Members

- Private Member Functions inherited from EventListener
virtual ~EventListener ()
 
virtual void actionModeChangeEvent (int nValue)
 
virtual void bbtChangedEvent ()
 
virtual void driverChangedEvent ()
 
virtual void drumkitLoadedEvent ()
 
virtual void errorEvent (int nErrorCode)
 
virtual void gridCellToggledEvent ()
 
virtual void instrumentParametersChangedEvent (int nInstrumentNumber)
 
virtual void jacksessionEvent (int nValue)
 
virtual void jackTimebaseStateChangedEvent (int nValue)
 
virtual void jackTransportActivationEvent ()
 
virtual void loopModeActivationEvent ()
 
virtual void metronomeEvent (int nValue)
 
virtual void midiActivityEvent ()
 
virtual void nextPatternsChangedEvent ()
 
virtual void nextShotEvent ()
 
virtual void noteOnEvent (int nInstrument)
 
virtual void patternEditorLockedEvent ()
 
virtual void patternModifiedEvent ()
 
virtual void playbackTrackChangedEvent ()
 
virtual void playingPatternsChangedEvent ()
 
virtual void playlistLoadSongEvent (int nIndex)
 
virtual void progressEvent (int nValue)
 
virtual void quitEvent (int nValue)
 
virtual void relocationEvent ()
 
virtual void selectedInstrumentChangedEvent ()
 
virtual void selectedPatternChangedEvent ()
 
virtual void songModeActivationEvent ()
 
virtual void songModifiedEvent ()
 
virtual void songSizeChangedEvent ()
 
virtual void soundLibraryChangedEvent ()
 
virtual void stackedModeActivationEvent (int nValue)
 
virtual void stateChangedEvent (H2Core::AudioEngine::State state)
 
virtual void tempoChangedEvent (int nValue)
 
virtual void timelineActivationEvent ()
 
virtual void timelineUpdateEvent (int nValue)
 
virtual void undoRedoActionEvent (int nValue)
 
virtual void updatePreferencesEvent (int nValue)
 
virtual void updateSongEvent (int nValue)
 
virtual void XRunEvent ()
 

Detailed Description

Every widget which supports MidiLearn should derive from this Class.

MIDI-learnable widgets serve as a more convenient interface to the MidiTable provided in the PreferencesDialog. Instead of assigning a MIDI message type and parameter e.g. STRIP_SOLO_TOGGLE and specify the strip number to 2, one can also SHIFT - left click the solo button of the second strip and send the MIDI event.

Definition at line 47 of file MidiLearnable.h.

Constructor & Destructor Documentation

◆ MidiLearnable()

Definition at line 28 of file MidiLearnable.cpp.

◆ ~MidiLearnable()

Definition at line 32 of file MidiLearnable.cpp.

Member Function Documentation

◆ getAction()

std::shared_ptr< Action > getAction ( ) const
inline

Definition at line 55 of file MidiLearnable.h.

◆ midiMapChangedEvent()

void midiMapChangedEvent ( )
overridevirtual

Update m_registeredMidiEvents since the underlying #H2Core::MidiMap changed.

Reimplemented from EventListener.

Definition at line 45 of file MidiLearnable.cpp.

◆ setAction()

void setAction ( std::shared_ptr< Action > pAction)

Definition at line 39 of file MidiLearnable.cpp.

◆ updateTooltip()

virtual void updateTooltip ( )
inlinevirtual

Indicates child class to recalculate its tool tip in case m_registeredMidiEvents changed.

Reimplemented in Button, and WidgetWithInput.

Definition at line 69 of file MidiLearnable.h.

Field Documentation

◆ m_pAction

std::shared_ptr<Action> m_pAction
protected

Definition at line 72 of file MidiLearnable.h.

◆ m_registeredMidiEvents

std::vector<std::pair<H2Core::MidiMessage::Event,int> > m_registeredMidiEvents
protected

Stores all MIDI events mapped to m_pAction.

It consists of pairs of MIDI events and the associated MIDI parameter.

Definition at line 80 of file MidiLearnable.h.