Skip to content

Instantly share code, notes, and snippets.

View SilSinn9801's full-sized avatar
💭
I may be slow to respond because of my PMD98 music duties.

Silent Sinner in Scarlet SilSinn9801

💭
I may be slow to respond because of my PMD98 music duties.
View GitHub Profile
@Pigu-A
Pigu-A / dmf2pmd.py
Created January 17, 2018 13:33
Deflemask module (.dmf) to PMD MML converter
# By Pigu
# Usage: dmf2pmd.py <input.dmf> <output.txt>
import io, math, string, sys, zlib
poke = lambda c,o,a,d: "y{},{}".format(a+(c%3)+o*4,d)
timerB = lambda x: math.floor(256.5-(10400/3/x))
u8 = lambda x: int.from_bytes(x.read(1),byteorder="little")
s16 = lambda x: int.from_bytes(x.read(2),byteorder="little",signed=True)
s32 = lambda x: int.from_bytes(x.read(4),byteorder="little",signed=True)
@HertzDevil
HertzDevil / dump.lua
Created August 19, 2016 03:29
MDRV2 MDT to MML unconverter
-- MDT filename is the only command line argument
local schar = function (f)
local z = string.byte(f:read(1))
return z >= 0x80 and z - 0x100 or z
end
local char = function (f)
return string.byte(f:read(1))
end
local sshort = function (f)