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 we give you the numbers. use the numbers!)
no subject (Anonymous on #weightedsixes
: back and with more bots than ever)
no subject (Anonymous on i didn't say it, he said it)
no subject (Anonymous on digital: a love story -- one-hour review)
no subject (Anonymous on clipping a line segment to a triangle)
no subject (Anonymous on dance dance revolution in the future)
no subject (Anonymous on the best way to eat beans)
no subject (Anonymous on gta3 for gba: the burning question)
no subject (Anonymous on duke nukem forever -- one-hour review)
no subject (Anonymous on take a key for coming in)
no subject (Anonymous on super monkey ball 2 mini-review)
no subject (Anonymous on bioshock, system shock 2, and fear)
no subject (Anonymous on tim's working on physics)
no subject (Anonymous on a review of actionbutton.n
et)
no subject (Anonymous on experts; atari 2600 display hardware)
Comments RSS