Offline
Toronto, Canada
nitro2k01 wrote:

Ok, brief explanation on how to do it, but then you're on your own. Create a file that is a 1 bar loop. Convert it to 8 bit unsigned mono and 32768 samples long. Hint on the last part, making it exactly 1 second long and then converting it to 32678 Hz sample rate should at least get you close. You might need to manually trim or add a couple of samples with a hex editor. If you're adding samples, repeat the last sample value in the file or so. (Who ever said this was supposed to easy?)
Run the following Python script. It will convert the file you've created to the 4-bit format the Gameboy so much craves and create a new ROM with your sample.

def fourbit(x):
    return ord(x) & 0xf0

def fatconv(fn):
    f = open(fn + ".raw", "rb")
    x = f.read()
    f.close()

    if len(x) != 32768:
        print "File should be 32768 samples long, yo. 8-bit unsigned mono is where it's at, dawg. Raw with no header. (That's what bshe said.)"
        return

    g = open("amenizer.gb", "rb")
    gb = g.read(16384)
    g.close()


    y=map(fourbit,x)
    y=zip(y[0::2],y[1::2])

    #f = open(fn + "-conv.bin", "wb")
    g = open(fn + "-rom.gb", "wb")
    g.write(gb)

    for i in y:
        #f.write(chr(i[0] | i[1]>>4))
        g.write(chr(i[0] | i[1]>>4))

    f.close()

fatconv("filenamehere")

However, the final version of this application, when it comes out, will surely blow your minds. Just a prediction.

First off, thanks for taking the time to post this.  Now, let's assume I have a basic knowledge of snakes, and even less for coding.  Did a bit of reading last night, and pretty sure I can figure out how to cast this spell.  Only questions I have, quite probably dumb ones, in the incantation above, the part that mentions 'dawg's' and stuff; should I leave that as is, or am I supposed to add my own 'something' to this line, eye of newt, tongue of frog, etc?  Also, at the bottom 'filenamehere'; is this where I would put the name I want the file to have when it is created, or the name of my audio sample?

Are there any other fields above that I need to change or anything?  Last but not least, do I put this in a folder with my sample and just start chanting the above passage and a rom appears?

Looking forward to further investigating the black arts of rom creation and the arcane knowledge held within.

Last edited by Infinity Curve (Mar 11, 2013 1:09 pm)

Offline
Sweeeeeeden

The only line you should have to edit is the line at the end.

fatconv("filenamehere")

In this case it's assumed that you have prepared a raw sound file called filenamehere.raw but notice that you shouldn't include .raw in the code. If you're getting  If you're getting dawg'd, it's probably because the raw file isn't the exact right length.

Offline

Re: Amenizer, should it be possible to sync it with Nanloop 1.? (pre-1.3 I think, possibly 1.1) I've tried to no avail... I seem to have nanoloop in slave mode, it plays one step if i unplug the cable, but nothing happens/changes when i play the amen slicing rom. Not sure whether it just shouldn't work anyway or if I'm overlooking some esoteric thing about how syncing works on my old nanoloop cart...? ^_^;

Last edited by Cementimental (Mar 26, 2013 10:35 pm)

Offline
Sweeeeeeden

As it currently stands, no. This should be an easy fix, however.

PS, I'm not dead. Hopefully I should be up to speed by the end of the week. Half the battle is writing informative posts, and I kind of got stuck on that with the "filter" ROM that I dropped early. (See the last post on the previous thread page.) And please check out that ROM and give some comments.

Offline
Sweeeeeeden

This project, in its original form, is dead as you may have noticed. But let me drop another ROM, because why not.

http://blog.gg8.se/gameboyprojects/weekX/noisewave.zip

Offline
Toronto, Canada

Seems pretty neat.  Midi control for pitch on this and rez would be nice.  Any further work on the amenizer rom?  Front end for loading custom samples.  I tried doing it myself and I'm still walking with a limp from the ordeal.

Oh, and before I forget again, I recently met somebody you went to college with.  He was kind of surprised I knew who you were.

Offline

Manipulating noise you say? THAT'S MY THING ^__^ look forward to having a go thanks

Offline

Fun sounds, thanks for this smile