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

Method GridUpdated

Source/Chorder.cpp:107–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void Chorder::GridUpdated(UIGrid* grid, int col, int row, float value, float oldValue)
108{
109 if (!mDiatonic)
110 return; //TODO(Ryan)
111
112 int tone = col + (mChordGrid->GetRows() / 2 - row) * mChordGrid->GetCols();
113 if (value > 0 && oldValue == 0)
114 {
115 AddTone(tone, value * value);
116 }
117 else if (value == 0 && oldValue > 0)
118 {
119 RemoveTone(tone);
120 }
121}
122
123void Chorder::AddTone(int tone, float velocity)
124{

Callers 6

OnClickedMethod · 0.45
MouseReleasedMethod · 0.45
MouseMovedMethod · 0.45
MouseScrolledMethod · 0.45
SetValMethod · 0.45
LoadStateMethod · 0.45

Calls 2

GetRowsMethod · 0.45
GetColsMethod · 0.45

Tested by

no test coverage detected