((keyType, index) => {
        const offset = whiteKeysOffsets[index];
        xPosition = octave > 0 ? offset + o * octave : offset;
        createKey(keyType, xPosition);
      });

      blackKeyPositions.forEach((position, index) => {
        const offset = blackKeysOffsets[index];
        xPosition = octave > 0 ? offset + o * octave : offset;
        createKey("black", xPosition);
      });
    }

    if (numberOfOctaves > 0) {
      const c6Position = o * numberOfOctaves + whiteKeysOffsets[0];
      c