Get the bounds of a particular key of the virtual MIDI keyboard. */
| 138 | Get the bounds of a particular key of the virtual MIDI keyboard. |
| 139 | */ |
| 140 | Rectangle<int> getKeyBounds(unsigned index) const |
| 141 | { |
| 142 | Rectangle<int> bounds; |
| 143 | int padding = 8; |
| 144 | bounds.setX(64 * index + padding); |
| 145 | bounds.setY(padding); |
| 146 | bounds.setWidth(64 - padding); |
| 147 | bounds.setHeight(64 - padding); |
| 148 | return bounds; |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | The pressed state of one octave of a virtual MIDI keyboard. |