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.

140 lines
6.0KB

  1. // Copyright 2015 Olivier Gillet.
  2. //
  3. // Author: Olivier Gillet (ol.gillet@gmail.com)
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a copy
  6. // of this software and associated documentation files (the "Software"), to deal
  7. // in the Software without restriction, including without limitation the rights
  8. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. // copies of the Software, and to permit persons to whom the Software is
  10. // furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. // THE SOFTWARE.
  22. //
  23. // See http://creativecommons.org/licenses/MIT/ for more information.
  24. //
  25. // -----------------------------------------------------------------------------
  26. //
  27. // Quantizer scales
  28. #ifndef BRAIDS_QUANTIZER_SCALES_H_
  29. #define BRAIDS_QUANTIZER_SCALES_H_
  30. #include "braids/quantizer.h"
  31. namespace braids {
  32. const Scale scales[] = {
  33. // Off
  34. { 0, 0, { } },
  35. // Semitones
  36. { 12 << 7, 12, { 0, 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408} },
  37. // Ionian (From midipal/BitT source code)
  38. { 12 << 7, 7, { 0, 256, 512, 640, 896, 1152, 1408} },
  39. // Dorian (From midipal/BitT source code)
  40. { 12 << 7, 7, { 0, 256, 384, 640, 896, 1152, 1280} },
  41. // Phrygian (From midipal/BitT source code)
  42. { 12 << 7, 7, { 0, 128, 384, 640, 896, 1024, 1280} },
  43. // Lydian (From midipal/BitT source code)
  44. { 12 << 7, 7, { 0, 256, 512, 768, 896, 1152, 1408} },
  45. // Mixolydian (From midipal/BitT source code)
  46. { 12 << 7, 7, { 0, 256, 512, 640, 896, 1152, 1280} },
  47. // Aeolian (From midipal/BitT source code)
  48. { 12 << 7, 7, { 0, 256, 384, 640, 896, 1024, 1280} },
  49. // Locrian (From midipal/BitT source code)
  50. { 12 << 7, 7, { 0, 128, 384, 640, 768, 1024, 1280} },
  51. // Blues major (From midipal/BitT source code)
  52. { 12 << 7, 6, { 0, 384, 512, 896, 1152, 1280} },
  53. // Blues minor (From midipal/BitT source code)
  54. { 12 << 7, 6, { 0, 384, 640, 768, 896, 1280} },
  55. // Pentatonic major (From midipal/BitT source code)
  56. { 12 << 7, 5, { 0, 256, 512, 896, 1152} },
  57. // Pentatonic minor (From midipal/BitT source code)
  58. { 12 << 7, 5, { 0, 384, 640, 896, 1280} },
  59. // Folk (From midipal/BitT source code)
  60. { 12 << 7, 8, { 0, 128, 384, 512, 640, 896, 1024, 1280} },
  61. // Japanese (From midipal/BitT source code)
  62. { 12 << 7, 5, { 0, 128, 640, 896, 1024} },
  63. // Gamelan (From midipal/BitT source code)
  64. { 12 << 7, 5, { 0, 128, 384, 896, 1024} },
  65. // Gypsy
  66. { 12 << 7, 7, { 0, 256, 384, 768, 896, 1024, 1408} },
  67. // Arabian
  68. { 12 << 7, 7, { 0, 128, 512, 640, 896, 1024, 1408} },
  69. // Flamenco
  70. { 12 << 7, 7, { 0, 128, 512, 640, 896, 1024, 1280} },
  71. // Whole tone (From midipal/BitT source code)
  72. { 12 << 7, 6, { 0, 256, 512, 768, 1024, 1280} },
  73. // pythagorean (From yarns source code)
  74. { 12 << 7, 12, { 0, 115, 261, 376, 522, 637, 783, 899, 1014, 1160, 1275, 1421} },
  75. // 1_4_eb (From yarns source code)
  76. { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1152, 1280, 1344} },
  77. // 1_4_e (From yarns source code)
  78. { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1152, 1280, 1408} },
  79. // 1_4_ea (From yarns source code)
  80. { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1088, 1280, 1408} },
  81. // bhairav (From yarns source code)
  82. { 12 << 7, 7, { 0, 115, 494, 637, 899, 1014, 1393} },
  83. // gunakri (From yarns source code)
  84. { 12 << 7, 5, { 0, 143, 637, 899, 1042} },
  85. // marwa (From yarns source code)
  86. { 12 << 7, 6, { 0, 143, 494, 755, 1132, 1393} },
  87. // shree (From yarns source code)
  88. { 12 << 7, 7, { 0, 115, 494, 755, 899, 1014, 1393} },
  89. // purvi (From yarns source code)
  90. { 12 << 7, 7, { 0, 143, 494, 755, 899, 1042, 1393} },
  91. // bilawal (From yarns source code)
  92. { 12 << 7, 7, { 0, 261, 494, 637, 899, 1160, 1393} },
  93. // yaman (From yarns source code)
  94. { 12 << 7, 7, { 0, 261, 522, 783, 899, 1160, 1421} },
  95. // kafi (From yarns source code)
  96. { 12 << 7, 7, { 0, 233, 376, 637, 899, 1132, 1275} },
  97. // bhimpalasree (From yarns source code)
  98. { 12 << 7, 7, { 0, 261, 404, 637, 899, 1160, 1303} },
  99. // darbari (From yarns source code)
  100. { 12 << 7, 7, { 0, 261, 376, 637, 899, 1014, 1275} },
  101. // rageshree (From yarns source code)
  102. { 12 << 7, 7, { 0, 261, 494, 637, 899, 1132, 1275} },
  103. // khamaj (From yarns source code)
  104. { 12 << 7, 8, { 0, 261, 494, 637, 899, 1160, 1275, 1421} },
  105. // mimal (From yarns source code)
  106. { 12 << 7, 8, { 0, 261, 376, 637, 899, 1132, 1275, 1393} },
  107. // parameshwari (From yarns source code)
  108. { 12 << 7, 6, { 0, 115, 376, 637, 1132, 1275} },
  109. // rangeshwari (From yarns source code)
  110. { 12 << 7, 6, { 0, 261, 376, 637, 899, 1393} },
  111. // gangeshwari (From yarns source code)
  112. { 12 << 7, 6, { 0, 494, 637, 899, 1014, 1275} },
  113. // kameshwari (From yarns source code)
  114. { 12 << 7, 6, { 0, 261, 755, 899, 1132, 1275} },
  115. // pa__kafi (From yarns source code)
  116. { 12 << 7, 7, { 0, 261, 376, 637, 899, 1160, 1275} },
  117. // natbhairav (From yarns source code)
  118. { 12 << 7, 7, { 0, 261, 494, 637, 899, 1014, 1393} },
  119. // m_kauns (From yarns source code)
  120. { 12 << 7, 6, { 0, 261, 522, 637, 1014, 1275} },
  121. // bairagi (From yarns source code)
  122. { 12 << 7, 5, { 0, 115, 637, 899, 1275} },
  123. // b_todi (From yarns source code)
  124. { 12 << 7, 5, { 0, 115, 376, 899, 1275} },
  125. // chandradeep (From yarns source code)
  126. { 12 << 7, 5, { 0, 376, 637, 899, 1275} },
  127. // kaushik_todi (From yarns source code)
  128. { 12 << 7, 5, { 0, 376, 637, 755, 1014} },
  129. // jogeshwari (From yarns source code)
  130. { 12 << 7, 6, { 0, 376, 494, 637, 1132, 1275} },
  131. };
  132. } // namespace braids
  133. #endif // BRAIDS_QUANTIZER_SCALES_H_