This file contains 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
#!/usr/bin/env python3 | |
""" | |
A very simple and hacky Python3 script to convert 16-bit uncompressed WAV | |
files to MPC-3000 .SND files. | |
The output is modelled to copy the output of Wav2Snd | |
(http://www.mpc3000.com/wavsnd.htm) but this might be a bit more portable | |
to run on modern machines. |
This file contains 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
""" | |
A very simple and hacky script to convert 16-bit or 24-bit WAV sample files to 4-bit. | |
Files must be mono and uncompressed PCM data. | |
Output is a 4-bits-per-sample output, with an end marker byte, suitable for TTRAK playback. | |
""" | |
import struct, math | |
import os, array |
This file contains 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
if __name__ == '__main__': | |
import struct, sys | |
pi1 = open(sys.argv[1], "rb") | |
header = pi1.read(34) # skip the header data | |
pi1_bytes = pi1.read(32000) # We just want the pixeles | |
pi1.close() | |
out_bytes = bytearray(256 * 8) | |
for b in range(0, 256*8): |
This file contains 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
# sample output on my windows mingw setup | |
cpp:algorithm, 8196 | |
cpp:array, 13 | |
cpp:atomic, 2464 | |
cpp:backward, 4 | |
cpp:bits, 4 | |
cpp:bitset, 9187 | |
cpp:cassert, 27 | |
cpp:ccomplex, 18329 | |
cpp:cctype, 154 |
This file contains 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
#!/usr/bin/env sh | |
curl http://sun.hasenbraten.de/vasm/release/vasm.tar.gz > vasm.tar.gz | |
curl http://sun.hasenbraten.de/vlink/release/vlink.tar.gz > vlink.tar.gz | |
mkdir vasm | |
mkdir vlink | |
tar -zxvf ./vasm.tar.gz # unpacks to "vasm" | |
tar -zxvf ./vlink.tar.gz # unpacks to "vlink" |