Qbasicnews.com
July 04, 2020, 08:59:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Running some FB examples  (Read 5125 times)
GordonSweet
Guru
**
Posts: 287



WWW
« on: February 10, 2005, 11:57:07 AM »

I am sorry to being a bit 'thick' as a newcomer to FB, but I compiled the examples PLAYMP3, FMODTEST into EXEs but when I ran them they complained FMOD.DLL was not present. How do I get hold of this DLL? Others bearing the same name from other software show up errors. Also what is the purpuse of WINMMHLP once compiled. I have see how to use WINMM.DLL in other languages for a variety of purposes.        Gordon
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #1 on: February 10, 2005, 12:00:57 PM »

Download it from the FMod web site. Found on google Wink
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #2 on: February 10, 2005, 06:45:05 PM »

Thanks- managed to download the DLL ok and got it running.

There are not many MOD players around. Winamp plays them but not wonderfull Windows Media Player. I actullay have some 1600 MOD files, mostly presumably originating from Europe. If anyone wants the list to have a few sent by email - buzz me.        Gordon    :bounce:
Logged
Z!re
*/-\*
*****
Posts: 4599


« Reply #3 on: February 10, 2005, 08:13:44 PM »

*buzz* Cheesy

Email me a list, XiberLord[at]gmail[period]com
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #4 on: February 11, 2005, 03:31:36 PM »

Shocked I'm having a simular prob with SDL.DLL and others close to it,.. where do you find them??
Logged

Kevin (x.t.r.GRAPHICS)

Sterling Christensen
Na_th_an
*****
Posts: 1328


« Reply #5 on: February 11, 2005, 05:43:25 PM »

Quote from: "Rattrapmax6"
:o I'm having a simular prob with SDL.DLL and others close to it,.. where do you find them??

Here's SDL.dll: http://www.libsdl.org/release/SDL-1.2.8-win32.zip
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #6 on: February 13, 2005, 05:38:34 PM »

Smiley , Hay, thanks.. :wink:
Logged

Kevin (x.t.r.GRAPHICS)

GordonSweet
Guru
**
Posts: 287



WWW
« Reply #7 on: February 15, 2005, 11:21:24 AM »

I have a collection of over 1600 MOD files but so far cannot find any with play with the FMODTEST.BAS apart for the DNE_TRTN.MOD supplied, although WINAMP plays both types. Anyone else had this problem?

I have managed to display patterns while the above is playing as below:-

Code:

'Simple FMOD test for FB
'by Plasma  [11-16-2004]

DefSng A-Z
'$Include: 'fmod.bi'
SCREEN 9

Declare Sub ErrorQuit (Message$)

Const FALSE = 0
Const MusicFile = "dne_trtn.mod"
Dim Shared Handle As Long


If FSOUND_GetVersion <= FMOD_VERSION Then
  ErrorQuit "FMOD version " + STR$(FMOD_VERSION) + " or greater required"
End If

If FSOUND_Init(44100, 32, 0) = FALSE Then
  ErrorQuit "Can't initialize FMOD"
End If

Handle = FMUSIC_LoadSong(MusicFile)
If Handle = FALSE Then
  ErrorQuit "Can't load music file " + CHR$(34) + MusicFile + CHR$(34)
End if

FMUSIC_PlaySong(Handle)

Print "FMOD test for freeBASIC"
        Print "Press any key to quit."

    DW = 640 / 1000: DH = 350 / 1000
    WHILE ever = 0
        max = 300: stp = 4: res = 4: xp = 170: yp = 20
        x = INT((RND * 300 + 1) / res) * res
        y = INT((RND * 300 + 1) / res) * res
        xst = INT(RND * stp) * res
        yst = INT(RND * stp) * res
        FOR n = 1 TO INT(RND * 40) + 10
            IF INKEY$ = " " THEN STOP
            IF INT(n / 8) = n / 8 THEN COLOR INT(RND * 15) + 1
            PSET (x + xp, y + yp)
            LINE -(x + xp, (max - y) + yp)
            LINE -((max - x) + xp, (max - y) + yp)
            LINE -((max - x) + xp, y + yp)
            LINE -(x + xp, y + yp)
            PSET (y + xp, x + yp)
            LINE -(y + xp, (max - x) + yp)
            LINE -((max - y) + xp, (max - x) + yp)
            LINE -((max - y) + xp, x + yp)
            LINE -(y + xp, x + yp)
            x = x + xst
            IF x > max OR x < 0 THEN xst = 0 - xst
            y = y + yst
            IF y > max OR y < 0 THEN yst = 0 - yst
            SLEEP 100
        NEXT n
        SLEEP 2000 : CLS
    WEND

Sleep

FMUSIC_FreeSong(Handle)
FSOUND_Close

End

Sub ErrorQuit (Message$)

  print "ERROR: "; Message$
  FMUSIC_FreeSong(Handle)
  FSOUND_Close
  End 1

End Sub
Logged
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #8 on: February 15, 2005, 10:50:35 PM »

Are you sure you're specifying the correct path to the mod files? According to the fmod.org features page,  fmod supports MOD/S3M/XM and IT.
Logged
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #9 on: February 16, 2005, 04:25:49 AM »

Thanks, but I do not think that is the answer. When I replace the dm_trtn.mod with any other is the same Directory, it refuses to regonise them. I will hunt around for another version of FMOD.DLL. I will wamil a few of these other MOD files to anyone interested.

Gordon
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #10 on: February 16, 2005, 09:49:52 AM »

Send me one of the non-working MOD files, I'll try it. Btw, nathan DOT asshantti AT gmail DOT com.

You should grab the latest fmod.dll from their webpage: http://www.fmod.org

Anyway, MOD support is there since the first versions, I doubt that's the problem. I never had a single problem making my mods to be played using FMOD, and I have used Fast Tracker, Fast Tracker II, Scream Tracker and Impulse Tracker to make them. I didn't have problem playing those good ol' chip tunes from the Amiga Protracker...  :Huh:
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Z!re
*/-\*
*****
Posts: 4599


« Reply #11 on: February 16, 2005, 10:03:28 AM »

Some of his MODs use a different format, I dunno which..

*.MOD

Winamp whines about missing information, but plays it fine, dunno what module decoder it uses though.
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
« Reply #12 on: February 16, 2005, 11:57:36 AM »

That fmod example will not play all mod files at its directory, only the one set with the MusicFile constant, it has to be changed by hand for each different file and the source has to be recompiled, unless you change it to: FMUSIC_LoadSong(Command$) and pass the file name (including extension) at the command-line when running fmodtest.
Logged

GordonSweet
Guru
**
Posts: 287



WWW
« Reply #13 on: February 16, 2005, 01:22:51 PM »

Nathan, I am emailing you my list of all my MOD, MIDI, S3m, VOC and WAV files. If you want about 3 Mb Zipped, send me a list. My server gets a bit touchy if I send too much somtimes. I expect all the MODs do actually run OK

Thanks guys, I am an idiot I should have noticed it was linked into one specific file, but I thought it searched for any MOD like PLAYMP3.BAS looks for any MP3. So now just drag any MOD onto the FB compiled of below to see more patterms while playing. As my knowledge is mainly limited to BASIC, my next challenge is how to get patterns running likewise in PLAYMP3.BAS           Gordon.

Code:

'Simple FMOD test for FB
'by Plasma  [11-16-2004]

DefSng A-Z
'$Include: 'fmod.bi'
SCREEN 12

Declare Sub ErrorQuit (Message$)

Const FALSE = 0
Const MusicFile = "dne_trtn.mod"
Dim Shared Handle As Long


If FSOUND_GetVersion <= FMOD_VERSION Then
  ErrorQuit "FMOD version " + STR$(FMOD_VERSION) + " or greater required"
End If

If FSOUND_Init(44100, 32, 0) = FALSE Then
  ErrorQuit "Can't initialize FMOD"
End If

Handle = FMUSIC_LoadSong(Command$)
If Handle = FALSE Then
  ErrorQuit "Can't load music file " + CHR$(34) + MusicFile + CHR$(34)
End if

FMUSIC_PlaySong(Handle)

Print "FMOD test for freeBASIC"
        Print "Press any key to quit." : SLEEP 2000

REM KALIEDSCOPE originaly Written for the UK BBC Electron
    DIM X(3, 3), Y(3, 3), XC%(7), YC%(7)
    RANDOMIZE TIMER: RESTORE 500
    FOR I% = 1 TO 7
         READ XC%(I%), YC%(I%)
    NEXT
    SCALE1 = 250: SCALE2 = 400: WINDOW
    FIN = 0: C = 1: C% = 0
    WHILE FIN = 0: CLS
     S$ = "A"
     FOR P = 1 TO 2: CLS
      IF P = 2 THEN S$ = "B"
      C = C + 1: IF C = 4 THEN C = 1
      FOR L% = 1 TO 6
       GOSUB 300: REM CALCS
       PC% = INT(RND * 15) + 1: COLOR PC%
       IF S$ = "A" THEN K% = 1: GOTO 140
       FOR K% = 1 TO 7
140     WINDOW (0 - XC%(K%), 0 - YC%(K%))-(1279 - XC%(K%), 1023 - YC%(K%))
        GOSUB 410: REM TRIANGLES
        IF S$ = "A" THEN GOTO 180
       NEXT K%
180   NEXT L%
      REM Attempts to avoid full screen color flood
      ST = -600: EN = 600: IF S$ = "B" THEN ST = -50: EN = 1150
      CX% = 0: SX% = 0
      FOR TX% = ST TO EN STEP 20
       SX% = SX% + POINT(TX%, 0)
       CX% = CX% + 1
      NEXT TX%: TX% = TX% - 20
      IF SX% MOD CX% = 0 THEN GOTO 190
      SLEEP 2000
190  NEXT P
    WEND
300 REM CALCS
    IF S$ = "A" THEN SCALE = SCALE2 ELSE SCALE = SCALE1
    FOR J% = 1 TO 3
     R = SCALE * RND: TH = 1.047 * (RND + .5)
     X(1, J%) = R * COS(TH): Y(1, J%) = R * SIN(TH)
     XH = X(1, J%) / 2: XV = X(1, J%) * .866
     YH = Y(1, J%) * .866: YV = Y(1, J%) / 2
     X(2, J%) = YH + XH: Y(2, J%) = -YV + XV
     X(3, J%) = YH - XH: Y(3, J%) = -YV - XV
    NEXT J%: RETURN
410 REM TRIANGLES
    IF INKEY$<>"" THEN STOP
    FOR I% = 1 TO 3
     PSET (X(I%, 1), Y(I%, 1))
     LINE -(X(I%, 2), Y(I%, 2))
     LINE -(X(I%, 3), Y(I%, 3)): LINE -(X(I%, 1), Y(I%, 1))
     PX% = (X(I%, 1) + X(I%, 2) + X(I%, 3)) / 3
     PY% = (Y(I%, 1) + Y(I%, 2) + Y(I%, 3)) / 3
     PAINT (PX%, PY%)
     PSET (-X(I%, 1), Y(I%, 1))
     LINE -(-X(I%, 2), Y(I%, 2))
     LINE -(-X(I%, 3), Y(I%, 3)): LINE -(-X(I%, 1), Y(I%, 1))
     PX = (-X(I%, 1) + -X(I%, 2) + -X(I%, 3)) / 3
     PY = (Y(I%, 1) + Y(I%, 2) + Y(I%, 3)) / 3: PAINT (PX, PY)
    NEXT I%: RETURN

FMUSIC_FreeSong(Handle)
FSOUND_Close

End


Sub ErrorQuit (Message$)

  print "ERROR: "; Message$
  FMUSIC_FreeSong(Handle)
  FSOUND_Close
  End 1

End Sub

500   DATA 640,514,370,994,910,994,1180,514,910,34,370,34,100,514
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!