For those of you who can’t make music
but can run Python, here’s a little something for you. It might be a bit too cheesy for your game, unfortunately… if you want to you can try modifying it to use a minor scale. Also, you’ll need some samples, and a tracker to put the samples in.
Suddenly, your game has a somewhat full sounding soundtrack with a bunch of randochords shoved in.
Enjoy!
EDIT: Here’s a version which does minor scales every now and then and generates its own (not very good) samples.
EDIT 2 (Dec 2011!): The links are a bit dead, so try this: http://gm.64pixels.org/stuff/atrk-c-edit.py.txt – this edit was because ExciteMike linked to here. I should probably consider a new version of this thing, most likely from scratch again. Also have some samples.
I’ve been messing around for a few days in MilkyTracker just so I have ideas for the compo. I will check your tool out if for no other reason than curiosity
Too bad I can’t use python. Sigh.
It doesn’t seem to be making usable songs for me. Are these not standard Impulse Tracker files? I’m using Python 2.6 in WinXP, and testing songs in Winamp, OpenMPT, and ChibiTracker. I either get a repeating “beep” or just silence.
@RunnerPack: You need to add your own samples. Open ChibiTracker and then try to shove some in. I’ve supplied a link which should point you to here: http://pubacc.wilcox-tech.com/~greaser/mods/pax/
Oh yeah, uh, 1 = lead, 2 = bass, 3 = closed hihat, 4 = kickdrum, 5 = snaredrum, 6 = chords.
Okay, I put in some samples, but that doesn’t change the fact that it’s looping after a couple of notes in the first pattern; sometimes it loops on the second or third tick before any notes play at all. Could you point out where it chooses the effect so I can just prevent it from putting in loops and pattern breaks entirely?
…OK, that’s just weird. Could you please upload the original file somewhere (or generate another)?
https://dl.dropbox.com/u/5754740/dump-c.it
(Note: straight from the script–I didn’t add samples.)
Well, I figured it out… For some reason, OpenMPT doesn’t like the files. They open fine in SchismTracker (once I learned how to add samples the DOS way
But, if you could get OpenMPT and figure out how to get the songs to load in it, I’d be very grateful.
I really like the output, even with unoptimized samples! It’ll definitely get me on my way making music that doesn’t cause ears to bleed ;D Thanks for sharing!
BTW, they seem to use more than the six samples you list above; more like ten or twelve.
Seems to be an issue when I make something that makes .it files. I think OpenMPT expects MIDI macro information after all the pointers, which is something I don’t shove in because it’s not documented. IIRC you just do 01 00 00 00 00 00 or something.
I opened in Milkytracker and I don’t see any pattern data at all in the resulting file. Do I have to pass parameters of some sort?
@Billy: I’m not sure why it’s doing that, but I am aware that Milkytracker sometimes modifies pattern data on load for various reasons (e.g. stripping out A00, 100 and 200 from .mod files). Would you be able to upload somewhere so I can have a look at it?
Also you might want to try using a different tracker.
Yeah I think Milkytracker is the problem. I grabbed Schismtracker and it shows the patterns. Milkytracker doesn’t perfectly support all the big ones but I can play a lot of .its with it…..
Well, the data’s there then, I’ll find a tracker I’m comfortable with and drop in some samples. Thanks!
I like the edit. Much easier for the lazy when it puts the samples in for you
The tracks sound great.
I’ll have to do a few dozen to see how much variation there is, but I’m really impressed! Definitely gonna use this for my entry as I have NO musical aptitude, lol
I second the request for including samples. Even if you don’t actually load data from files, some simple, procedural “chiptune” ones would be handy (square, triangle, sine, etc.).
He DID edit that in though, is what I’m saying
“EDIT: Here’s a version which does minor scales every now and then and generates its own (not very good) samples.”
Here’s some examples, if anyone who can’t get it running is curious what they’re missing:
http://billy.wenge-murphy.com/module1.ogg
http://billy.wenge-murphy.com/module2.ogg
*facepalm* I didn’t even notice that
I think the samples are pretty good, actually.
This is totally the “sfxr” of bg music! I’ve already heard it make perfectly recognizable “boss fight”, “shmup”, and “title screen” songs! You rock, GreaseMonkey!
This is pretty sweet! I’m seeing if I can quickly combine this with http://www.photonstorm.com/flod so that I don’t have to convert to mp3 first.
It keeps making cool music!
How can I customize the output?
I want it to make a slow song
@elbowroom: Get an .it based tracker such as SchismTracker, then edit the speed (F9 to load, F12 for the speed settings, F5 to play, F8 to stop, F10 to save).
Alternatively, try changing the base speed in the .py file.
Look for this line:
fp.write(struct.pack(“<BBBBBB",128,48,4,125,128,0))
The 125 is where the speed is. If you change that to a lower number, it should be slower.
I was not expecting that to make such moving song. Why is this so awesome? D:
How would you convert the .it files to .mid? I want to use this with Game Maker, but… it doesn’t support .it music files… D:
Open the .it file in a tracker program – I’ve been using Schism Tracker (linked in the OP) to great effect. From there, convert to wav, and then from wav to mid using the method of your choice.
For anyone who’s wondering, VLC (open source video and audio player) will play these files. And convert them to MP3, etc
(To convert to MP3, use the Streaming/Export wizard, transcode audio to MP3, encapsulate as RAW, then rename file to .mp3 when done.)
Could somebody please explain how to use this? I tried running it from a cmd prompt but I only get an error message:
M:\downloads>atrk-c-edit.py
File “M:\downloads\atrk-c-edit.py”, line 585
print “rep”, self.pat_chorus_base, self.pat_chorus_ord, len(self.orders)
^
SyntaxError: invalid syntax
For everyone wondering about this as well: The script doesn’t work with python 3.x.x. After installing 2.7.3, it worked.
The source says the application stands under GPL, but which license do the music files generated with this application have?