Musical keyboard component written in React.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 rivejä
1.2 KiB

  1. /*
  2. 4
  3. +-----------------------------------+
  4. 3
  5. +--------------------------+
  6. * * * * * * * * * * **
  7. +----+-----+----+-----+----+---+-----+----+-----+----+-----+---+
  8. | | | | | | | | | | | | |
  9. | | | | | | | | | | | | |
  10. | | | | | | | | | | | | |
  11. | | | | | | | | | | | | |
  12. | | | | | | | | | | | | |
  13. | +---+-+ +-+---+ | +----++ +--+--+ ++---++ |
  14. | | | | | | | |
  15. | | | | | | | |
  16. | | | | | | | |
  17. +--------+--------+--------+--------+--------+--------+--------+
  18. */
  19. export default [
  20. 0, // C
  21. 3 / 7 / 5, // C#
  22. 1 / 7, // D
  23. 3 / 7 / 5 * 3, // D#
  24. 2 / 7, // E
  25. 3 / 7, // F
  26. (3 / 7) + (4 / 7 / 7), // F#
  27. 4 / 7, // G
  28. (3 / 7) + (4 / 7 / 7 * 3), // G#
  29. 5 / 7, // A
  30. (3 / 7) + (4 / 7 / 7 * 5), // A#
  31. 6 / 7, // B
  32. ]