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 2020-11-05 21:03:47

Martin
New member
Registered: 2020-11-05
Posts: 1

How do I add music?

Hi everyone. I've been interested in making my own games with GBDK and I managed to make a few couple things but I'm having trouble adding music to my games. I use Linux but the majority of tutorials and examples are for windows and I'm having difficulties compiling. I've tried joining the Discord channel but for some reason the invitation doesn't work for me. Could someone help me with this? I've no idea of how to start adding background music into the game. Any help appreciated! smile

Last edited by Martin (2020-11-05 21:54:20)

Offline

 

#2 2020-11-05 22:17:16

Ardis
Member
From: USA
Registered: 2019-06-06
Posts: 59
Website

Re: How do I add music?

One way is with GBT-Player, though the GBDK side of it is no longer seeing updates. If I recall, toxa is also working on another solution, but I don't know how far along he is with it or how viable it is in its current stage as I haven't looked at music for my project since I got the placeholder music working.

https://github.com/AntonioND/gbt-player

Here are some GBT-Player tutorials by GamingMonsters, parts 18 and 19 of his ongoing series for GBDK, if you want to look into that as a solution.

Composing your music for GBT-Player:
https://www.youtube.com/watch?v=7l93RP986Zo

Playing it in GBDK:
https://www.youtube.com/watch?v=4W7j3GQSmvU

If you're going to use OpenMPT as your tracker (the one shown in the tutorials,) it should run under Wine 1.8 or newer without issue.


Also known as Arvex in other places.

Interceptor (Demo)
https://arvex.itch.io/interceptor

Offline

 

#3 2020-11-06 02:43:22

toxa
Member
Registered: 2020-02-13
Posts: 307

Offline

 

#4 2021-04-12 10:37:28

0x7f
Member
Registered: 2019-11-24
Posts: 65

Re: How do I add music?

Hi,

I played a bit around with GBT player. I can compile the example and the music is played but I am confused...

void gbt_play(void *data, UINT8 bank, UINT8 speed);
Somehow the speed parameter does not work. The music is played always with the same speed.

void gbt_loop(UINT8 loop);
Same here. I call the function with gbt_loop( 0 ); instead of gbt_loop( 1 ); but in both cases the song is repeated.

I just used the template.mod from the example.

Would be nice if somebody can clarify it. Thanks!

Offline

 

#5 2021-04-12 20:50:27

AntonioND
Member
Registered: 2014-06-17
Posts: 134
Website

Re: How do I add music?

MOD files can have commands to change the speed and to make the song loop. It's likely your MOD file is doing that.

Offline

 

#6 2021-04-13 09:31:40

0x7f
Member
Registered: 2019-11-24
Posts: 65

Re: How do I add music?

Hi, yes thats possible. Thanks!

Offline

 

#7 2021-04-16 10:24:25

toxa
Member
Registered: 2020-02-13
Posts: 307

Re: How do I add music?

0x7f, honestly, try hUGETracker: https://github.com/untoxa/hUGEBuild

Offline

 

#8 2021-04-19 09:17:47

0x7f
Member
Registered: 2019-11-24
Posts: 65

Re: How do I add music?

Hi toxa,

yes, I am sure hUGETracker is the better music player. But for the moment I am happy with GBT player.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson