Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Music - Here Comes A Thought
- @persist Dict:table
- @persist Section Tick
- @persist Run PreM PreS MI SI Note
- @persist [SMain SSec]:array [Main Sec]:string Index SoundI
- @inputs LIn:string
- @persist SL:array [Lyrics Output]:string LChunk LSelect
- @outputs LOut:string
- @persist Logo:array L
- @model models/props_lab/citizenradio.mdl
- if(dupefinished()){
- reset()
- }
- if(first()){
- Dict["A2",number] = 25 Dict["B2",number] = 28
- Dict["C3",number] = 30 Dict["C3+",number] = 32 Dict["D3",number] = 33
- Dict["D3+",number] = 35 Dict["E3",number] = 38 Dict["F3",number] = 40
- Dict["F3+",number] = 42 Dict["G3",number] = 44 Dict["G3+",number] = 47
- Dict["A3",number] = 50 Dict["A3+",number] = 53 Dict["B3",number] = 56
- Dict["C4",number] = 60 Dict["C4+",number] = 63 Dict["D4",number] = 67
- Dict["D4+",number] = 71 Dict["E4",number] = 75 Dict["F4",number] = 79
- Dict["F4+",number] = 84 Dict["G4",number] = 89 Dict["G4+",number] = 94
- Dict["A4",number] = 101 Dict["A4+",number] = 106 Dict["B4",number] = 112
- Dict["C5",number] = 121 Dict["C5+",number] = 126 Dict["D5",number] = 134
- Dict["D5+",number] = 142 Dict["E5",number] = 150 Dict["F5",number] = 159
- Dict["F5+",number] = 168 Dict["G5",number] = 178 Dict["G5+",number] = 189
- Dict["A5",number] = 200 Dict["A5+",number] = 212 Dict["B5",number] = 224
- #C2 : C,D,E,F,G,25,28
- #C3 : 30(32),33(35),38,40(42),44(47),50(53),56
- #C4 : 60(63),67(71),75,79(84),89(94),101(106),112
- #C5 : 121(126),134(142),150,159(168),178(189),200(212),224
- Main = "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 " +
- "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 " +
- "G4,0.5 E4,1 D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 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 E4,0.5 E4,0.5 E4,0.5 G4,0.5 E4,1 " +
- "D4,0.5 D4,4 D4,1.5 C4,1 B3,1.5 A3,5"
- Sec = "X,3"
- SMain = Main:explode(" "):concat(" X,0.01 "):explode(" ")
- SSec = Sec:explode(" "):concat(" X,0.01 "):explode(" ")
- Lyrics = "Have you think of a moment just / Flexibility, " +
- "love and trust /Have you think of a moment just / Flexibility, " +
- "love and trust / Here comes a thought, /that might alarm you~ /" +
- "What someone say, /and how it harmed you~ /Something you did, /" +
- "that failed to be charming~ /Things that you say, /are suddenly " +
- "swarming~ / Ohh oh, you're losing sight, /you're losing touch~/All " +
- "these little things seemed to matter so much~ /That they confuse you, " +
- "/that I might lose you~/" + #Opening + S1
- "Take a moment remind yourself to- /take a moment to find yourself /" +
- "Take a moment to ask yourself if- / this is how we fall apart/" +
- "But it's not, but it's not, but it's not, but it's not, but it's not~/" +
- "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
- "You've got nothing, got nothing, got nothing, got nothing to fear~ /" +
- "I'm here, I'm here, I'm here~/" + #S1P2
- "Here comes a thought, /that might alarm me~ /What someone say, /" +
- "and how it harmed me~ /Something I did, /that failed to be charming~ " +
- "/Things that I say, /are suddenly swarming~ /" +
- " Ohh oh, I'm losing sight, /I'm losing touch~/All these little things " +
- "seemed to matter so much~ /That they confuse me, /that I might lose " +
- "me~/" + #S2
- "Take a moment remind yourself to- /take a moment to find yourself /" +
- "Take a moment to ask yourself if- / this is how we fall apart/" +
- "But it's not, but it's not, but it's not, but it's not, but it's not~/" +
- "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
- "You've got nothing, got nothing, got nothing, got nothing to fear~ /" +
- "I'm here, I'm here, I'm here~/And it was just a thought, just a thought, " +
- "just a thought, just a thought, just a thought~/" +
- "It's ok, it's ok, it's ok, it's ok, it's ok~ /" +
- "You can watch, you can watch, you can watch, you can watch them go by~/" +
- "From here, from here, from here~/" + #S2P2
- "Have you think of a moment just / Flexibility, love and trust /" +
- "Have you think of a moment just / Flexibility, " +
- "love and trust~ /" + "Thanks for listening :)"
- LChunk = 1
- LSelect = 0
- SL = Lyrics:explode("/")
- runOnTick(1)
- Section = 0
- Tick = 0
- MI = 1
- SI = 1
- Index = 1
- SI = 1
- Note = 0.4
- holoCreate(1,entity():toWorld(vec(6.7,2.5,13.4)),vec(4/12,18/12,4/12),entity():toWorld(ang()))
- holoParent(1,entity())
- for(H = 0,1){
- holoCreate(2 + H,entity():toWorld(vec(0,-4.5 -(4*H),17)),vec(3/12),entity():toWorld(ang()),vec(150,0,0),"hqsphere")
- }
- for(H = 0,3){
- holoCreate(4 + H,entity():toWorld(vec(0,-0.5 +(3*H),17)),vec(2/12),entity():toWorld(ang()),vec(150,0,0),"hqsphere")
- }
- for(H = 2,7){
- holoParent(H,entity())
- }
- timer("start",3200)
- #8k
- }
- else{
- if(clk("start")){
- Section = 1
- PreM = SMain[1,string]:explode(",")[2,string]:toNumber()
- PreS = SSec[1,string]:explode(",")[2,string]:toNumber()
- }
- if(Section == 1){
- Run += 0.014
- if(sqrt((floor(Run,2) - PreM)^2) <= 0.02){ # <= blunt range
- if(MI > SMain:count()){
- for(H = 2,3){
- holoColor(H,vec(150,0,0))
- }
- }
- elseif(SMain[MI,string]:explode(",")[1,string] != "X"){
- for(H = 2,3){
- SoundI += 1
- holoEntity(H):soundPlay(SoundI,SMain[MI,string]:explode(",")[2,string]:toNumber() * Note,"synth/tri.wav")
- soundPitch(SoundI,Dict[SMain[MI,string]:explode(",")[1,string],number])
- if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 113){
- if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 120){
- if(Dict[SMain[MI,string]:explode(",")[1,string],number] > 135){
- soundVolume(SoundI,0.4)
- }
- else{
- soundVolume(SoundI,0.5)
- }
- }
- else{
- soundVolume(SoundI,0.6)
- }
- }
- else{
- soundVolume(SoundI,0.9)
- }
- holoColor(H,vec(0,150,0))
- }
- if(LSelect >= SL[LChunk,string]:explode(" "):count()){
- LSelect = 1
- LChunk += 1
- }
- else{
- LSelect += 1
- }
- if(SL[LChunk,string]:explode(" ")[LSelect,string] != "" & SL[LChunk,string]:explode(" ")[LSelect,string]:upper() != "!X" & SMain[MI,string]:explode(",")[1,string] != "X"){
- #Output = SL[LChunk,string]:explode("X "):concat()
- }
- if(changed(LSelect) & LSelect == 1){
- Output = SL[LChunk,string]:explode("X "):concat():trim()
- setName(Output)
- #print(Output)
- }
- }
- else{
- for(H = 2,3){
- holoColor(H,vec(150,0,0))
- }
- }
- PreM = PreM + SMain[MI,string]:explode(",")[2,string]:toNumber() * Note
- MI += 1
- }
- if(sqrt((floor(Run,2) - PreS)^2) <= 0.02){ # <= blunt range
- if(SI > SSec:count()){
- for(H = 4,7){
- holoColor(H,vec(150,0,0))
- }
- }
- elseif(SSec[SI,string]:explode(",")[1,string] != "X"){
- for(H = 4,7){
- if(3+Index == H){
- SoundI += 1
- holoEntity(H):soundPlay(SoundI,SSec[SI,string]:explode(",")[2,string]:toNumber() * Note,"synth/tri.wav")
- soundPitch(SoundI,Dict[SSec[SI,string]:explode(",")[1,string],number])
- soundVolume(SoundI,0.6)
- holoColor(H,vec(0,150,0))
- }
- else{
- holoColor(H,vec(150,0,0))
- }
- }
- if(Index == 4){
- Index = 1
- }
- else{
- Index += 1
- }
- }
- else{
- for(H = 4,7){
- holoColor(H,vec(150,0,0))
- }
- }
- PreS = PreS + SSec[SI,string]:explode(",")[2,string]:toNumber() * Note
- SI += 1
- }
- if(Run > PreM & Run > PreS){
- #Section += 1
- }
- }
- else{
- }
- }
- if(first()){
- Logo = array("",
- "##########################################################################",
- "# #",
- "# ----- #### # #",
- "# --<<<<<<-- # # # #",
- "# -<<<<<<<<<<<-- # # # # #",
- "# |-<<<<<<-#####| # # ### #",
- "# |#-<<-########| # # # #",
- "# |##|##########| # # ### #",
- "# |##|#########= # ## # ## ## #### ## #",
- "# =##|########= # # # # # # # # # # #",
- "# =#|######= # # # ##### ##### #### ##### #",
- "# =#|####= # # # # # # # #",
- "# =|##= # # # # # # # # # # # # #",
- "# == #### # # ### ### #### ### #",
- "# #",
- "##########################################################################")
- timer("L",200)
- }
- if(clk("L")){
- L += 1
- print(2,Logo[L,string])
- if(L < Logo:count()){
- timer("L",200)
- }
- else{
- print("Music shell by Cheesecake :D")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment