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.

преди 8 години
преди 8 години
преди 7 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #define NOTE_E2 82.41
  2. #define NOTE_F2 87.31
  3. #define NOTE_Fs2 92.50
  4. #define NOTE_G2 98.00
  5. #define NOTE_Gs2 103.82
  6. #define NOTE_A2 110.00
  7. #define NOTE_As2 116.54
  8. #define NOTE_B2 123.47
  9. #define NOTE_C3 130.81
  10. #define NOTE_Cs3 138.59
  11. #define NOTE_D3 146.83
  12. #define NOTE_Ds3 155.56
  13. #define NOTE_E3 164.81
  14. #define NOTE_F3 174.61
  15. #define NOTE_Fs3 185.00
  16. #define NOTE_G3 196.00
  17. #define NOTE_Gs3 207.65
  18. #define NOTE_A3 220.00
  19. #define NOTE_As3 233.08
  20. #define NOTE_B3 246.94
  21. #define NOTE_C4 261.63
  22. #define NOTE_Cs4 277.18
  23. #define NOTE_D4 293.66
  24. #define NOTE_Ds4 311.13
  25. #define NOTE_E4 329.63
  26. #define NOTE_F4 349.23
  27. #define NOTE_Fs4 369.99
  28. #define NOTE_G4 392.00
  29. #define NOTE_Gs4 415.30
  30. #define NOTE_A4 440.00
  31. #define NOTE_As4 466.16
  32. #define NOTE_B4 493.88
  33. // The equation for note to frequency is:
  34. // float freq = 440.0f * exp2f((float)(note - 69) * 0.0833333f);
  35. // according to http://www.guitar-chords.org.uk/
  36. // and http://www.8notes.com/guitar_chord_chart/c.asp
  37. //
  38. // open = NOTE_E2 NOTE_A2 NOTE_D3 NOTE_G3 NOTE_B3 NOTE_E4
  39. const float Cmajor[6] = { 0, NOTE_C3, NOTE_E3, NOTE_G3, NOTE_C4, NOTE_E4}; // C - E - G
  40. const float Dmajor[6] = { 0, 0, NOTE_D3, NOTE_A3, NOTE_D4, NOTE_Fs4}; // D - F# - A
  41. const float Emajor[6] = {NOTE_E2, NOTE_B2, NOTE_E3, NOTE_Gs3,NOTE_B3, NOTE_E4}; // E - G# - B
  42. const float Fmajor[6] = { 0, NOTE_A2, NOTE_F3, NOTE_A3, NOTE_C4, NOTE_F4}; // F - A - C
  43. const float Gmajor[6] = {NOTE_G2, NOTE_B2, NOTE_D3, NOTE_G3, NOTE_B3, NOTE_E4}; // G - B - D
  44. const float Amajor[6] = { 0, NOTE_A2, NOTE_E3, NOTE_A3, NOTE_Cs4,NOTE_E4}; // A - C# - E
  45. const float Bmajor[6] = { 0, NOTE_B2, NOTE_Fs3,NOTE_B3, NOTE_Ds4,NOTE_Fs4}; // B - D# - F#
  46. const float Cminor[6] = { 0, NOTE_C3, NOTE_G3, NOTE_C4, NOTE_Ds4,NOTE_G4}; // C - D# - G
  47. const float Dminor[6] = { 0, 0, NOTE_D3, NOTE_A3, NOTE_D4, NOTE_F4}; // D - F - A
  48. const float Eminor[6] = {NOTE_E2, NOTE_B2, NOTE_E3, NOTE_G3, NOTE_B3, NOTE_E4}; // E - G - B
  49. const float Fminor[6] = {NOTE_F2, NOTE_C3, NOTE_F3, NOTE_Gs3,NOTE_C4, NOTE_F4}; // F - G# - C
  50. const float Gminor[6] = {NOTE_G2, NOTE_D3, NOTE_G3, NOTE_As3,NOTE_D3, NOTE_G4}; // G - A# - D
  51. const float Aminor[6] = { 0, NOTE_A2, NOTE_E3, NOTE_A3, NOTE_C4, NOTE_E4}; // A - C - E
  52. const float Bminor[6] = { 0, NOTE_B2, NOTE_Fs3,NOTE_B3, NOTE_D4, NOTE_Fs4}; // B - D - F#
  53. // E2, F2, F2#, G2, G2#, A2, A2#, B2
  54. // C3, C3#, D3, D3#, E3, F3, F3#, G3, G3#, A3, A3#, B3
  55. // C4, C4#, D4, D4#, E4, F4, F4#, G4, G4#, A4, A4#, B4