MCPcopy Create free account
hub / github.com/LMMS/lmms / processInEvent

Method processInEvent

src/core/midi/MidiController.cpp:83–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83void MidiController::processInEvent( const MidiEvent& event, const MidiTime& time, f_cnt_t offset )
84{
85 unsigned char controllerNum;
86 switch( event.type() )
87 {
88 case MidiControlChange:
89 controllerNum = event.controllerNumber();
90
91 if( m_midiPort.inputController() == controllerNum + 1 &&
92 ( m_midiPort.inputChannel() == event.channel() + 1 ||
93 m_midiPort.inputChannel() == 0 ) )
94 {
95 unsigned char val = event.controllerValue();
96 m_previousValue = m_lastValue;
97 m_lastValue = (float)( val ) / 127.0f;
98 emit valueChanged();
99 }
100 break;
101
102 default:
103 // Don't care - maybe add special cases for pitch and mod later
104 break;
105 }
106}
107
108
109

Callers

nothing calls this directly

Calls 4

controllerNumberMethod · 0.80
typeMethod · 0.45
channelMethod · 0.45
controllerValueMethod · 0.45

Tested by

no test coverage detected