Advertisement
Ezteyh

musique

Aug 19th, 2022
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.74 KB | None | 0 0
  1. local speaker = peripheral.find("speaker")
  2.  
  3. local instrument = "bit"
  4. local x = 0.25
  5. local volume = 4
  6.  
  7. function pt1()
  8. speaker.playNote(instrument, volume, 3)
  9. speaker.playNote(instrument, volume, 15)
  10. sleep(x)
  11. speaker.playNote(instrument, volume, 10)
  12. sleep(x)
  13. speaker.playNote(instrument, volume, 7)
  14. speaker.playNote(instrument, volume, 15)
  15. sleep(x)
  16. speaker.playNote(instrument, volume, 10)
  17. speaker.playNote(instrument, volume, 22)
  18. sleep(x)
  19. speaker.playNote(instrument, volume, 3)
  20. sleep(x)
  21. speaker.playNote(instrument, volume, 10)
  22. speaker.playNote(instrument, volume, 20)
  23. sleep(x)
  24. speaker.playNote(instrument, volume, 7)
  25. sleep(x)
  26. speaker.playNote(instrument, volume, 10)
  27. speaker.playNote(instrument, volume, 19)
  28. sleep(x)
  29. end
  30.  
  31. function pt2()
  32. speaker.playNote(instrument, volume, 5)
  33. speaker.playNote(instrument, volume, 17)
  34. sleep(x)
  35. speaker.playNote(instrument, volume, 10)
  36. speaker.playNote(instrument, volume, 14)
  37. sleep(x)
  38. speaker.playNote(instrument, volume, 7)
  39. sleep(x)
  40. speaker.playNote(instrument, volume, 10)
  41. sleep(x)
  42. speaker.playNote(instrument, volume, 5)
  43. sleep(x)
  44. speaker.playNote(instrument, volume, 10)
  45. sleep(x)
  46. speaker.playNote(instrument, volume, 8)
  47. sleep(x)
  48. speaker.playNote(instrument, volume, 10)
  49. end
  50.  
  51. function pt3()
  52.     speaker.playNote(instrument, volume, 5)
  53.     speaker.playNote(instrument, volume, 14)
  54.     sleep(x)
  55.     speaker.playNote(instrument, volume, 10)
  56.     sleep(x)
  57.     speaker.playNote(instrument, volume, 8)
  58.     speaker.playNote(instrument, volume, 14)
  59.     sleep(x)
  60.     speaker.playNote(instrument, volume, 10)
  61.     speaker.playNote(instrument, volume, 19)
  62.     sleep(x)
  63.     speaker.playNote(instrument, volume, 5)
  64.     sleep(x)
  65.     speaker.playNote(instrument, volume, 10)
  66.     speaker.playNote(instrument, volume, 17)
  67.     sleep(x)
  68.     speaker.playNote(instrument, volume, 8)
  69.     sleep(x)
  70.     speaker.playNote(instrument, volume, 10)
  71.     speaker.playNote(instrument, volume, 14)
  72. end
  73.  
  74. function pt4()
  75.     speaker.playNote(instrument, volume, 3)
  76.     speaker.playNote(instrument, volume, 15)
  77.     sleep(x)
  78.     speaker.playNote(instrument, volume, 10)
  79.     speaker.playNote(instrument, volume, 19)
  80.     sleep(x)
  81.     speaker.playNote(instrument, volume, 12)
  82.     sleep(x)
  83.     speaker.playNote(instrument, volume, 14)
  84.     sleep(x)
  85.     speaker.playNote(instrument, volume, 15)
  86.     sleep(x)
  87.     speaker.playNote(instrument, volume, 14)
  88.     sleep(x)
  89.     speaker.playNote(instrument, volume, 12)
  90.     sleep(x)
  91.     speaker.playNote(instrument, volume, 10)
  92. end
  93.  
  94. function pt5()
  95.     speaker.playNote(instrument, volume, 3)
  96.     speaker.playNote(instrument, volume, 15)
  97.     sleep(x)
  98.     speaker.playNote(instrument, volume, 10)
  99.     sleep(x)
  100.     speaker.playNote(instrument, volume, 7)
  101.     sleep(x)
  102.     speaker.playNote(instrument, volume, 10)
  103.     sleep(x)
  104.     speaker.playNote(instrument, volume, 3)
  105.     sleep(x)
  106.     speaker.playNote(instrument, volume, 10)
  107.     sleep(x)
  108.     speaker.playNote(instrument, volume, 7)
  109.     sleep(x)
  110.     speaker.playNote(instrument, volume, 10)
  111. end
  112.  
  113. function pt6()
  114.     speaker.playNote(instrument, volume, 3)
  115.     speaker.playNote(instrument, volume, 19)
  116.     sleep(x)
  117.     speaker.playNote(instrument, volume,10)
  118.     sleep(x)
  119.     speaker.playNote(instrument, volume, 7)
  120.     sleep(x)
  121.     speaker.playNote(instrument, volume, 10)
  122.     sleep(x)
  123.     speaker.playNote(instrument, volume, 3)
  124.     speaker.playNote(instrument, volume, 22)
  125.     sleep(x)
  126.     speaker.playNote(instrument, volume, 10)
  127.     sleep(x)
  128.     speaker.playNote(instrument, volume, 7)
  129.     sleep(x)
  130.     speaker.playNote(instrument, volume, 10)
  131. end
  132.  
  133. function pt7()
  134.     speaker.playNote(instrument, volume, 3)
  135.     speaker.playNote(instrument, volume, 20)
  136.     sleep(x)
  137.     speaker.playNote(instrument, volume, 12)
  138.     speaker.playNote(instrument, volume, 22)
  139.     sleep(x)
  140.     speaker.playNote(instrument, volume, 8)
  141.     speaker.playNote(instrument, volume, 20)
  142.     sleep(x)
  143.     speaker.playNote(instrument, volume, 12)
  144.     speaker.playNote(instrument, volume, 19)
  145.     sleep(x)
  146.     speaker.playNote(instrument, volume, 3)
  147.     speaker.playNote(instrument, volume, 17)
  148.     sleep(x)
  149.     speaker.playNote(instrument, volume, 12)
  150.     sleep(x)
  151.     speaker.playNote(instrument, volume, 8)
  152.     sleep(x)
  153.     speaker.playNote(instrument, volume, 12)
  154. end
  155.  
  156. function pt8()
  157.     speaker.playNote(instrument, volume, 5)
  158.     speaker.playNote(instrument, volume, 14)
  159.     sleep(x)
  160.     speaker.playNote(instrument, volume, 10)
  161.     sleep(x)
  162.     speaker.playNote(instrument, volume, 8)
  163.     sleep(x)
  164.     speaker.playNote(instrument, volume, 10)
  165.     sleep(x)
  166.     speaker.playNote(instrument, volume, 2)
  167.     speaker.playNote(instrument, volume, 17)
  168.     sleep(x)
  169.     speaker.playNote(instrument, volume, 10)
  170.     sleep(x)
  171.     speaker.playNote(instrument, volume, 8)
  172.     sleep(x)
  173.     speaker.playNote(instrument, volume, 10)
  174. end
  175.  
  176. function pt9()
  177.     speaker.playNote(instrument, volume, 3)
  178.     speaker.playNote(instrument, volume, 19)
  179.     sleep(x)
  180.     speaker.playNote(instrument, volume, 10)
  181.     speaker.playNote(instrument, volume, 20)
  182.     sleep(x)
  183.     speaker.playNote(instrument, volume, 7)
  184.     speaker.playNote(instrument, volume, 19)
  185.     sleep(x)
  186.     speaker.playNote(instrument, volume, 10)
  187.     speaker.playNote(instrument, volume, 17)
  188.     sleep(x)
  189.     speaker.playNote(instrument, volume, 7)
  190.     speaker.playNote(instrument, volume, 15)
  191.     sleep(x)
  192.     speaker.playNote(instrument, volume, 10)
  193.     sleep(x)
  194.     speaker.playNote(instrument, volume, 9)
  195.     sleep(x)
  196.     speaker.playNote(instrument, volume, 10)
  197. end
  198.  
  199. function pt10()
  200.     speaker.playNote(instrument, volume, 8)
  201.     speaker.playNote(instrument, volume, 20)
  202.     sleep(x)
  203.     speaker.playNote(instrument, volume, 17)
  204.     speaker.playNote(instrument, volume, 19)
  205.     sleep(x)
  206.     speaker.playNote(instrument, volume, 12)
  207.     speaker.playNote(instrument, volume, 20)
  208.     sleep(x)
  209.     speaker.playNote(instrument, volume, 17)
  210.     speaker.playNote(instrument, volume, 22)
  211.     sleep(x)
  212.     speaker.playNote(instrument, volume, 8)
  213.     speaker.playNote(instrument, volume, 24)
  214.     sleep(x)
  215.     speaker.playNote(instrument, volume, 17)
  216.     sleep(x)
  217.     speaker.playNote(instrument, volume, 12)
  218.     sleep(x)
  219.     speaker.playNote(instrument, volume, 17)
  220. end
  221.  
  222. function pt11()
  223.     speaker.playNote(instrument, volume, 5)
  224.     speaker.playNote(instrument, volume, 22)
  225.     sleep(x)
  226.     speaker.playNote(instrument, volume, 10)
  227.     sleep(x)
  228.     speaker.playNote(instrument, volume, 8)
  229.     speaker.playNote(instrument, volume, 20)
  230.     sleep(x)
  231.     speaker.playNote(instrument, volume, 10)
  232.     speaker.playNote(instrument, volume, 19)
  233.     sleep(x)
  234.     speaker.playNote(instrument, volume, 5)
  235.     speaker.playNote(instrument, volume, 20)
  236.     sleep(x)
  237.     speaker.playNote(instrument, volume, 10)
  238.     sleep(x)
  239.     speaker.playNote(instrument, volume, 8)
  240.     sleep(x)
  241.     speaker.playNote(instrument, volume, 10)
  242. end
  243.  
  244. function pt12()
  245.     speaker.playNote(instrument, volume, 3)
  246.     speaker.playNote(instrument, volume, 19)
  247.     sleep(x)
  248.     speaker.playNote(instrument, volume, 10)
  249.     speaker.playNote(instrument, volume, 21)
  250.     sleep(x)
  251.     speaker.playNote(instrument, volume, 7)
  252.     speaker.playNote(instrument, volume, 19)
  253.     sleep(x)
  254.     speaker.playNote(instrument, volume, 10)
  255.     speaker.playNote(instrument, volume, 17)
  256.     sleep(x)
  257.     speaker.playNote(instrument, volume, 3)
  258.     speaker.playNote(instrument, volume, 15)
  259.     sleep(x)
  260.     speaker.playNote(instrument, volume, 5)
  261.     sleep(x)
  262.     speaker.playNote(instrument, volume, 7)
  263.     sleep(x)
  264.     speaker.playNote(instrument, volume, 8)
  265. end
  266.  
  267.  
  268. while (1) do
  269.  
  270. pt1()
  271. pt2()
  272. pt3()
  273. pt4()
  274. pt1()
  275. pt2()
  276. pt3()
  277. pt5()
  278. pt6()
  279. pt7()
  280. pt8()
  281. pt9()
  282. pt6()
  283. pt10()
  284. pt11()
  285. pt12()
  286.  
  287. sleep(1200)
  288.  
  289. end
  290.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement