Microstar301

CC / TEST TAPE CREATOR

Aug 27th, 2023
1,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. --
  2. -- CC TEST TAPE CREATOR
  3. --
  4. -- made for CC Tweaked / Computercraft and Computronics
  5. --
  6. --
  7.  
  8. tape = peripheral.wrap("bottom")
  9. tape.seek(-tape.getSize())
  10.  
  11. --PITCH IS EXPONENTIAL
  12. -- 3 = 1000hz
  13. -- 6 = 500hz
  14. -- 12 = 250hz
  15. -- 24 = 125hz
  16. --in HZ !
  17. pitch=300
  18.  
  19. pitch=((3*1000)/pitch)
  20. for i=1,333*(5/pitch) do
  21.     for t=1,pitch do
  22.         tape.write(155)
  23.     end
  24.     for t=1,pitch do
  25.         tape.write(100)
  26.     end
  27.     if ((i%500)==0) then
  28.         sleep(0.1)
  29.     end
  30.     write("*")
  31. end
Advertisement
Add Comment
Please, Sign In to add comment