Author Topic: Problem with playing mods using BASS  (Read 6981 times)

zajkos

  • Posts: 17
Problem with playing mods using BASS
« on: 8 Jul '03 - 09:53 »
I made a small mp3/ogg player and it works perfectly when it's playing mo3 or ogg. But when I implemented mod plyaing feature, it works but the quality of muisc is far from perfect. It sounds like it was in much lower frequency than it should be. I tried probably all the combination of parameters but it did't help.

PS. BASS is a great production and I was amazed by its possibilities!!!

Irrational86

  • Posts: 960
Re: Problem with playing mods using BASS
« Reply #1 on: 8 Jul '03 - 15:52 »
The frequency MOD files are played at is the one you set in the BASS_Init function

zajkos

  • Posts: 17
Re: Problem with playing mods using BASS
« Reply #2 on: 8 Jul '03 - 15:53 »
I set 44100 Hz

Irrational86

  • Posts: 960
Re: Problem with playing mods using BASS
« Reply #3 on: 8 Jul '03 - 16:04 »
hmm...am not really into MOD music, maybe you should wait for a response from someone who knows more about this..specially Ian

Ian @ un4seen

  • Administrator
  • Posts: 26173
Re: Problem with playing mods using BASS
« Reply #4 on: 8 Jul '03 - 22:00 »
When you say "the quality of muisc is far from perfect", what are you using as reference? Are you sure it's not just the files you're playing - there are some dodgy sounding MODs about :D

zajkos

  • Posts: 17
Re: Problem with playing mods using BASS
« Reply #5 on: 9 Jul '03 - 07:24 »
Yes. I tried it out with Winamp and it sounded much better. I've tried more than 1 mod and all sounded badly. I think the mods were OK because it were mods from AMIGA games.

The fragment of the code looks like this (c++ builder):

Bass_Init(-1,WAVE_FORMAT_4S16,0,Form1->Handle);
Bass_Start();
HMUSIC mod=Bass_MusicLoad(0,Name.c_str),0,0, BASS_MUSIC_RAMPS|BASS_MUSIC_FT2MOD|BASS_MUSIC_FLOAT);
bool playing=Bass_MusicPlay(mod);
« Last Edit: 9 Jul '03 - 07:25 by zajkos »

Irrational86

  • Posts: 960
Re: Problem with playing mods using BASS
« Reply #6 on: 9 Jul '03 - 07:56 »
Quote

Yes. I tried it out with Winamp and it sounded much better. I've tried more than 1 mod and all sounded badly. I think the mods were OK because it were mods from AMIGA games.

The fragment of the code looks like this (c++ builder):

Bass_Init(-1,WAVE_FORMAT_4S16,0,Form1->Handle);
Bass_Start();
HMUSIC mod=Bass_MusicLoad(0,Name.c_str),0,0, BASS_MUSIC_RAMPS|BASS_MUSIC_FT2MOD|BASS_MUSIC_FLOAT);
bool playing=Bass_MusicPlay(mod);
There is your problem, I told you to put the frequency...so change it to this,
Bass_Init(-1,44100,0,Form1->Handle);
« Last Edit: 9 Jul '03 - 07:58 by XMinioNX »

zajkos

  • Posts: 17
Re: Problem with playing mods using BASS
« Reply #7 on: 9 Jul '03 - 07:58 »
but WAVE_FORMAT_4S16 means 44100
also the same Bass_Init parameters are used for mp3 playback and they work fine

Irrational86

  • Posts: 960
Re: Problem with playing mods using BASS
« Reply #8 on: 9 Jul '03 - 08:00 »
You have to put the actual frequency, not a flag, i.e. 44100, 48000..etc...Of course it works fine for MP3s...Stream files do not use this frequency, they use the one they are encoded at. Music files (MODs, MO3, XM, IT...etc) are the only ones that use this frequency. If you put the flag WAVE_FORMAT_4S16, you are making the frequency the value of that flag, which is a very small number.

zajkos

  • Posts: 17
Re: Problem with playing mods using BASS
« Reply #9 on: 9 Jul '03 - 09:15 »
YOU ARE RIGHT
That's the point.

BTW. what frequency should I use?

Irrational86

  • Posts: 960
Re: Problem with playing mods using BASS
« Reply #10 on: 9 Jul '03 - 17:20 »
You should use whichever you want. Almost everyone uses 44100, which is like the standard frequency for almost everything. But you could try others, 48000, 96000..etc, its all up to you.