# MidiKeyboardComponent key names shifted

**URL:** <https://forum.juce.com/t/midikeyboardcomponent-key-names-shifted/14379>\
**Category:** Audio Plugins\
**Created:** [February 28, 2015, 4:25pm UTC](https://forum.juce.com/t/midikeyboardcomponent-key-names-shifted/14379 "2015-02-28T16:25:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirdouille](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Sirdouille](https://forum.juce.com/u/Sirdouille)\
**Post date:** [February 28, 2015, 4:25pm UTC](https://forum.juce.com/t/midikeyboardcomponent-key-names-shifted/14379/1 "2015-02-28T16:25:47Z")

</div>

Hi Jules,

In the default&nbsp;MidiKeyboardComponent, the name of the keys seems to be left shifted. Running the JuceDemoPlugin, you can easily check that when pressing the C4 key, a C5 is actually heard. That is taking the A4 \<=\> 440 Hz convention.

Have a nice week-end,

&nbsp;

Sirdouille.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [February 28, 2015, 5:34pm UTC](https://forum.juce.com/t/midikeyboardcomponent-key-names-shifted/14379/2 "2015-02-28T17:34:25Z")

</div>

This is all explained in MidiKeyboardComponent:

```
/** This sets the octave number which is shown as the octave number for middle C.
        This affects only the default implementation of getWhiteNoteText(), which
        passes this octave number to MidiMessage::getMidiNoteName() in order to
        get the note text. See MidiMessage::getMidiNoteName() for more info about
        the parameter.
        By default this value is set to 3.
        @see getOctaveForMiddleC
    */
    void setOctaveForMiddleC (int octaveNumForMiddleC);
```
