goombas.org
menu
main
links
all items
rss feed

Topics:
coding
games
goombas.org
horror
judgement
life
minutiae
music
rants
software
fool.
 _-
 oO
 |/
/|
/ \
Ugh, stop twitching
sample ripping
software Posted 2003-12-05 22:07:40 by Jim Crawford
Today, I had the occasion to write a program, in Python, to rip samples out of .mod files and store them in the .wav format. Here is it, the real mod sample ripping program from real mod sample rippers.

The needs this program fills that the competition doesn't are two: it runs as a batch process, and it tries to guess the intended playback rate of the samples by analyzing the note information in the patterns. Every other program I tried required two or three keystrokes per sample and set the sample rate in the output to 8363hz.

Despite these killer features, I realize that the cross-section of people who need to rip samples out of a directoryful of mods and people who have Python installed is very small. Consider this code a gift to the archaeologists of future civilizations.

And since I can't leave out my contemporaries, here's a summary of the information I gleaned from the experience:

  • .wav file format: horrendous.
  • .mod file format: utterly horrendous.
  • binary file I/O in Python: surprisingly pleasant.
[link to this] [See more on “software”]

comments
python is great
Posted by Jim Crawford on 2004-08-17 17:35:21
I love this. I look at rip.py again, almost a year after writing it, and it's perfectly understandable and, quite frankly, looks like poetry. I know this is not my doing, because none of my C or Perl code has ever looked this good a year later. Hooray for Python!

... I do seem to have forgotten what that star on line 80 does, though.
add a comment
Only anonymous comments are available for now until I get the user system up and running again. Not many people were logging in anyway, so enh.
Permitted HTML tags: <b>, <i>, <u>, <tt>. Also permitted is the <q> pseudo-tag which is meant to delimit quotes from other messages.
name:
email:
subject:
body:
Preview
To prove you are sentient, please type "sentient" into this box

what's this?
This is Jim Crawford's blog. Details and contact information.

On Twitter: @mogwai_poet

recent comments
no subject (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
QuickBooks Technical Support Phone Number @1844-640-1482
(Anonymous on may 2013 microblog digest)
phone number for quickbooks support (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
Accountancy (Anonymous on may 2013 microblog digest)
QuickBooks Technician (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
quickbooks support (Anonymous on may 2013 microblog digest)
Loved the game (Anonymous on boxing: a history)
no subject (Anonymous on may 2013 microblog digest)
no subject (Anonymous on may 2013 microblog digest)
Aol Tech Support Number (Anonymous on may 2013 microblog digest)
Time Mushyn (Anonymous on foolish 2)
Packers and Movers Bangalore (Anonymous on may 2013 microblog digest)
Comments RSS