Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speaker = peripheral.find("speaker")
- local m = peripheral.wrap("back")
- term.redirect(m)
- m.setTextScale(.5)
- xSize,ySize = m.getSize()
- x=0
- y=0
- local function playSound()
- while true do
- speaker.playNote("guitar",1,y/(ySize/24))
- sleep((1/8/20))
- end
- end
- local function getTone()
- while true do
- e,side,x,y = os.pullEvent("monitor_touch")
- end
- end
- parallel.waitForAny(playSound, getTone)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement