Hi,
i'm new on the Genesis Homebrew Scene, and i'm trying do to a port of Pang for the megadrive.
Here is a video of a Work In Progress : https://www.youtube.com/watch?v=2Jod7r1F6K8
90% of the game logic is coded (even it's not show in the video), but i would make some music and sfx for the game.
I've succeeded playing music, converting midi to vgm and using :
SND_startPlay_VGM(pang13OK);
The music is ok (even if the midi is ugly, it's the same ugly music on the Genesis ).
I've trying to play a sample (.wav) alone :
SND_startPlay_PCM ( ball_explode, 2304,SOUND_RATE_11025,SOUND_PAN_CENTER,0) ;
It's ok too.
When i try to mix the two :
SND_startPlay_VGM(pang13OK);
and
SND_playSfx_VGM (ball_explode, 2304);
It works, but the .wav, the ball explosion is not good, it looks like the sample has eaten a cat ...
I use rescomp and this configuration for the wav file :
# Generated with rescomp
VGM pang13OK "pang13OK.vgm"
WAV ball_explode "ball_explode.wav" 0 11025
Surely i'm doing something wrong, but how i can mix music and sfx with sgdk ?
Thanks a lot.
Mixing Music and Sfx
Moderator: BigEvilCorporation
-
- Newbie
- Posts: 3
- Joined: Sat Nov 15, 2014 2:44 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Hi bfg,
You were faster than me
Indeed the included VGM driver only play PCM SFX at 8 Khz.
Normally when you declare your resource in WAV format :
WAV ball_explode "ball_explode.wav" 4
rescomp should resample automatically the wav to 8 Khz PCM so you don't have to care about it !
As i told you on another place, i am currently working on a new sound driver allowing VGM music playback while having 4 PCM channels at 14 Khz at same time. All these working on Z80 cpu (so without any impact on main CPU) =)
You were faster than me
Indeed the included VGM driver only play PCM SFX at 8 Khz.
Normally when you declare your resource in WAV format :
WAV ball_explode "ball_explode.wav" 4
rescomp should resample automatically the wav to 8 Khz PCM so you don't have to care about it !
As i told you on another place, i am currently working on a new sound driver allowing VGM music playback while having 4 PCM channels at 14 Khz at same time. All these working on Z80 cpu (so without any impact on main CPU) =)
-
- Newbie
- Posts: 3
- Joined: Sat Nov 15, 2014 2:44 pm
Thanks for the explanation ! Cool if rescomp convert on 8Khz. I'll finish the game without music for the moment, i'm not musician, so compose or modify a track will be the big partStef wrote:Hi bfg,
You were faster than me
Indeed the included VGM driver only play PCM SFX at 8 Khz.
Normally when you declare your resource in WAV format :
WAV ball_explode "ball_explode.wav" 4
rescomp should resample automatically the wav to 8 Khz PCM so you don't have to care about it !
As i told you on another place, i am currently working on a new sound driver allowing VGM music playback while having 4 PCM channels at 14 Khz at same time. All these working on Z80 cpu (so without any impact on main CPU) =)
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
A small update to let you know i finally released the XGM driver, you can find more informations about it in this topic :
viewtopic.php?p=25041#25041
viewtopic.php?p=25041#25041