GP32 Mirko-sdk, Sound; How Does It Work?


Joined
Jan 16, 2004
Messages
297
Location
hell
Website
diab0l.pdroms.de
using mirko's sdk and trying to implement sound into my game..
i'm sorry to bother on here, but i dont know how to use "samples"
at all, i think they're even too big for my needs, i dont want to write 200 charactsers just for a "blip"
any suggestions?
maybe asm?

thanks in advance..
 
The GP32 doesn't have any dedicated sound hardware, just a D2A chip, so samples is all you got I'm affraid. If you don't want to make them, you can find thousands on the net to download (don't forget you can also turn a .wav or part of a wav easily into a sample also).

Why are talking about ASM?
 
shit,shit,shit
so i'll have to bother with samples >.<
i dont want to use samples of the net or to convert those shitty wavs, since it will end up in having 100kb for the blip and 100kb for the blop and coming to that 1mb for the music
guess i'll program them somehow ;)
didnt know that the sample-thing is chip-dependant, thatswhy i thought about asm to produce some clear waves ^^
 
Well, you might generate a sample one time during your programm, like, generate a 100kb stereo sine-wave (or a modulated one, whatever) and just play that one. crystal clear and without converting any samples.
 
If you don't want 100kb samples for "blips" and "blops", then you can reduce the sample frequency to, say, 11000 and use 8bit.
 
i'd stick to sine-waves :)
but since i dont know too much about samples, i'd be happy for an example-function or sth. how to generate the sine-wave-sample ^^
thanks for the advices so far ^^
 
Well a sine-wave will not make miracles, all you will ear is a uniform sound which will not be very useful nor pleasant to ear.

I guess you'll have to stick to samples, as sound generation needs very complex algorithms, and all you will get is a nes sound quality if you're very good..

At 11000 samples/s and 8 bit, one second of sound takes only 11kB ! And a blip doesn't last one second !!
 
since WAV is just an containr format, what sound format do I really need for sound? (it's a bit late asking, this... cause the sound in vertical is already crap)
 
i'd stick to sine-waves :)
but since i dont know too much about samples, i'd be happy for an example-function or sth. how to generate the sine-wave-sample ^^
thanks for the advices so far ^^
Sine waves are very quiet. Why not use Square waves?

Very simple, just +0x4000 and then -0x4000. 1/period = frequency, e.g. 440hz for an A note (50 sample high, 50 sample low)
 
Last edited by a moderator:
Back
Top