instrumentsClassfiy.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. const instrumentsClassfiy: any = {
  2. "2": ["Flute"],
  3. "4": ["Clarinet"],
  4. "6": ["Soprano Sax", "Alto Sax", "Tenor Sax", "Baritone Sax", "Soprano Saxophone", "Alto Saxophone", "Tenor Saxophone", "Baritone Saxophone"],
  5. "12": ["Trumpet", "Muted Trumpet"],
  6. "13": ["Horn in F", "French Horn", "Horns in F"],
  7. "14": ["Trombone"],
  8. "15": ["Euphonium"],
  9. "17": ["Tuba"],
  10. "23": [
  11. "Tinkle Bell",
  12. "Agogo",
  13. "Steel Drums",
  14. "Woodblock",
  15. "Taiko Drum",
  16. "Melodic Tom",
  17. "Synth Drums",
  18. "Reverse Cymbals",
  19. "Acoustic Bass Drum",
  20. "Bass Drum",
  21. "Side Drum",
  22. "Acoustic Snare",
  23. "Hand Claps",
  24. "Electric Snare",
  25. "Low Floor Tom",
  26. "Closed Hi-Hat",
  27. "High Floor Tom",
  28. "Pedal Hi-Hat",
  29. "Low Tom",
  30. "Open Hi-Hat",
  31. "Low-Mid Tom",
  32. "Hi Mid Tom",
  33. "Crash Cymbals",
  34. "High Tom",
  35. "Ride Cymbals",
  36. "Chinese Cymbals",
  37. "Ride Bell",
  38. "Tambourine",
  39. "Splash Cymbal",
  40. "Cowbell",
  41. "Crash Cymbal",
  42. "Vibra-Slap",
  43. "Ride Cymbal",
  44. "Hi Bongo",
  45. "Low Bongo",
  46. "Mute Hi Conga",
  47. "Open Hi Conga",
  48. "Low Conga",
  49. "High Timbale",
  50. "Low Timbale",
  51. "High Agogo",
  52. "Low Agogo",
  53. "Cabasa",
  54. "Maracas",
  55. "Short Whistle",
  56. "Long Whistle",
  57. "Short Guiro",
  58. "Long Guiro",
  59. "Claves",
  60. "Hi Wood Block",
  61. "Low Wood Block",
  62. "Mute",
  63. "Open",
  64. "Mute Triangle",
  65. "Open Triangle",
  66. "Snare Drum",
  67. "Cymbal",
  68. "Cymbals",
  69. "Triangle",
  70. "Vibrato",
  71. "Suspend Cymbals",
  72. "Suspended Cymbals",
  73. "Tom-Toms",
  74. "Bell",
  75. "Bells",
  76. "crash cymbals",
  77. "Suspend cymbals",
  78. "Castanets",
  79. "Drum Set",
  80. "Gong",
  81. "Shaker",
  82. "Mark tree",
  83. "Chimes",
  84. "Mark Tree",
  85. "Tom-toms",
  86. "Hi-Hat",
  87. "Sleigh Bells",
  88. "Flexatone",
  89. "Brake drum",
  90. "concert tom",
  91. "brake drum",
  92. "finger cymbal",
  93. "ride cymbal",
  94. "Concert Toms",
  95. "Vibraslap",
  96. "Wood Blocks",
  97. "Temple Blocks",
  98. "Wood Block",
  99. ],
  100. "134": ["Ocarina"],
  101. "135": ["Pan Flute"],
  102. "136": ["Hulusi flute"],
  103. "137": ["Melodica"],
  104. Oboe: ["Oboe"],
  105. "English Horn": ["English Horn"],
  106. Bassoon: ["Bassoon"],
  107. Piccolo: ["Piccolo"],
  108. Recorder: ["Recorder"],
  109. "Soprano Recorder": ["Soprano Recorder"],
  110. DYOther: [
  111. "Acoustic Grand Piano",
  112. "Bright Acoustic Piano",
  113. "Electric Grand Piano",
  114. "Rhodes Piano",
  115. "Chorused Piano",
  116. "Harpsichord",
  117. "Clavichord",
  118. "Celesta",
  119. "Glockenspiel",
  120. "Music box",
  121. "Vibraphone",
  122. "Marimba",
  123. "Xylophone",
  124. "Tubular Bells",
  125. "Dulcimer",
  126. "Hammond Organ",
  127. "Percussive Organ",
  128. "Rock Organ",
  129. "Church Organ",
  130. "Reed Organ",
  131. "Accordian",
  132. "Harmonica",
  133. "Tango Accordian",
  134. "Acoustic Guitar",
  135. "Electric Guitar",
  136. "Overdriven Guitar",
  137. "Distortion Guitar",
  138. "Guitar Harmonics",
  139. "Acoustic Bass",
  140. "Electric Bass",
  141. "Fretless Bass",
  142. "Slap Bass",
  143. "Synth Bass",
  144. "Violin",
  145. "Viola",
  146. "Cello",
  147. "Contrabass",
  148. "Tremolo Strings",
  149. "Pizzicato Strings",
  150. "Orchestral Harp",
  151. "Timpani",
  152. "String Ensemble",
  153. "Synth Strings",
  154. "Choir Aahs",
  155. "Voice Oohs",
  156. "Synth Voice",
  157. "Orchestra Hit",
  158. "Brass Section",
  159. "Synth Brass",
  160. "Bottle Blow",
  161. "Whistle",
  162. "Lead",
  163. "Lead lead",
  164. "Pad age",
  165. "Pad",
  166. "FX",
  167. "Sitar",
  168. "Banjo",
  169. "Shamisen",
  170. "Koto",
  171. "Kalimba",
  172. "Bagpipe",
  173. "Fiddle",
  174. "Shanai",
  175. "Agogos",
  176. "Melodic Toms",
  177. "Agogo Bells",
  178. "Taiko Drums",
  179. "Bongos",
  180. "Bongo Bell",
  181. "Congas",
  182. "Guiro",
  183. "Guitar Fret Noise",
  184. "Breath Noise",
  185. "Seashore",
  186. "Bird Tweet",
  187. "Telephone Ring",
  188. "Helicopter",
  189. "Applause",
  190. "Gunshot",
  191. "Bass Clarinet",
  192. "Cornet",
  193. "Sleigh Bells",
  194. "Field Drum",
  195. "Quad-Toms",
  196. "Quads",
  197. "Drums set",
  198. "High Bongo",
  199. "Timbales",
  200. "Whip",
  201. "whip"
  202. ],
  203. };
  204. export const getInstrumentsClassfiy = (name: string) => {
  205. name = name.toLocaleLowerCase().replaceAll(" ", "");
  206. for (let key in instrumentsClassfiy) {
  207. const names = instrumentsClassfiy[key];
  208. for (let i = 0, len = names.length; i < len; i++) {
  209. const _key = names[i].toLocaleLowerCase().replaceAll(" ", "");
  210. if (_key.includes(name) || name.includes(_key)) {
  211. return key;
  212. }
  213. }
  214. }
  215. return 0
  216. };