Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speaker = peripheral.find('speaker')
- if not speaker then
- error('No speaker peripheral found. Please connect a speaker and try again.')
- end
- local song = {
- {'harp', 1, 9, 0.63},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 9, 0.24},
- {'harp', 1, 9, 4.35},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 9, 0.24},
- {'harp', 1, 6, 0.98},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 8, 0.48},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.73},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 6, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 7, 0.00},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 7, 0.48},
- {'harp', 1, 8, 0.00},
- {'harp', 1, 8, 0.73},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 8, 0.24},
- {'harp', 1, 9, 0.19},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 7, 0.24},
- {'harp', 1, 5, 0.24},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 3, 0.24},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 1.69},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 4, 1.21},
- {'harp', 1, 3, 0.73},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 3, 0.97},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 4, 0.24},
- {'harp', 1, 4, 0.73},
- {'harp', 1, 6, 0.00},
- {'harp', 1, 6, 0.97},
- {'harp', 1, 4, 0.97},
- }
- for _, note in ipairs(song) do
- speaker.playNote(note[1], note[2], note[3]) -- Play the note with instrument, volume, and pitch
- os.sleep(note[4]) -- Sleep after the note for the given time
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement