| 105 | } |
| 106 | |
| 107 | void 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 | |
| 123 | void Chorder::AddTone(int tone, float velocity) |
| 124 | { |
no test coverage detected