0
0

I have an example for FMOD on playing MOD, IT, XM, and S3M file in VB. Could you include it in the downloads? The default only plays streaming audio using FSOUND. The code is very clear, but I didn’t use FMOD.BAS as I perfer copying and pasting the API’s I needed.

[img]http://www.exhedra.com/upload/ScreenShots/PIC20028523186934.gif”[/img]

Download: [url:1ihrx267]http://marklu.cjb.net/modplayer/index.html[/url:1ihrx267]

Source is of course, there. Compiled version too. Although it is not really a sample, I just made it for fun and my own use as I don’t like to use WinAmp, or ModPlug very much as they have bad interfaces. By the way, how do you find out how long it takes to play a MOD, IT, XM, or S3M file?

  • You must to post comments
0
0

It is very difficult to find the actual length of a MOD-based song due to the tempo changes and the jump command. This means that the song must be played internally as fast as possible to try to calculate the length. If there is a jump command, where does the song actually end? No-one knows.

I have a MOD that WinAmp seems to hang on while calculating the length, but after a minute or so it comes up with a length of approximately 292,000 seconds.

  • You must to post comments
0
0

Why not ignore jumps. I know where it is in the file. I tried making one player without fmod.dll, when I read the format, it was too complex. well, if you read to the end, use file size. You will have it done. But I don’t understand the odd format in the way they put rows, channels.

  • You must to post comments
0
0

Jumps are valid commands in a song that can affect song length, so you cannot get anywhere near an accurate figure if you ignore them. But they can also cause a wildly inaccurate figure. Go figure. 😀

  • You must to post comments
0
0

mmhhh if there is enough interest, i can pick some piece of code from my player and put it in a vb modules player. What do you think ?

  • You must to post comments
0
0

This sounds like a goood idea, KarLoX.

  • You must to post comments
0
0

I use the following routines to calculate the lenght of mods,xms,its,s3ms, it seems to work with every module i have tried though some say it will fail on some select modules.

[code:2blrsw2f]
sng_BPM = FMUSIC_GetBPM(STRM)
sng_Speed = FMUSIC_GetSpeed(STRM)

        sng_KBPS = ((sng_BPM * 2) / 5)
        st = ((1 / sng_KBPS) * 1000) * sng_Speed

        For i = 0 To (sng_NumOrders - 1)
            t = t + FMUSIC_GetPatternLength(STRM, i)
        Next i

        sng_LenInBytes = t
        sng_LenInMS = t * st

[/code:2blrsw2f]

the sng_NumOrders of course you need to get from Fmod via sng_NumOrders = FMUSIC_GetNumOrders(STRM) I hope this works. P.S. If you really like a good player check out mod4win which is now freewhere at [url:2blrsw2f]http://pjeantaud.free.fr/mod4win/english.html[/url:2blrsw2f] Take a peek at the [b:2blrsw2f]effects[/b:2blrsw2f] Very cool, especially on mods with alot of channels and effects. This is something I would love to implement into my player however it is currently beyond my knowledge of fmod, or maybe even beyound fmods current abilities in VB.

++Cire.

  • You must to post comments
0
0

It gives some good results but doesn’t work for all module at all (this is not possible). btw i ll finish the very simple module player soon (i hope).

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.