Advertisement
Guest User

Untitled

a guest
Apr 7th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function playnext()
  2.   abc = {}
  3.   def = {}  
  4.   hgm = {}
  5.   len = #mem.melody[mem.current]
  6.   for i = 1, len do
  7.     --ASCII value of character
  8.     byte = string.byte(mem.melody[mem.current], i)
  9.     if(byte < 100) then
  10.        abc[#abc+1] = byte
  11.     elseif(byte < 103) then
  12.        def[#def+1] = byte
  13.     else
  14.        hgm[#hgm+1] = byte
  15.     end
  16.   end
  17.  
  18.   digiline_send("ch_abc", abc)
  19.   digiline_send("ch_def", def)
  20.   digiline_send("ch_hgm", hgm)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement