MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / OnInput

Method OnInput

Source/GridController.cpp:116–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void GridControllerMidi::OnInput(int control, float velocity)
117{
118 int x = 0;
119 int y = 0;
120 bool found = false;
121 for (x = 0; x < mCols; ++x)
122 {
123 for (y = 0; y < mRows; ++y)
124 {
125 if (mControls[x][y] == control)
126 {
127 found = true;
128 break;
129 }
130 }
131 if (found)
132 break;
133 }
134
135 if (found)
136 {
137 mInput[x][y] = velocity;
138
139 if (mOwner)
140 mOwner->OnGridButton(x, y, velocity, this);
141 }
142}
143
144bool GridControllerMidi::HasInput() const
145{

Callers 1

MidiReceivedMethod · 0.80

Calls 1

OnGridButtonMethod · 0.45

Tested by

no test coverage detected