Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2018-01-16 14:17:34

rail5
New member
Registered: 2018-01-16
Posts: 3

A question about GBDK samples

I couldn't find any instructions directly pertaining to GBDK, but I found an .edu with instructions on playing samples using ASM. Downloaded an old DOS tool, converted a wav to mod and mod to gbw, output  hex from the gbw into the sample data and it played a bunch of distorted noise rather than the actual sound I was trying to play.

Evidently I have ZERO idea what I'm doing, could somebody help me understand how the process works from wav/mp3 to 16k samples in the code?

Thanks!

Edit: I can hear SOME remnants of the sound I'm trying to play when I listen closely, beneath the distorted mess. The samptest that came with GBDK works fine, so I took that hex, converted to binary, exported it as a wav and did the same process to that wav as I did to the previous wav. The resulting sound in the ROM was as crystal clear as before. Evidently the problem is in the sounds, so I guess my new question is what can and can't be used? Is it to do with the frequencies in the sound? The sample rate and bitrate are the same between all files I've been using. 4096hz, 32-bit float, exported as an 8-bit raw file, converted to hex.

Last edited by rail5 (2018-01-16 14:55:36)

Offline

 

#2 2018-01-16 14:58:35

rail5
New member
Registered: 2018-01-16
Posts: 3

Re: A question about GBDK samples

https://i.imgur.com/w6TQYDx.png
^ spectrum analysis of the built-in GBDK sample which works

https://i.imgur.com/NaPC8eR.png
^ spectrum analysis of one of the files which does not work / distorts like hell

my code: https://pastebin.com/tQeWEK9b

Last edited by rail5 (2018-01-16 15:14:00)

Offline

 

#3 2018-01-17 10:55:47

Hell_666
Member
Registered: 2017-12-13
Posts: 18

Re: A question about GBDK samples

I am not sure to understand you question but I am not wrong, having a mod file is usefull to edit your sound in a tracker and almost to have a tool to compose the sound on 4 channels.

Personaly, I have implemented gbt player in my engine, it's a great tool, I can compose musics with a tracker than play it very easily in my own code. You should try to use it, it is quite easy and powerfull.

Offline

 

#4 2018-08-13 21:36:21

26F
Member
Registered: 2018-07-25
Posts: 13
Website

Re: A question about GBDK samples

What tracker are you guys using to make the mod files?

Offline

 

#5 2018-08-15 17:12:08

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: A question about GBDK samples

26F wrote:

What tracker are you guys using to make the mod files?

Open modplug tracker is one of the best programs to use for this.

Offline

 

#6 2018-08-15 22:19:52

26F
Member
Registered: 2018-07-25
Posts: 13
Website

Re: A question about GBDK samples

Cheers smile. I'm also wondering if you can get milkytracker to create a mod file that will work. I'll keep plugging around.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson