mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a method to MidiKeyboardComponent
This commit is contained in:
parent
ff6e3bdace
commit
44d52ffcef
2 changed files with 9 additions and 5 deletions
|
|
@ -260,6 +260,12 @@ int MidiKeyboardComponent::getKeyStartPosition (const int midiNoteNumber) const
|
|||
return x;
|
||||
}
|
||||
|
||||
int MidiKeyboardComponent::getNoteAtPosition (Point<int> p)
|
||||
{
|
||||
float v;
|
||||
return xyToNote (p, v);
|
||||
}
|
||||
|
||||
const uint8 MidiKeyboardComponent::whiteNotes[] = { 0, 2, 4, 5, 7, 9, 11 };
|
||||
const uint8 MidiKeyboardComponent::blackNotes[] = { 1, 3, 6, 8, 10 };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue