Author Topic: Dark Basic an Bass.dll  (Read 5312 times)

0 Members and 1 Guest are viewing this topic.

Offline Mcquade

  • ZX 81
  • *
  • Posts: 17
  • Karma: 3
    • View Profile
Dark Basic an Bass.dll
« on: July 17, 2008 »
i have a problem with the new bass.dll
ive read the manual and made this code:



load dll "bass.dll",1

call dll 1,"BASS_Free"
call dll 1,"BASS_Init",-1 ,44100 ,BASS_DEVICE_CPSPEAKERS,0,0
call dll 1,"BASS_MusicLoad",0 ,mod$,0 ,0,BASS_SAMPLE_LOOP||BASS_MUSIC_RAMP,0

`main program loop
call dll 1,"BASS_ChannelPlay",HMUSIC,0



but i cant hear anything.. whats wrong ? hope someone can help me


thx mcq


Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Dark Basic an Bass.dll
« Reply #1 on: July 17, 2008 »
Hi McQuade!  You're not having much luck are you?!  The sad thing is I don't think anyone here is using DarkBasic and so helping you is going to be tricky.  Do you program in any other languages?  Lots of people here use Blitz or FreeBasic, and some use PureBasic.

Jim
Challenge Trophies Won:

Offline Mcquade

  • ZX 81
  • *
  • Posts: 17
  • Karma: 3
    • View Profile
Re: Dark Basic an Bass.dll
« Reply #2 on: July 17, 2008 »
oh shit.... with the bassmod dll its works... but with the "normal" bass no sound... i can cry....

i tryed it now for about 2 days out...

cheers mcq


no sorry i dont use any other basic language...

okay now i fixed it to hear music :bfuck1:  :carrot: :inspired: :inspired: :inspired:

but now i have a another problem how to make a good visualisation from bass.dll (channelgetdata) anyone a idea???


many thx
« Last Edit: July 18, 2008 by Mcquade »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Dark Basic an Bass.dll
« Reply #3 on: July 19, 2008 »
Welldone dude, how did you fix it?

Cheers and all the very best,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Dark Basic an Bass.dll
« Reply #4 on: July 20, 2008 »
but now i have a another problem how to make a good visualisation from bass.dll (channelgetdata) anyone a idea???

Are you trying to sync a graphics effect to the music? If so it is not so difficult to do some basic syncing. if you can get the frequency that is being played you can use this as a seed to change colour and what not. I know its very simplistic but it is effective if you figure out what variables in the GFX part are best to modify. Also if you know what value to expect at a certain time you can use the note/frequency as a signal to start doing a different effect.
What does channelgetdata return?

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2750
  • Karma: 493
    • View Profile
    • http://www.rbraz.com/
Re: Dark Basic an Bass.dll
« Reply #5 on: July 20, 2008 »
If you want to use fmod.dll, you can find an example that I did some time ago, here:
http://dbfinteractive.com/forum/index.php?topic=946.msg13925#msg13925

Challenge Trophies Won:

Offline Mcquade

  • ZX 81
  • *
  • Posts: 17
  • Karma: 3
    • View Profile
Re: Dark Basic an Bass.dll
« Reply #6 on: July 21, 2008 »
Thx Dudes  :|| :clap:


my mistake in my codes was this one :


load dll "bass.dll", 1         

REM ***********************************************************************************************************
gosub INIT_SOUND
gosub init_GFX
REM ***********************************************************************************************************

REM ***********************************************************************************************************
Rem ***** Main Source File *****
repeat


rem gosub greenbar
gosub boxing
   if spacekey()=1 then call dll 1,"BASS_Stop"
   if returnkey() = 1 then call dll 1,"BASS_Start"
sync
until escapekey() = 1
call dll 1,"BASS_STOP"
call dll 1,"BASS_FREE"
flush video memory
end
REM ***********************************************************************************************************


REM ***********************************************************************************************************
INIT_SOUND:
init = call Dll (1,"BASS_Init", -1 ,44100 ,BASS_DEVICE_CPSPEAKERS,0,0)
If Init = 0
Print "Initalisierung des digitalen Soundsystem fehlgeschlagen!"
Sleep 1000 : Delete Dll 1 : End
EndIf
Start = Call Dll(1,"BASS_Start")
If Start = 0
Print "Starten des digitalen Output fehlgeschlagen!"
Sleep 1000 : Delete Dll 1 : End
EndIf

hmod = call dll (1, "BASS_MusicLoad", 0, "208.xm", 0, 0, BASS_SAMPLE_LOOP,BASS_MUSIC_RAMP,BASS_MUSIC_FT2MOD,0)     HERE WAS THE FU.. MISTAKE...
If hmod = 0
Print "Mod konnte nich geladen werden !"
Sleep 1000 : Delete Dll 1 : End
EndIf
call dll 1, "BASS_ChannelPlay", hmod, 0
return
REM ***********************************************************************************************************

INIT_GFX:
load image "GFX\Copper_10.png",1
load image "GFX\Copper_11.png",2
load image "GFX\Copper_12.png",3

return

REM ***********************************************************************************************************
greenbar:

box 1,1,99,50,rgb(0,200,0),rgb(0,50,0),rgb(0,200,0),rgb(0,50,0)
box 1,50,99,99,rgb(0,50,0),rgb(0,200,0),rgb(0,50,0),rgb(0,200,0)
return
REM ***********************************************************************************************************


REM ***********************************************************************************************************
boxing:

paste image 1,0,200,0

Call Dll 1,"BASS_ChannelGetData",hmod,Bank,BASS_DATA_FFT2048

return

Thx for the link i will check it out now.

cheers Mcq


Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17394
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Dark Basic an Bass.dll
« Reply #7 on: July 21, 2008 »
Glad you're sorted :)

Have some good karma for reporting back and letting us know it's fixed :)
Shockwave ^ Codigos
Challenge Trophies Won: