Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = peripheral.wrap('left')
- function playnote(s,channel,note, time)
- local f = 0
- if note == 'c' then f = 261.63
- elseif note == 'c#' then f = 277.18
- elseif note == 'd' then f = 293.66
- elseif note == 'd#' then f = 311.13
- elseif note == 'e' then f = 329.63
- elseif note == 'f' then f = 349.23
- elseif note == 'f#' then f = 369.99
- elseif note == 'g' then f = 392.00
- elseif note == 'g#' then f = 415.30
- elseif note == 'a' then f = 440.00
- elseif note == 'a#' then f = 466.16
- elseif note == 'b' then f = 493.88
- end
- s.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement