Cheesecaked

Music - Here Comes A Thought

May 12th, 2021
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.08 KB | None | 0 0
  1. @name Music - Here Comes A Thought
  2. @persist Dict:table
  3. @persist Section Tick
  4. @persist Run PreM PreS MI SI Note
  5. @persist [SMain SSec]:array [Main Sec]:string Index SoundI
  6. @inputs LIn:string
  7. @persist SL:array [Lyrics Output]:string LChunk LSelect
  8. @outputs LOut:string
  9. @persist Logo:array L
  10. @model models/props_lab/citizenradio.mdl
  11.  
  12. if(dupefinished()){
  13. reset()
  14. }
  15.  
  16. if(first()){
  17.  
  18. Dict["A2",number] = 25 Dict["B2",number] = 28
  19. Dict["C3",number] = 30 Dict["C3+",number] = 32 Dict["D3",number] = 33
  20. Dict["D3+",number] = 35 Dict["E3",number] = 38 Dict["F3",number] = 40
  21. Dict["F3+",number] = 42 Dict["G3",number] = 44 Dict["G3+",number] = 47
  22. Dict["A3",number] = 50 Dict["A3+",number] = 53 Dict["B3",number] = 56
  23. Dict["C4",number] = 60 Dict["C4+",number] = 63 Dict["D4",number] = 67
  24. Dict["D4+",number] = 71 Dict["E4",number] = 75 Dict["F4",number] = 79
  25. Dict["F4+",number] = 84 Dict["G4",number] = 89 Dict["G4+",number] = 94
  26. Dict["A4",number] = 101 Dict["A4+",number] = 106 Dict["B4",number] = 112
  27. Dict["C5",number] = 121 Dict["C5+",number] = 126 Dict["D5",number] = 134
  28. Dict["D5+",number] = 142 Dict["E5",number] = 150 Dict["F5",number] = 159
  29. Dict["F5+",number] = 168 Dict["G5",number] = 178 Dict["G5+",number] = 189
  30. Dict["A5",number] = 200 Dict["A5+",number] = 212 Dict["B5",number] = 224
  31.  
  32. #C2 : C,D,E,F,G,25,28
  33.  
  34. #C3 : 30(32),33(35),38,40(42),44(47),50(53),56
  35.  
  36. #C4 : 60(63),67(71),75,79(84),89(94),101(106),112
  37.  
  38. #C5 : 121(126),134(142),150,159(168),178(189),200(212),224
  39.  
  40. Main = "E4,0.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.5 " +
  56. "E4,1 D4,0.5 D4,1 A3,1 E4,0.5 D4,1 E4,0.5 D4,1 E4,0.5 D4,0.5 " +
  57. "C4,2 " + #S2P1
  58. "C5,0.5 C5,0.5 C5,0.75 B4,0.5 B4,0.5 B4,0.75 A4,0.5 A4,0.5 A4,0.75 " +
  59. "G4,0.5 G4,0.5 G4,0.75 G4,0.5 E4,0.5 D4,2 X,1 B4,0.5 B4,0.5 B4,0.75 " +
  60. "A4,0.5 A4,0.5 A4,0.75 G4,0.5 G4,0.5 G4,0.75 F4,0.5 F4,0.5 F4,0.75 " +
  61. "G4,0.5 E4,0.5 D4,2 X,1 C5,0.5 C5,0.5 C5,0.75 B4,0.5 B4,0.5 B4,0.75 " +
  62. "A4,0.5 A4,0.5 A4,0.75 G4,0.5 G4,0.5 G4,0.75 G4,0.5 E4,0.5 D4,2 X,1 " +
  63. "G4,2 E4,1.25 G4,2 E4,1.25 G4,2 C4,4.5 " + #S2P2
  64. "D4,1.5 C4,1 B3,0.75 A3,2 G3,0.5 A3,0.5 B3,0.5 X,0.5 D4,1.5 " +
  65. "C4,1 B3,0.75 A3,1 B3,2 X,0.5 E4,1.5 D4,1 C4,0.75 B3,2 A3,0.5 B3,0.5 C4,0.5 " +
  66. "X,0.5 E4,1.5 D4,1 C4,0.75 B3,1 C4,2 X,0.5 D4,1.5 C4,1 B3,0.75 A3,2 G3,0.5 " +
  67. "A3,0.5 X,0.5 A3,0.5 D4,1.5 C4,1 B3,0.75 A3,1 B3,2 X,0.5 E4,1.5 D4,1 " +
  68. "C4,0.75 B3,2 A3,0.5 B3,0.5 C4,0.5 X,0.5 E4,1.5 D4,1 C4,0.75 B3,1 C4,2 " +
  69. "X,0.5 " + #S3P1
  70. "C4,1 G4,3 G4,0.75 A4,0.75 B4,1 G4,3 G4,0.75 A4,0.75 B4,1 B4,3 " +
  71. "D5,0.75 C5,0.75 B4,0.75 A4,0.5 C5,1.5 A4,0.75 B4,0.75 C5,0.75 B4,0.75 " +
  72. "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+
  88. "B4,0.5 B4,0.75 A4,0.5 A4,0.5 A4,0.75 G4,0.5 G4,0.5 G4,0.75 G4,0.5 E4,0.5 " +
  89. "D4,2.5 X,1 G4,2 E4,1.25 G4,2 E4,1.25 G4,2 C4,4.5 " + #S4P3
  90. "E4,0.5 E4,0.5 E4,0.5 E4,0.5 G4,0.5 E4,1 D4,0.5 D4,1 A3,1 E4,0.5 " +
  91. "E4,0.5 E4,0.5 E4,0.5 G4,0.5 E4,1 D4,0.5 D4,2 E4,0.5 E4,0.5 E4,0.5 E4,0.5 " +
  92. "G4,0.5 E4,1 D4,0.5 D4,1 A3,1 E4,0.5 E4,0.5 E4,0.5 E4,0.5 G4,0.5 E4,1 " +
  93. "D4,0.5 D4,4 D4,1.5 C4,1 B3,1.5 A3,5"
  94.  
  95. Sec = "X,3"
  96.  
  97. SMain = Main:explode(" "):concat(" X,0.01 "):explode(" ")
  98. SSec = Sec:explode(" "):concat(" X,0.01 "):explode(" ")
  99.  
  100. Lyrics = "Have you think of a moment just / Flexibility, " +
  101. "love and trust /Have you think of a moment just / Flexibility, " +
  102. "love and trust / Here comes a thought, /that might alarm you~ /" +
  103. "What someone say, /and how it harmed you~ /Something you did, /" +
  104. "that failed to be charming~ /Things that you say, /are suddenly " +
  105. "swarming~ / Ohh oh, you're losing sight, /you're losing touch~/All " +
  106. "these little things seemed to matter so much~ /That they confuse you, " +
  107. "/that I might lose you~/" + #Opening + S1
  108. "Take a moment remind yourself to- /take a moment to find yourself /" +
  109. "Take a moment to ask yourself if- / this is how we fall apart/" +
  110. "But it's not, but it's not, but it's not, but it's not, but it's not~/" +
  111. "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
  112. "You've got nothing, got nothing, got nothing, got nothing to fear~ /" +
  113. "I'm here, I'm here, I'm here~/" + #S1P2
  114. "Here comes a thought, /that might alarm me~ /What someone say, /" +
  115. "and how it harmed me~ /Something I did, /that failed to be charming~ " +
  116. "/Things that I say, /are suddenly swarming~ /" +
  117. " Ohh oh, I'm losing sight, /I'm losing touch~/All these little things " +
  118. "seemed to matter so much~ /That they confuse me, /that I might lose " +
  119. "me~/" + #S2
  120. "Take a moment remind yourself to- /take a moment to find yourself /" +
  121. "Take a moment to ask yourself if- / this is how we fall apart/" +
  122. "But it's not, but it's not, but it's not, but it's not, but it's not~/" +
  123. "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
  124. "You've got nothing, got nothing, got nothing, got nothing to fear~ /" +
  125. "I'm here, I'm here, I'm here~/And it was just a thought, just a thought, " +
  126. "just a thought, just a thought, just a thought~/" +
  127. "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
  128. "You can watch, you can watch, you can watch, you can watch them go by~/" +
  129. "From here, from here, from here~/" + #S2P2
  130. "Have you think of a moment just / Flexibility, love and trust /" +
  131. "Have you think of a moment just / Flexibility, " +
  132. "love and trust~ /" + "Thanks for listening :)"
  133.  
  134. LChunk = 1
  135. LSelect = 0
  136.  
  137. SL = Lyrics:explode("/")
  138.  
  139. runOnTick(1)
  140.  
  141. Section = 0
  142. Tick = 0
  143.  
  144. MI = 1
  145. SI = 1
  146.  
  147. Index = 1
  148. SI = 1
  149.  
  150. Note = 0.4
  151.  
  152. holoCreate(1,entity():toWorld(vec(6.7,2.5,13.4)),vec(4/12,18/12,4/12),entity():toWorld(ang()))
  153. holoParent(1,entity())
  154.  
  155. for(H = 0,1){
  156. holoCreate(2 + H,entity():toWorld(vec(0,-4.5 -(4*H),17)),vec(3/12),entity():toWorld(ang()),vec(150,0,0),"hqsphere")
  157. }
  158.  
  159. for(H = 0,3){
  160. holoCreate(4 + H,entity():toWorld(vec(0,-0.5 +(3*H),17)),vec(2/12),entity():toWorld(ang()),vec(150,0,0),"hqsphere")
  161. }
  162.  
  163. for(H = 2,7){
  164. holoParent(H,entity())
  165. }
  166.  
  167. timer("start",3200)
  168. #8k
  169. }
  170. else{
  171. if(clk("start")){
  172. Section = 1
  173.  
  174. PreM = SMain[1,string]:explode(",")[2,string]:toNumber()
  175. PreS = SSec[1,string]:explode(",")[2,string]:toNumber()
  176. }
  177.  
  178. if(Section == 1){
  179. Run += 0.014
  180.  
  181. if(sqrt((floor(Run,2) - PreM)^2) <= 0.02){ # <= blunt range
  182. if(MI > SMain:count()){
  183. for(H = 2,3){
  184. holoColor(H,vec(150,0,0))
  185. }
  186. }
  187. elseif(SMain[MI,string]:explode(",")[1,string] != "X"){
  188. for(H = 2,3){
  189. SoundI += 1
  190. holoEntity(H):soundPlay(SoundI,SMain[MI,string]:explode(",")[2,string]:toNumber() * Note,"synth/tri.wav")
  191. soundPitch(SoundI,Dict[SMain[MI,string]:explode(",")[1,string],number])
  192. if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 113){
  193. if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 120){
  194. if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 135){
  195. soundVolume(SoundI,0.4)
  196. }
  197. else{
  198. soundVolume(SoundI,0.5)
  199. }
  200. }
  201. else{
  202. soundVolume(SoundI,0.6)
  203. }
  204. }
  205. else{
  206. soundVolume(SoundI,0.9)
  207. }
  208.  
  209. holoColor(H,vec(0,150,0))
  210. }
  211.  
  212. if(LSelect >= SL[LChunk,string]:explode(" "):count()){
  213. LSelect = 1
  214. LChunk += 1
  215. }
  216. else{
  217. LSelect += 1
  218. }
  219.  
  220. if(SL[LChunk,string]:explode(" ")[LSelect,string] != "" & SL[LChunk,string]:explode(" ")[LSelect,string]:upper() != "!X" & SMain[MI,string]:explode(",")[1,string] != "X"){
  221. #Output = SL[LChunk,string]:explode("X "):concat()
  222. }
  223.  
  224. if(changed(LSelect) & LSelect == 1){
  225. Output = SL[LChunk,string]:explode("X "):concat():trim()
  226. setName(Output)
  227. #print(Output)
  228. }
  229. }
  230. else{
  231. for(H = 2,3){
  232. holoColor(H,vec(150,0,0))
  233. }
  234. }
  235. PreM = PreM + SMain[MI,string]:explode(",")[2,string]:toNumber() * Note
  236. MI += 1
  237. }
  238.  
  239. if(sqrt((floor(Run,2) - PreS)^2) <= 0.02){ # <= blunt range
  240. if(SI > SSec:count()){
  241. for(H = 4,7){
  242. holoColor(H,vec(150,0,0))
  243. }
  244. }
  245. elseif(SSec[SI,string]:explode(",")[1,string] != "X"){
  246. for(H = 4,7){
  247. if(3+Index == H){
  248. SoundI += 1
  249.  
  250. holoEntity(H):soundPlay(SoundI,SSec[SI,string]:explode(",")[2,string]:toNumber() * Note,"synth/tri.wav")
  251. soundPitch(SoundI,Dict[SSec[SI,string]:explode(",")[1,string],number])
  252. soundVolume(SoundI,0.6)
  253.  
  254. holoColor(H,vec(0,150,0))
  255. }
  256. else{
  257. holoColor(H,vec(150,0,0))
  258. }
  259. }
  260.  
  261. if(Index == 4){
  262. Index = 1
  263. }
  264. else{
  265. Index += 1
  266. }
  267. }
  268. else{
  269. for(H = 4,7){
  270. holoColor(H,vec(150,0,0))
  271. }
  272. }
  273. PreS = PreS + SSec[SI,string]:explode(",")[2,string]:toNumber() * Note
  274. SI += 1
  275. }
  276.  
  277. if(Run > PreM & Run > PreS){
  278. #Section += 1
  279. }
  280. }
  281. else{
  282.  
  283. }
  284. }
  285.  
  286. if(first()){
  287. Logo = array("",
  288. "##########################################################################",
  289. "# #",
  290. "# ----- #### # #",
  291. "# --<<<<<<-- # # # #",
  292. "# -<<<<<<<<<<<-- # # # # #",
  293. "# |-<<<<<<-#####| # # ### #",
  294. "# |#-<<-########| # # # #",
  295. "# |##|##########| # # ### #",
  296. "# |##|#########= # ## # ## ## #### ## #",
  297. "# =##|########= # # # # # # # # # # #",
  298. "# =#|######= # # # ##### ##### #### ##### #",
  299. "# =#|####= # # # # # # # #",
  300. "# =|##= # # # # # # # # # # # # #",
  301. "# == #### # # ### ### #### ### #",
  302. "# #",
  303. "##########################################################################")
  304.  
  305. timer("L",200)
  306. }
  307.  
  308. if(clk("L")){
  309. L += 1
  310.  
  311. print(2,Logo[L,string])
  312.  
  313. if(L < Logo:count()){
  314. timer("L",200)
  315. }
  316. else{
  317. print("Music shell by Cheesecake :D")
  318. }
  319. }
  320.  
Advertisement
Add Comment
Please, Sign In to add comment