Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oldWrap = peripheral.wrap
- ints = {
- [0] = "note.harp",
- [1] = "note.bd",
- [2] = "note.snare",
- [3] = "note.hat",
- [4] = "note.bassattack"
- }
- peripheral.wrap = function(side)
- local p = oldWrap(side)
- p.oldNote = p.playNote
- p.playNote = function(int, note)
- int = ints[int]
- anote = math.pow(2, (note-12) /12)
- p.playSound(int, anote, 1)
- end
- return p
- end
Add Comment
Please, Sign In to add comment