
old_freq = [ 172, 181, 192, 204, 216, 229, 242, 257, 272, 288, 305, 323 ]
new_freq = [ 172, 183, 194, 205, 217, 230, 244, 258, 274, 290, 307, 326 ]

def interleave(ft):
    s = "\t.byte "
    for f in ft:
        f = f * 4
        s += "%d, " % (f & 255)
    s = s[:-2] # strip trailing ", "
    s += "\n\t.byte "
    for f in ft:
        f = f * 4
        s += "%d, " % (f >> 8)
    s = s[:-2]
    return s

def hexC(ft):
    s = ""
    for f in ft:
        f = f * 4
        s += "0x%02X, " % (f & 255)
    for f in ft:
        f = f * 4
        s += "0x%02X, " % (f >> 8)
    return s

def hexP(ft):
    s = ""
    for f in ft:
        f = f * 4
        s += "%02X " % (f & 255)
    for f in ft:
        f = f * 4
        s += "%02X " % (f >> 8)
    return s

print("Old:")
print(interleave(old_freq))
print(hexC(old_freq))
print(hexP(old_freq))

print("New:")
print(interleave(new_freq))
print(hexC(new_freq))
print(hexP(new_freq))
