Created
August 6, 2026 16:59
-
-
Save abnrk/2486ebc052fa2eaef8fb16941cb936b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local waveforms = { | |
| "7 10 12 13 14 13 12 10 7 4 2 1 0 1 2 4 7 11 13 14 13 11 7 3 1 0 1 3 7 14 7 0", | |
| "0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15", | |
| "14 14 7 7 14 14 7 7 14 14 7 7 14 14 7 7 0 0 7 7 0 0 7 7 0 0 7 7 0 0 7 7", | |
| "7 14 12 9 12 14 10 7 12 15 13 8 10 11 7 2 8 13 9 4 5 7 2 0 3 8 5 1 3 6 3 1", | |
| "11 13 14 13 12 10 8 8 8 10 12 13 14 13 11 8 4 2 1 2 3 5 7 7 7 5 3 2 1 2 4 7", | |
| "0 2 3 4 6 6 4 5 9 10 10 8 10 7 10 9 7 7 9 6 8 6 5 6 10 12 10 10 12 13 14 15" | |
| } | |
| for i=0,#waveforms-1 do | |
| local wave = waveforms[i+1] | |
| local f = io.open(tostring(i) .. ".raw","wb") | |
| for x in wave:gmatch("%S+") do | |
| f:write(string.char((tonumber(x)/15)*255)) | |
| end | |
| f:close() | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment