Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spkr = peripheral.wrap("right")
- pit=0
- cng=1
- instrument = {"harp","bass","snare","hat","basedrum","flute","bell","chime","guitar", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling"}
- i=8
- while true do
- if pit==0 then
- cng=1
- i=(i+1)%16
- shell.run("clr")
- print(instrument[i+1])
- elseif pit==24 then
- cng=-1
- end
- spkr.playNote(instrument[i+1],15,pit)
- pit=pit+cng
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement